支持配置后台页面入口
This commit is contained in:
@@ -1,131 +1,133 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
import { adminPath, ADMIN_DASHBOARD_PATH } from '@/shared/utils/adminPath'
|
||||
|
||||
const adminMeta = { layout: 'admin', requiresAdmin: true }
|
||||
|
||||
export const adminRoutes: RouteRecordRaw[] = [
|
||||
{ path: '/admin', redirect: '/admin/dashboard' },
|
||||
{ path: adminPath(), redirect: ADMIN_DASHBOARD_PATH },
|
||||
{
|
||||
path: '/admin/login',
|
||||
path: adminPath('login'),
|
||||
name: 'admin-login',
|
||||
component: () => import('@/features/admin/views/AdminLoginView.vue'),
|
||||
meta: { layout: 'blank' },
|
||||
},
|
||||
{
|
||||
path: '/admin/dashboard',
|
||||
path: adminPath('dashboard'),
|
||||
name: 'admin-dashboard',
|
||||
component: () => import('@/features/admin/views/AdminDashboardView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/users',
|
||||
path: adminPath('users'),
|
||||
name: 'admin-users',
|
||||
component: () => import('@/features/admin/views/AdminUsersView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/orders',
|
||||
path: adminPath('orders'),
|
||||
name: 'admin-orders',
|
||||
component: () => import('@/features/admin/views/AdminOrdersView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/orders/:id',
|
||||
path: adminPath('orders/:id'),
|
||||
name: 'admin-order-detail',
|
||||
component: () => import('@/features/admin/views/AdminOrderDetailView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/listings',
|
||||
path: adminPath('listings'),
|
||||
name: 'admin-listings',
|
||||
component: () => import('@/features/admin/views/AdminListingsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/listings/:id',
|
||||
path: adminPath('listings/:id'),
|
||||
name: 'admin-listing-detail',
|
||||
component: () => import('@/features/admin/views/AdminListingDetailView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/listings/review',
|
||||
path: adminPath('listings/review'),
|
||||
name: 'admin-listing-review',
|
||||
component: () => import('@/features/admin/views/AdminListingReviewView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/disputes',
|
||||
path: adminPath('disputes'),
|
||||
name: 'admin-disputes',
|
||||
component: () => import('@/features/admin/views/AdminDisputesView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/chats',
|
||||
path: adminPath('chats'),
|
||||
name: 'admin-chats',
|
||||
component: () => import('@/features/admin/views/AdminChatsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/finance/dashboard',
|
||||
path: adminPath('finance/dashboard'),
|
||||
name: 'admin-finance-dashboard',
|
||||
component: () => import('@/features/admin/views/AdminFinanceDashboardView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/finance/details',
|
||||
path: adminPath('finance/details'),
|
||||
name: 'admin-finance-details',
|
||||
component: () => import('@/features/admin/views/AdminFinanceDetailsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/wallet-ledger',
|
||||
path: adminPath('wallet-ledger'),
|
||||
name: 'admin-wallet-ledger',
|
||||
component: () => import('@/features/admin/views/AdminWalletLedgerView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/payments',
|
||||
path: adminPath('payments'),
|
||||
name: 'admin-payments',
|
||||
component: () => import('@/features/admin/views/AdminPaymentsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/withdrawals',
|
||||
path: adminPath('withdrawals'),
|
||||
name: 'admin-withdrawals',
|
||||
component: () => import('@/features/admin/views/AdminWithdrawalsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/system-configs',
|
||||
path: adminPath('system-configs'),
|
||||
name: 'admin-system-configs',
|
||||
component: () => import('@/features/admin/views/AdminSystemConfigsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/payment-configs',
|
||||
path: adminPath('payment-configs'),
|
||||
name: 'admin-payment-configs',
|
||||
component: () => import('@/features/admin/views/AdminPaymentConfigsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/audit-logs',
|
||||
path: adminPath('audit-logs'),
|
||||
name: 'admin-audit-logs',
|
||||
component: () => import('@/features/admin/views/AdminAuditLogsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/admin-users',
|
||||
path: adminPath('admin-users'),
|
||||
name: 'admin-admin-users',
|
||||
component: () => import('@/features/admin/views/AdminMgrUsersView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/roles',
|
||||
path: adminPath('roles'),
|
||||
name: 'admin-roles',
|
||||
component: () => import('@/features/admin/views/AdminRolesView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: '/admin/announcements',
|
||||
path: adminPath('announcements'),
|
||||
name: 'admin-announcements',
|
||||
component: () => import('@/features/admin/views/AdminAnnouncementsView.vue'),
|
||||
meta: adminMeta,
|
||||
|
||||
Reference in New Issue
Block a user