refactor(admin): clean up audit/permission/paid content config

- P1: remove the duplicate "审核联动" (ai_moderate_background/submit)
  block from the attachment permissions page; those settings live in
  the "评论审核" / API content audit surfaces.
- P2: rename the "内容审核" submenu to "评论审核" (permissions domain).
- P4: remove the "下载/付费内容中心" page and its schema/route chain;
  hardcode runtime policy so download always supports credit purchase
  and paid content is limited to posts. Drop the now-dead
  cms_features.download_credit flag and parse_slug_list helper.
This commit is contained in:
2026-08-13 01:14:21 +08:00
parent 2f4ce790a7
commit b4a4b295bc
16 changed files with 33 additions and 461 deletions
-43
View File
@@ -14,49 +14,6 @@ class SchemaPayment {
'domain' => 'payment',
'title' => '支付&付费',
'sections' => [
'paid' => [
'key' => 'paid',
'title' => '内容付费 / 下载',
'version' => '1.0.0',
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'strategy', 'title' => '内容付费策略', 'fields' => [
['key' => 'payment_paid_post_types', 'label' => '受管内容类型', 'type' => 'input', 'default' => 'post'],
['key' => 'payment_vip_free_download', 'label' => 'VIP / 角色白名单免扣下载', 'type' => 'switch', 'default' => false],
['key' => 'payment_vip_exempt_roles', 'label' => '免扣角色列表', 'type' => 'input', 'default' => ''],
]],
['key' => 'delivery', 'title' => '交付说明', 'fields' => [
['key' => 'payment_paid_catalog_note', 'label' => '前台付费提示', 'type' => 'textarea', 'default' => ''],
['key' => 'payment_manual_delivery_note', 'label' => '人工交付备注', 'type' => 'textarea', 'default' => ''],
]],
['key' => 'display', 'title' => '展示设置', 'fields' => [
['key' => 'pay_mark', 'label' => '付费标记', 'type' => 'input', 'default' => '付费'],
['key' => 'payment_currency_symbol', 'label' => '货币符号', 'type' => 'input', 'default' => '¥'],
['key' => 'pay_show_user', 'label' => '显示购买用户', 'type' => 'switch', 'default' => true],
['key' => 'pay_show_paycount', 'label' => '显示购买次数', 'type' => 'switch', 'default' => true],
['key' => 'pay_box_position', 'label' => '付费框位置', 'type' => 'radio', 'default' => 'top', 'options' => [
['label' => '文章框顶部', 'value' => 'box_top'],
['label' => '正文顶部', 'value' => 'top'],
['label' => '正文底部', 'value' => 'bottom'],
['label' => '文章框底部', 'value' => 'box_bottom'],
]],
]],
['key' => 'download', 'title' => '下载能力', 'fields' => [
['key' => 'payment_download_enable', 'label' => '启用下载能力', 'type' => 'switch', 'default' => false],
['key' => 'payment_down_alone_page', 'label' => '独立下载页面', 'type' => 'switch', 'default' => false],
['key' => 'payment_download_remote_s', 'label' => '远程文件下载', 'type' => 'switch', 'default' => true],
['key' => 'payment_download_verify_nonce', 'label' => '下载鉴权', 'type' => 'switch', 'default' => true],
['key' => 'payment_download_user_log', 'label' => '用户下载记录条数', 'type' => 'number', 'default' => 50, 'min' => 0, 'max' => 9999],
['key' => 'payment_download_post_log', 'label' => '内容下载记录条数', 'type' => 'number', 'default' => 50, 'min' => 0, 'max' => 9999],
['key' => 'payment_download_remote_size', 'label' => '远程文件大小限制(KB)', 'type' => 'number', 'default' => 2048, 'min' => 1, 'max' => 999999],
['key' => 'payment_download_remote_ext', 'label' => '远程文件格式限制', 'type' => 'input', 'default' => 'zip,rar,7z'],
]],
['key' => 'coupon', 'title' => '内容优惠码', 'fields' => [
['key' => 'coupon_post_s', 'label' => '全站内容允许优惠码', 'type' => 'switch', 'default' => false],
['key' => 'coupon_desc', 'label' => '优惠码说明', 'type' => 'textarea', 'default' => '', 'dependsOn' => ['key' => 'coupon_post_s', 'value' => true]],
]],
],
],
'recharge' => [
'key' => 'recharge',
'title' => '余额充值',