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:
1 parent
2f4ce790a7
commit
b4a4b295bc
16 files changed
+33
-461
No files matched your search
@@ -2,7 +2,6 @@
|
||||
* Payment & Paid domain schemas.
|
||||
*/
|
||||
|
||||
import { paidSchema } from './paid.js'
|
||||
import { rechargeSchema } from './recharge.js'
|
||||
import { vipSchema } from './vip.js'
|
||||
import { revenueSchema } from './revenue.js'
|
||||
@@ -13,7 +12,6 @@ import { cardPassSchema } from './cardPass.js'
|
||||
import { withdrawalSchema } from './withdrawal.js'
|
||||
|
||||
export const paymentSchemas = {
|
||||
paid: paidSchema,
|
||||
recharge: rechargeSchema,
|
||||
vip: vipSchema,
|
||||
revenue: revenueSchema,
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
export const paidSchema = {
|
||||
key: 'payment.paid',
|
||||
title: '下载/付费内容中心',
|
||||
icon: 'fas fa-download',
|
||||
description: '统一管理资源下载、付费内容、角色免扣和人工交付说明。',
|
||||
defaults: {
|
||||
payment_paid_post_types: 'post',
|
||||
payment_vip_free_download: false,
|
||||
payment_vip_exempt_roles: '',
|
||||
payment_paid_catalog_note: '',
|
||||
payment_manual_delivery_note: '付费或人工确认内容请在订单备注中记录交付方式。',
|
||||
pay_mark: '付费',
|
||||
payment_currency_symbol: '¥',
|
||||
pay_show_user: true,
|
||||
pay_show_paycount: true,
|
||||
pay_box_position: 'top',
|
||||
payment_download_enable: false,
|
||||
payment_down_alone_page: false,
|
||||
payment_download_remote_s: true,
|
||||
payment_download_verify_nonce: true,
|
||||
payment_download_user_log: 50,
|
||||
payment_download_post_log: 50,
|
||||
payment_download_remote_size: 2048,
|
||||
payment_download_remote_ext: 'zip,rar,7z',
|
||||
coupon_post_s: false,
|
||||
coupon_desc: '',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'strategy',
|
||||
title: '付费内容策略',
|
||||
icon: 'fas fa-layer-group',
|
||||
fields: [
|
||||
{ key: 'payment_paid_post_types', label: '受管内容类型', type: 'input', default: 'post', help: '逗号分隔,例如 post,course,doc' },
|
||||
{ key: 'payment_vip_free_download', label: '角色白名单免扣下载', type: 'switch', default: false },
|
||||
{ key: 'payment_vip_exempt_roles', label: '免扣角色列表', type: 'input', default: '', help: '逗号分隔的 WordPress role slug,例如 administrator,editor,vip' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'delivery',
|
||||
title: '交付说明',
|
||||
icon: 'fas fa-receipt',
|
||||
fields: [
|
||||
{ key: 'payment_paid_catalog_note', label: '前台付费提示', type: 'textarea', default: '', help: '显示在资源/付费内容页的运营说明。' },
|
||||
{ key: 'payment_manual_delivery_note', label: '人工交付备注', type: 'textarea', default: '付费或人工确认内容请在订单备注中记录交付方式。', help: '人工确认或离线交付流程的标准说明。' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'display',
|
||||
title: '展示设置',
|
||||
icon: 'fas fa-eye',
|
||||
fields: [
|
||||
{ key: 'pay_mark', label: '付费标记', type: 'input', default: '付费' },
|
||||
{ key: 'payment_currency_symbol', label: '货币符号', type: 'input', default: '¥', help: '商品价格前缀,如 ¥、$、¥' },
|
||||
{ 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: '下载设置',
|
||||
icon: 'fas fa-cloud-download-alt',
|
||||
fields: [
|
||||
{ key: 'payment_download_enable', label: '启用下载功能', type: 'switch', default: false },
|
||||
{ key: 'payment_down_alone_page', label: '独立下载页面', type: 'switch', default: false, help: '开启后,已获权限的下载入口跳转到独立下载页(模板:单篇资源下载),而不是在正文内联显示全部下载按钮。', dependsOn: { key: 'payment_download_enable', value: true } },
|
||||
{ key: 'payment_download_remote_s', label: '远程文件下载', type: 'switch', default: true, dependsOn: { key: 'payment_download_enable', value: true } },
|
||||
{ key: 'payment_download_verify_nonce', label: '下载鉴权', type: 'switch', default: true, dependsOn: { key: 'payment_download_enable', value: true } },
|
||||
{ key: 'payment_download_user_log', label: '用户下载记录条数', type: 'number', default: 50, min: 0, max: 9999, help: '0 为不保存', dependsOn: { key: 'payment_download_enable', value: true } },
|
||||
{ key: 'payment_download_post_log', label: '文章下载记录条数', type: 'number', default: 50, min: 0, max: 9999, help: '0 为不保存', dependsOn: { key: 'payment_download_enable', value: true } },
|
||||
{ key: 'payment_download_remote_size', label: '远程文件大小限制(KB)', type: 'number', default: 2048, min: 1, max: 999999, dependsOn: { key: 'payment_download_remote_s', value: true } },
|
||||
{ key: 'payment_download_remote_ext', label: '远程文件格式限制', type: 'input', default: 'zip,rar,7z', help: '逗号分隔扩展名', dependsOn: { key: 'payment_download_remote_s', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'coupon',
|
||||
title: '内容优惠码',
|
||||
icon: 'fas fa-ticket-alt',
|
||||
fields: [
|
||||
{ key: 'coupon_post_s', label: '全站内容允许优惠码', type: 'switch', default: false, help: '开启后所有付费内容收银台可用优惠码;关闭时仅单篇勾选「允许优惠码」的文章可用。' },
|
||||
{ key: 'coupon_desc', label: '优惠码说明', type: 'textarea', default: '', dependsOn: { key: 'coupon_post_s', value: true }, help: '展示在内容收银台优惠码输入框下方。' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -120,7 +120,7 @@ export const permissionsSchemas = {
|
||||
*/
|
||||
moderation: {
|
||||
key: 'permissions.moderation',
|
||||
title: '内容审核',
|
||||
title: '评论审核',
|
||||
icon: 'fas fa-gavel',
|
||||
description: '管理评论审核、反垃圾、限流与拦截配置。',
|
||||
defaults: {
|
||||
|
||||
Reference in new issue
Block a user