feat(admin): strip SPA ops menus; redirect old hashes to native WP (Phase 4)

SPA shop/forum/payment/users sections now keep configuration pages only.
Operational workbenches were removed from the sidebar and loaders; legacy
hash routes open NativeOpsRedirect into the matching WP native admin page.
Admin SPA production build refreshed accordingly.
This commit is contained in:
2026-07-15 02:10:05 +08:00
parent bf061f43ee
commit a3dde3874a
85 changed files with 15987 additions and 249 deletions
+2 -57
View File
@@ -1,33 +1,12 @@
import { renderFaIcon, schemaPage, customPage } from './helpers'
import { renderFaIcon, schemaPage } from './helpers'
// Forum SPA = config only. Ops moved to native CPT menus (Phase 4).
export const forumSection = {
key: 'forum',
label: '社区&论坛',
icon: renderFaIcon('fas fa-comments'),
route: '/forum',
children: [
customPage({
key: 'forum-boards',
name: 'ForumBoards',
label: '板块管理',
route: '/forum/boards',
component: 'ForumBoards',
title: '板块管理',
desc: '创建、编辑和排序论坛板块。',
canonicalDomain: 'forum',
section: 'boards',
}),
customPage({
key: 'forum-topics',
name: 'ForumTopics',
label: '主题治理',
route: '/forum/topics',
component: 'ForumTopics',
title: '主题治理',
desc: '集中处理主题审核、可见性、版块移动和治理状态。',
canonicalDomain: 'forum',
section: 'topics',
}),
schemaPage({
key: 'forum-settings-basic',
name: 'ForumSettingsBasic',
@@ -128,39 +107,5 @@ export const forumSection = {
canonicalDomain: 'forum',
section: 'credits',
}),
customPage({
key: 'forum-moderator-applications',
name: 'ForumModeratorApplications',
label: '版主申请',
route: '/forum/moderator-applications',
component: 'ForumModeratorApplications',
title: '版主申请',
desc: '处理前台版主申请和审核结果反馈。',
canonicalDomain: 'forum',
section: 'moderator-applications',
}),
customPage({
key: 'forum-moderators',
name: 'ForumModerators',
label: '版主管理',
route: '/forum/moderators',
component: 'ForumModerators',
title: '版主管理',
desc: '为每个论坛版块分配和管理版主。',
canonicalDomain: 'forum',
section: 'moderators',
}),
customPage({
key: 'forum-dashboard',
name: 'ForumDashboard',
label: '论坛概览',
route: '/forum/dashboard',
component: 'ForumDashboard',
title: '论坛概览',
desc: '社区讨论、帖子管理、版块配置等论坛功能概览。',
canonicalDomain: 'forum',
section: 'dashboard',
secondaryEntry: true,
}),
],
}
+2 -2
View File
@@ -18,8 +18,8 @@ const SECTION_DEFAULT_CHILDREN = {
permissions: 'permissions-comment',
users: 'users-auth',
payment: 'payment-paid',
shop: 'shop-products',
forum: 'forum-boards',
shop: 'shop-basic',
forum: 'forum-settings-basic',
extensions: 'extensions-ip',
tools: 'tools-import-export',
'theme-info': 'theme-info-dashboard',
+3 -39
View File
@@ -60,18 +60,6 @@ export const paymentSection = {
canonicalDomain: 'payment',
section: 'order',
}),
customPage({
key: 'payment-revenue',
name: 'PaymentRevenue',
label: '创作分成',
route: '/payment/revenue',
component: 'PaymentRevenue',
status: 'available',
title: '创作分成',
desc: '创作者收益分配和结算记录。',
canonicalDomain: 'payment',
section: 'revenue',
}),
schemaPage({
key: 'payment-affiliate',
name: 'PaymentAffiliate',
@@ -79,22 +67,10 @@ export const paymentSection = {
route: '/payment/affiliate',
status: 'available',
title: '推广返佣',
desc: '返佣规则、邀请链路和结算记录。',
desc: '返佣规则、邀请链路和结算策略(返佣工单在支付中心)。',
canonicalDomain: 'payment',
section: 'affiliate',
}),
customPage({
key: 'payment-charge-card',
name: 'PaymentChargeCard',
label: '充值卡',
route: '/payment/charge-card',
component: 'PaymentChargeCard',
status: 'available',
title: '充值卡',
desc: '创建和管理充值卡。',
canonicalDomain: 'payment',
section: 'charge-card',
}),
schemaPage({
key: 'payment-card-pass',
name: 'PaymentCardPass',
@@ -102,7 +78,7 @@ export const paymentSection = {
route: '/payment/card-pass',
status: 'available',
title: '卡密设置',
desc: '充值卡类型、卡号规则与兑换文案。',
desc: '充值卡类型、卡号规则与兑换文案(卡密工单在支付中心)。',
canonicalDomain: 'payment',
section: 'card-pass',
}),
@@ -113,21 +89,9 @@ export const paymentSection = {
route: '/payment/withdrawal',
status: 'available',
title: '提现策略',
desc: '最低提现、手续费与说明文案(提现工单在商城提现管理)。',
desc: '最低提现、手续费与说明文案(提现工单在支付中心)。',
canonicalDomain: 'payment',
section: 'withdrawal',
}),
customPage({
key: 'payment-rebate',
name: 'PaymentRebate',
label: '返佣管理',
route: '/payment/rebate',
component: 'PaymentRebate',
status: 'available',
title: '返佣管理',
desc: '管理订单返佣和推广返佣记录。',
canonicalDomain: 'payment',
section: 'rebate',
}),
],
}
+2 -79
View File
@@ -1,33 +1,12 @@
import { renderFaIcon, schemaPage, customPage } from './helpers'
import { renderFaIcon, schemaPage } from './helpers'
// Shop SPA = config only. Ops moved to native WP menus (Phase 4).
export const shopSection = {
key: 'shop',
label: '商城&商品',
icon: renderFaIcon('fas fa-shopping-cart'),
route: '/shop',
children: [
customPage({
key: 'shop-products',
name: 'ShopProducts',
label: '商品管理',
route: '/shop/products',
component: 'ShopProducts',
title: '商品管理',
desc: '管理所有商品的上架、编辑和库存。',
canonicalDomain: 'shop',
section: 'products',
}),
customPage({
key: 'shop-orders',
name: 'ShopOrders',
label: '订单管理',
route: '/shop/orders',
component: 'ShopOrders',
title: '订单管理',
desc: '查看和管理所有交易订单。',
canonicalDomain: 'shop',
section: 'orders',
}),
schemaPage({
key: 'shop-basic',
name: 'ShopBasic',
@@ -78,28 +57,6 @@ export const shopSection = {
canonicalDomain: 'shop',
section: 'contact',
}),
customPage({
key: 'shop-after-sale',
name: 'ShopAfterSale',
label: '售后管理',
route: '/shop/after-sale',
component: 'ShopAfterSale',
title: '售后管理',
desc: '管理退款、换货等售后工单。',
canonicalDomain: 'shop',
section: 'after-sale',
}),
customPage({
key: 'shop-shipping',
name: 'ShopShipping',
label: '物流管理',
route: '/shop/shipping',
component: 'ShopShipping',
title: '物流管理',
desc: '管理订单发货、物流单号和发货状态。',
canonicalDomain: 'shop',
section: 'shipping',
}),
schemaPage({
key: 'shop-shipping-config',
name: 'ShopShippingConfig',
@@ -120,39 +77,5 @@ export const shopSection = {
canonicalDomain: 'shop',
section: 'timing',
}),
customPage({
key: 'shop-coupons',
name: 'ShopCoupons',
label: '优惠券',
route: '/shop/coupons',
component: 'ShopCoupons',
title: '优惠券',
desc: '创建和管理优惠券。',
canonicalDomain: 'shop',
section: 'coupons',
}),
customPage({
key: 'shop-withdrawals',
name: 'ShopWithdrawals',
label: '提现管理',
route: '/shop/withdrawals',
component: 'ShopWithdrawals',
title: '提现管理',
desc: '审核和管理创作者提现申请。',
canonicalDomain: 'shop',
section: 'withdrawals',
}),
customPage({
key: 'shop-dashboard',
name: 'ShopDashboard',
label: '商城概览',
route: '/shop/dashboard',
component: 'ShopDashboard',
title: '商城概览',
desc: '商品管理、订单系统、库存管理等电商功能概览。',
canonicalDomain: 'shop',
section: 'dashboard',
secondaryEntry: true,
}),
],
}
+5 -48
View File
@@ -1,5 +1,9 @@
import { renderFaIcon, schemaPage, customPage } from './helpers'
/**
* Users SPA keeps config-shaped pages.
* Message / invite / ban / report queues live under users.php native menus.
*/
export const usersSection = {
key: 'users',
label: '用户&互动',
@@ -67,7 +71,7 @@ export const usersSection = {
component: 'UsersVerify',
status: 'available',
title: '身份认证',
desc: '身份认证字段、审核流和展示标签。',
desc: '身份认证字段与展示配置(审核队列在 用户 → 身份认证)。',
canonicalDomain: 'users',
section: 'verify',
}),
@@ -105,53 +109,6 @@ export const usersSection = {
canonicalDomain: 'users',
section: 'notifications',
}),
customPage({
key: 'users-messages',
name: 'UsersMessages',
label: '消息中心',
route: '/users/messages',
component: 'UsersMessages',
status: 'available',
title: '消息中心',
desc: '管理站内通知、系统消息和用户私信记录。',
canonicalDomain: 'users',
section: 'messages',
}),
customPage({
key: 'users-invite-codes',
name: 'UsersInviteCodes',
label: '邀请码运营',
route: '/users/invite-codes',
component: 'UsersInviteCodes',
title: '邀请码运营',
desc: '管理邀请码列表、生成新邀请码和查看邀请统计。',
canonicalDomain: 'users',
section: 'invite-codes',
}),
customPage({
key: 'users-ban',
name: 'UsersBan',
label: '禁封管理',
route: '/users/ban',
component: 'UsersBan',
status: 'available',
title: '禁封管理',
desc: '查看和管理用户封禁、限制状态。',
canonicalDomain: 'users',
section: 'ban',
}),
customPage({
key: 'users-report',
name: 'UsersReport',
label: '禁封/举报',
route: '/users/report',
component: 'UsersReport',
status: 'available',
title: '禁封/举报',
desc: '举报受理与用户限制状态管理。',
canonicalDomain: 'users',
section: 'report',
}),
schemaPage({
key: 'users-sms',
name: 'UsersSms',