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:
1 parent
bf061f43ee
commit
a3dde3874a
85 files changed
+15987
-249
No files matched your search
@@ -71,6 +71,32 @@ function createSectionRedirectRoutes() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Old SPA ops routes → native WP admin pages (Phase 4 transition).
|
||||
* Bookmarks under #/shop/products etc. land on NativeOpsRedirect.
|
||||
*/
|
||||
const NATIVE_OPS_REDIRECTS = [
|
||||
{ path: '/shop/products', title: '商品管理', nativeAdminPath: 'edit.php?post_type=aksrt_product' },
|
||||
{ path: '/shop/orders', title: '订单管理', nativeAdminPath: 'admin.php?page=aksrt_orders' },
|
||||
{ path: '/shop/after-sale', title: '售后管理', nativeAdminPath: 'admin.php?page=aksrt_after_sale' },
|
||||
{ path: '/shop/shipping', title: '物流管理', nativeAdminPath: 'admin.php?page=aksrt_shipping' },
|
||||
{ path: '/shop/coupons', title: '优惠券', nativeAdminPath: 'admin.php?page=aksrt_coupons' },
|
||||
{ path: '/shop/withdrawals', title: '提现管理', nativeAdminPath: 'admin.php?page=aksrt_withdraw' },
|
||||
{ path: '/shop/dashboard', title: '商城概览', nativeAdminPath: 'admin.php?page=aksrt_pay' },
|
||||
{ path: '/forum/boards', title: '板块管理', nativeAdminPath: 'edit.php?post_type=aksrt_forum_plate' },
|
||||
{ path: '/forum/topics', title: '主题治理', nativeAdminPath: 'edit.php?post_type=aksrt_forum_topic' },
|
||||
{ path: '/forum/moderators', title: '版主管理', nativeAdminPath: 'edit.php?post_type=aksrt_forum_plate' },
|
||||
{ path: '/forum/moderator-applications', title: '版主申请', nativeAdminPath: 'edit.php?post_type=aksrt_forum_plate' },
|
||||
{ path: '/forum/dashboard', title: '论坛概览', nativeAdminPath: 'edit.php?post_type=aksrt_forum_topic' },
|
||||
{ path: '/payment/charge-card', title: '充值卡', nativeAdminPath: 'admin.php?page=aksrt_charge_cards' },
|
||||
{ path: '/payment/revenue', title: '创作分成', nativeAdminPath: 'admin.php?page=aksrt_income' },
|
||||
{ path: '/payment/rebate', title: '返佣管理', nativeAdminPath: 'admin.php?page=aksrt_rebate' },
|
||||
{ path: '/users/messages', title: '消息中心', nativeAdminPath: 'users.php?page=aksrt_messages' },
|
||||
{ path: '/users/invite-codes', title: '邀请码运营', nativeAdminPath: 'users.php?page=aksrt_invite_codes' },
|
||||
{ path: '/users/ban', title: '禁封管理', nativeAdminPath: 'users.php?page=aksrt_user_ban&tab=restrictions' },
|
||||
{ path: '/users/report', title: '禁封/举报', nativeAdminPath: 'users.php?page=aksrt_user_ban&tab=reports' },
|
||||
]
|
||||
|
||||
const routes = [
|
||||
{ path: '/', redirect: ADMIN_DEFAULT_ROUTE },
|
||||
...createSectionRedirectRoutes(),
|
||||
@@ -80,6 +106,16 @@ const routes = [
|
||||
component: resolveComponent(page),
|
||||
meta: createRouteMeta(page),
|
||||
})),
|
||||
...NATIVE_OPS_REDIRECTS.map((item) => ({
|
||||
path: item.path,
|
||||
name: `NativeRedirect_${item.path.replace(/\W+/g, '_')}`,
|
||||
component: componentLoaders.NativeOpsRedirect,
|
||||
meta: {
|
||||
title: item.title,
|
||||
nativeAdminPath: item.nativeAdminPath,
|
||||
status: 'redirect',
|
||||
},
|
||||
})),
|
||||
]
|
||||
|
||||
export default createRouter({
|
||||
|
||||
Reference in new issue
Block a user