297 lines
8.1 KiB
JavaScript
297 lines
8.1 KiB
JavaScript
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
import { installRouteGuard } from '../utils/routeGuard.js'
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(import.meta.env.BASE_URL),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'root',
|
|
component: () => import('../views/LoadingView.vue'),
|
|
meta: { requiresAuth: false, isPublic: true },
|
|
},
|
|
{
|
|
path: '/loading',
|
|
name: 'loading',
|
|
component: () => import('../views/LoadingView.vue'),
|
|
meta: { requiresAuth: false, isPublic: true },
|
|
},
|
|
{
|
|
path: '/host-center',
|
|
name: 'host-center',
|
|
component: () => import('../views/HostCenterView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/agency-center',
|
|
name: 'agency-center',
|
|
component: () => import('../views/AgencyCenterView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/bd-center',
|
|
name: 'bd-center',
|
|
component: () => import('../views/BDCenterView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/coin-seller',
|
|
name: 'coin-seller',
|
|
component: () => import('../views/CoinSellerView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/apply',
|
|
name: 'apply',
|
|
component: () => import('../views/ApplyView.vue'),
|
|
meta: { requiresAuth: false },
|
|
},
|
|
{
|
|
path: '/message',
|
|
name: 'message',
|
|
component: () => import('../views/MessageView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/transfer',
|
|
name: 'transfer',
|
|
component: () => import('../views/TransferView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/exchange-gold-coins',
|
|
name: 'exchange-gold-coins',
|
|
component: () => import('../views/ExchangeGoldCoinsView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
// 辅助页面
|
|
{
|
|
path: '/about',
|
|
name: 'about',
|
|
component: () => import('../views/AboutView.vue'),
|
|
},
|
|
{
|
|
path: '/host-setting',
|
|
name: 'host-setting',
|
|
component: () => import('../views/HostSettingView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/agency-setting',
|
|
name: 'agency-setting',
|
|
component: () => import('../views/Agency/AgencySettingView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/search-payee',
|
|
name: 'search-payee',
|
|
component: () => import('../views/SearchPayeeView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/information-details',
|
|
name: 'information-details',
|
|
component: () => import('../views/InformationDetailsView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invite-members',
|
|
name: 'invite-members',
|
|
component: () => import('../views/InviteMembersView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/team-bill',
|
|
name: 'team-bill',
|
|
component: () => import('../views/TeamBillView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/team-member',
|
|
name: 'team-member',
|
|
component: () => import('../views/TeamMemberView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/platform-policy',
|
|
name: 'platform-policy',
|
|
component: () => import('../views/PlatformPolicyView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/coin-seller-search',
|
|
name: 'coin-seller-search',
|
|
component: () => import('../views/CoinSellerSearchView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/seller-records',
|
|
name: 'seller-records',
|
|
component: () => import('../views/SellerRecordsView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/bd-setting',
|
|
name: 'bd-setting',
|
|
component: () => import('../views/BDSettingView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
// 公共页面
|
|
{
|
|
path: '/not_app',
|
|
name: 'not-app',
|
|
component: () => import('../views/NotAppView.vue'),
|
|
meta: { requiresAuth: false },
|
|
},
|
|
// 404 页面
|
|
{
|
|
path: '/:pathMatch(.*)*',
|
|
name: 'not-found',
|
|
redirect: '/apply',
|
|
},
|
|
{
|
|
path: '/history-salary',
|
|
name: 'history-salary',
|
|
component: () => import('../views/HistorySalaryView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/platform-salary',
|
|
name: 'platform-salary',
|
|
component: () => import('../views/PlatformPolicyView.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/admin-center',
|
|
name: 'admin-center',
|
|
component: () => import('../views/AdminCenter.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/item-distribution',
|
|
name: 'item-distribution',
|
|
component: () => import('../views/ItemDistribution.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/recharge',
|
|
name: 'recharge',
|
|
component: () => import('../views/Recharge.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/recharge-standard',
|
|
name: 'recharge-standard',
|
|
component: () => import('../views/RechargeStandard.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/recharge-freight-agent',
|
|
name: 'recharge-freight-agent',
|
|
component: () => import('../views/RechargeFreightAgent.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/map',
|
|
name: 'map',
|
|
component: () => import('../views/map.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/pay-result',
|
|
name: 'pay-result',
|
|
component: () => import('../views/payResult.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/top-list',
|
|
name: 'top-list',
|
|
component: () => import('../views/TopList/TopList.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/weekly-star',
|
|
name: 'weekly-star',
|
|
component: () => import('../views/WeeklyStar/WeeklyStar.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/ranking',
|
|
name: 'ranking',
|
|
component: () => import('../views/Ranking/Ranking.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/halloween',
|
|
name: 'halloween',
|
|
component: () => import('../views/Activities/Halloween/Halloween.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invite-agency',
|
|
name: 'invite-agency',
|
|
component: () => import('../views/BDCenter/inviteAgency.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/recharge-agency-recruit',
|
|
name: 'recharge-agency-recruit',
|
|
component: () => import('../views/RechargeAgency/Recruit.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invitation-to-register',
|
|
name: 'invitation-to-register',
|
|
component: () => import('../views/Invitation/InvitationToRegister.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/lottery',
|
|
name: 'lottery',
|
|
component: () => import('../views/Activities/Lottery/Lottery.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/cash-out',
|
|
name: 'cash-out',
|
|
component: () => import('../views/Wallet/CashOut/CashOut.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/cash-out-details',
|
|
name: 'cash-out-details',
|
|
component: () => import('../views/Wallet/CashOut/Details.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/KYC',
|
|
name: 'KYC',
|
|
component: () => import('../views/Wallet/CashOut/KYC.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: '/bd-leader-center',
|
|
name: 'bd-leader-center',
|
|
component: () => import('../views/BDLeaderCenter/index.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
],
|
|
})
|
|
|
|
// 安装路由守卫
|
|
installRouteGuard(router)
|
|
|
|
export default router
|