chore(路由文件): 整理代码

This commit is contained in:
hzj 2025-12-09 14:11:36 +08:00
parent 32c6aa1614
commit 8de28d82c8

View File

@ -4,6 +4,7 @@ import { installRouteGuard } from '../utils/routeGuard.js'
const router = createRouter({ const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL), history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [ routes: [
// 公共页面
{ {
path: '/', path: '/',
name: 'root', name: 'root',
@ -17,28 +18,9 @@ const router = createRouter({
meta: { requiresAuth: false, isPublic: true }, meta: { requiresAuth: false, isPublic: true },
}, },
{ {
path: '/host-center', path: '/about',
name: 'host-center', name: 'about',
component: () => import('../views/HostCenter/index.vue'), component: () => import('../views/LandingPage/AboutView.vue'),
meta: { requiresAuth: true },
},
{
path: '/agency-center',
name: 'agency-center',
component: () => import('../views/AgencyCenter/index.vue'),
meta: { requiresAuth: true },
},
{
path: '/bd-center',
name: 'bd-center',
component: () => import('../views/BDCenter/index.vue'),
meta: { requiresAuth: true },
},
{
path: '/coin-seller',
name: 'coin-seller',
component: () => import('../views/RechargeAgency/index.vue'),
meta: { requiresAuth: true },
}, },
{ {
path: '/apply', path: '/apply',
@ -46,54 +28,147 @@ const router = createRouter({
component: () => import('../views/ApplyHost/ApplyView.vue'), component: () => import('../views/ApplyHost/ApplyView.vue'),
meta: { requiresAuth: false }, meta: { requiresAuth: false },
}, },
{
path: '/not_app',
name: 'not-app',
component: () => import('../views/LandingPage/NotAppView.vue'),
meta: { requiresAuth: false },
},
{
path: '/platform-policy',
name: 'platform-policy',
component: () => import('../views/PlatformPolicy/PlatformPolicy.vue'),
meta: { requiresAuth: true },
},
{
path: '/:pathMatch(.*)*',
name: 'not-found',
redirect: '/apply',
}, // 404 页面
// 管理员中心
{
path: '/admin-center',
name: 'admin-center',
component: () => import('../views/AdminCenter/index.vue'),
meta: { requiresAuth: true },
},
{
path: '/item-distribution',
name: 'item-distribution',
component: () => import('../views/AdminCenter/ItemDistribution.vue'),
meta: { requiresAuth: true },
},
{
path: '/my-BDLeader-teams',
name: 'my-BDLeader-teams',
component: () => import('../views/AdminCenter/MyBDLeaderTeams.vue'),
meta: { requiresAuth: true },
},
{
path: '/my-BD-teams',
name: 'my-BD-teams',
component: () => import('../views/AdminCenter/MyBDTeams.vue'),
meta: { requiresAuth: true },
},
{
path: '/my-agency-teams',
name: 'my-agency-teams',
component: () => import('../views/AdminCenter/MyAgencyTeams.vue'),
meta: { requiresAuth: true },
},
{
path: '/my-recharge-agency',
name: 'my-recharge-agency',
component: () => import('../views/AdminCenter/MyRechargeAgency.vue'),
meta: { requiresAuth: true },
},
{
path: '/admin-policy',
name: 'admin-policy',
component: () => import('../views/AdminCenter/policy.vue'),
meta: { requiresAuth: true },
},
// BDLeader中心
{
path: '/bd-leader-center',
name: 'bd-leader-center',
component: () => import('../views/BDLeaderCenter/index.vue'),
meta: { requiresAuth: true },
},
// BD中心
{
path: '/bd-center',
name: 'bd-center',
component: () => import('../views/BDCenter/index.vue'),
meta: { requiresAuth: true },
},
{
path: '/available-income',
name: 'available-income',
component: () => import('../views/BDCenter/availableIncome.vue'),
meta: { requiresAuth: true },
},
{
path: '/income-details',
name: 'income-details',
component: () => import('../views/BDCenter/incomeDetails.vue'),
meta: { requiresAuth: true },
},
{
path: '/policy',
name: 'policy',
component: () => import('../views/BDCenter/policy.vue'),
meta: { requiresAuth: true },
},
// 金币代理页面
{
path: '/coin-seller',
name: 'coin-seller',
component: () => import('../views/RechargeAgency/index.vue'),
meta: { requiresAuth: true },
},
{
path: '/coin-seller-search',
name: 'coin-seller-search',
component: () => import('../views/RechargeAgency/SearchUser.vue'),
meta: { requiresAuth: true },
},
{
path: '/seller-records',
name: 'seller-records',
component: () => import('../views/RechargeAgency/SellerRecordsView.vue'),
meta: { requiresAuth: true },
},
{
path: '/recharge-agency-recruit',
name: 'recharge-agency-recruit',
component: () => import('../views/RechargeAgency/Recruit.vue'),
meta: { requiresAuth: true },
},
// 代理中心
{
path: '/agency-center',
name: 'agency-center',
component: () => import('../views/AgencyCenter/index.vue'),
meta: { requiresAuth: true },
},
{ {
path: '/message', path: '/message',
name: 'message', name: 'message',
component: () => import('../views/AgencyCenter/Message.vue'), component: () => import('../views/AgencyCenter/Message.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/transfer',
name: 'transfer',
component: () => import('../views/Wallet/Transfer/Transfer.vue'),
meta: { requiresAuth: true },
},
{
path: '/exchange-gold-coins',
name: 'exchange-gold-coins',
component: () => import('../views/Wallet/Exchange/ExchangeGoldCoins.vue'),
meta: { requiresAuth: true },
},
// 辅助页面
{
path: '/about',
name: 'about',
component: () => import('../views/LandingPage/AboutView.vue'),
},
{
path: '/host-setting',
name: 'host-setting',
component: () => import('../views/HostCenter/HostSetting.vue'),
meta: { requiresAuth: true },
},
{ {
path: '/agency-setting', path: '/agency-setting',
name: 'agency-setting', name: 'agency-setting',
component: () => import('../views/AgencyCenter/AgencySetting.vue'), component: () => import('../views/AgencyCenter/AgencySetting.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/search-payee',
name: 'search-payee',
component: () => import('../views/Wallet/Transfer/SearchPayee.vue'),
meta: { requiresAuth: true },
},
{
path: '/information-details',
name: 'information-details',
component: () => import('../views/Wallet/Detail/InformationDetails.vue'),
meta: { requiresAuth: true },
},
{ {
path: '/team-bill', path: '/team-bill',
name: 'team-bill', name: 'team-bill',
@ -107,35 +182,50 @@ const router = createRouter({
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/platform-policy', path: '/invite-members',
name: 'platform-policy', name: 'invite-members',
component: () => import('../views/PlatformPolicy/PlatformPolicy.vue'), component: () => import('../views/AgencyCenter/InviteMembersProcess.vue'),
meta: { requiresAuth: true },
},
// 主播中心
{
path: '/host-center',
name: 'host-center',
component: () => import('../views/HostCenter/index.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/coin-seller-search', path: '/host-setting',
name: 'coin-seller-search', name: 'host-setting',
component: () => import('../views/RechargeAgency/SearchUser.vue'), component: () => import('../views/HostCenter/HostSetting.vue'),
meta: { requiresAuth: true },
},
// 收支相关页面
{
path: '/transfer',
name: 'transfer',
component: () => import('../views/Wallet/Transfer/Transfer.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/seller-records', path: '/search-payee',
name: 'seller-records', name: 'search-payee',
component: () => import('../views/RechargeAgency/SellerRecordsView.vue'), component: () => import('../views/Wallet/Transfer/SearchPayee.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
// 公共页面
{ {
path: '/not_app', path: '/exchange-gold-coins',
name: 'not-app', name: 'exchange-gold-coins',
component: () => import('../views/LandingPage/NotAppView.vue'), component: () => import('../views/Wallet/Exchange/ExchangeGoldCoins.vue'),
meta: { requiresAuth: false }, meta: { requiresAuth: true },
}, },
// 404 页面
{ {
path: '/:pathMatch(.*)*', path: '/information-details',
name: 'not-found', name: 'information-details',
redirect: '/apply', component: () => import('../views/Wallet/Detail/InformationDetails.vue'),
meta: { requiresAuth: true },
}, },
{ {
path: '/history-salary', path: '/history-salary',
@ -143,60 +233,12 @@ const router = createRouter({
component: () => import('../views/Wallet/Detail/HistorySalary.vue'), component: () => import('../views/Wallet/Detail/HistorySalary.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/admin-center',
name: 'admin-center',
component: () => import('../views/AdminCenter/index.vue'),
meta: { requiresAuth: true },
},
{
path: '/item-distribution',
name: 'item-distribution',
component: () => import('../views/AdminCenter/ItemDistribution.vue'),
meta: { requiresAuth: true },
},
{
path: '/recharge',
name: 'recharge',
component: () => import('../views/Recharge/RechargeFreightAgent.vue'),
meta: { requiresAuth: true },
},
{
path: '/map',
name: 'map',
component: () => import('../views/Recharge/map.vue'),
meta: { requiresAuth: true },
},
{ {
path: '/pay-result', path: '/pay-result',
name: 'pay-result', name: 'pay-result',
component: () => import('../views/Wallet/PayResult/payResult.vue'), component: () => import('../views/Wallet/PayResult/payResult.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/top-list',
name: 'top-list',
component: () => import('../views/Ranking/KingAndQueen/TopList.vue'),
meta: { requiresAuth: true },
},
{
path: '/weekly-star',
name: 'weekly-star',
component: () => import('../views/Ranking/WeeklyStar/WeeklyStar.vue'),
meta: { requiresAuth: true },
},
{
path: '/ranking',
name: 'ranking',
component: () => import('../views/Ranking/Overall/Ranking.vue'),
meta: { requiresAuth: true },
},
{
path: '/recharge-agency-recruit',
name: 'recharge-agency-recruit',
component: () => import('../views/RechargeAgency/Recruit.vue'),
meta: { requiresAuth: true },
},
{ {
path: '/cash-out', path: '/cash-out',
name: 'cash-out', name: 'cash-out',
@ -216,23 +258,33 @@ const router = createRouter({
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/available-income', path: '/bank-card',
name: 'available-income', name: 'bank-card',
component: () => import('../views/BDCenter/availableIncome.vue'), component: () => import('../views/Wallet/CashOut/BankCard.vue'),
meta: { requiresAuth: true },
},
// 充值页面
{
path: '/recharge',
name: 'recharge',
component: () => import('../views/Recharge/RechargeFreightAgent.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/income-details', path: '/map',
name: 'income-details', name: 'map',
component: () => import('../views/BDCenter/incomeDetails.vue'), component: () => import('../views/Recharge/map.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/bd-leader-center', path: '/recharge-guide',
name: 'bd-leader-center', name: 'recharge-guide',
component: () => import('../views/BDLeaderCenter/index.vue'), component: () => import('../views/Recharge/guide.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
// 邀请页面
{ {
path: '/invitation-to-register', path: '/invitation-to-register',
name: 'invitation-to-register', name: 'invitation-to-register',
@ -263,30 +315,34 @@ const router = createRouter({
component: () => import('../views/Invitation/inviteAgency.vue'), component: () => import('../views/Invitation/inviteAgency.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
// 固定排行榜活动
{ {
path: '/invite-members', path: '/top-list',
name: 'invite-members', name: 'top-list',
component: () => import('../views/AgencyCenter/InviteMembersProcess.vue'), component: () => import('../views/Ranking/KingAndQueen/TopList.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/policy', path: '/weekly-star',
name: 'policy', name: 'weekly-star',
component: () => import('../views/BDCenter/policy.vue'), component: () => import('../views/Ranking/WeeklyStar/WeeklyStar.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/ranking',
name: 'ranking',
component: () => import('../views/Ranking/Overall/Ranking.vue'),
meta: { requiresAuth: true },
},
// 限时活动
{ {
path: '/recharge-reward', path: '/recharge-reward',
name: 'recharge-reward', name: 'recharge-reward',
component: () => import('../views/Activities/Reward/RechargeReward.vue'), component: () => import('../views/Activities/Reward/RechargeReward.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/bank-card',
name: 'bank-card',
component: () => import('../views/Wallet/CashOut/BankCard.vue'),
meta: { requiresAuth: true },
},
{ {
path: '/oman-national-day', path: '/oman-national-day',
name: 'oman-national-day', name: 'oman-national-day',
@ -305,52 +361,12 @@ const router = createRouter({
component: () => import('../views/Activities/Yemen/IndependenceDay/index.vue'), component: () => import('../views/Activities/Yemen/IndependenceDay/index.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/my-BDLeader-teams',
name: 'my-BDLeader-teams',
component: () => import('../views/AdminCenter/MyBDLeaderTeams.vue'),
meta: { requiresAuth: true },
},
{
path: '/my-BD-teams',
name: 'my-BD-teams',
component: () => import('../views/AdminCenter/MyBDTeams.vue'),
meta: { requiresAuth: true },
},
{
path: '/my-agency-teams',
name: 'my-agency-teams',
component: () => import('../views/AdminCenter/MyAgencyTeams.vue'),
meta: { requiresAuth: true },
},
{
path: '/my-recharge-agency',
name: 'my-recharge-agency',
component: () => import('../views/AdminCenter/MyRechargeAgency.vue'),
meta: { requiresAuth: true },
},
// 充值引导页
{
path: '/recharge-guide',
name: 'recharge-guide',
component: () => import('../views/Recharge/guide.vue'),
meta: { requiresAuth: true },
},
// 限时活动
{ {
path: '/activity-game', path: '/activity-game',
name: 'activity-game', name: 'activity-game',
component: () => import('../views/Activities/Game/index.vue'), component: () => import('../views/Activities/Game/index.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{
path: '/admin-policy',
name: 'admin-policy',
component: () => import('../views/AdminCenter/policy.vue'),
meta: { requiresAuth: true },
},
{ {
path: '/UAE-independence-day', path: '/UAE-independence-day',
name: 'UAE-independence-day', name: 'UAE-independence-day',