375 lines
11 KiB
JavaScript
375 lines
11 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/LandingPage/LoadingView.vue'),
|
|
meta: { requiresAuth: false, isPublic: true },
|
|
},
|
|
{
|
|
path: '/loading',
|
|
name: 'loading',
|
|
component: () => import('../views/LandingPage/LoadingView.vue'),
|
|
meta: { requiresAuth: false, isPublic: true },
|
|
},
|
|
{
|
|
path: '/host-center',
|
|
name: 'host-center',
|
|
component: () => import('../views/HostCenter/HostCenter.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',
|
|
name: 'apply',
|
|
component: () => import('../views/ApplyHost/ApplyView.vue'),
|
|
meta: { requiresAuth: false },
|
|
},
|
|
{
|
|
path: '/message',
|
|
name: 'message',
|
|
component: () => import('../views/AgencyCenter/Message.vue'),
|
|
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',
|
|
name: 'agency-setting',
|
|
component: () => import('../views/AgencyCenter/AgencySetting.vue'),
|
|
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',
|
|
name: 'team-bill',
|
|
component: () => import('../views/AgencyCenter/TeamBill.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/team-member',
|
|
name: 'team-member',
|
|
component: () => import('../views/AgencyCenter/TeamMember.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/platform-policy',
|
|
name: 'platform-policy',
|
|
component: () => import('../views/PlatformPolicy/PlatformPolicy.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: '/not_app',
|
|
name: 'not-app',
|
|
component: () => import('../views/LandingPage/NotAppView.vue'),
|
|
meta: { requiresAuth: false },
|
|
},
|
|
// 404 页面
|
|
{
|
|
path: '/:pathMatch(.*)*',
|
|
name: 'not-found',
|
|
redirect: '/apply',
|
|
},
|
|
{
|
|
path: '/history-salary',
|
|
name: 'history-salary',
|
|
component: () => import('../views/Wallet/Detail/HistorySalary.vue'),
|
|
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/Recharge.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/recharge-freight-agent',
|
|
name: 'recharge-freight-agent',
|
|
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',
|
|
name: 'pay-result',
|
|
component: () => import('../views/Wallet/PayResult/payResult.vue'),
|
|
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: '/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 },
|
|
},
|
|
{
|
|
path: '/invitation-to-register',
|
|
name: 'invitation-to-register',
|
|
component: () => import('../views/Invitation/InviteToRegister.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invite-bd-leader',
|
|
name: 'invite-bd-leader',
|
|
component: () => import('../views/Invitation/inviteBDLeader.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invite-bd',
|
|
name: 'invite-bd',
|
|
component: () => import('../views/Invitation/inviteBD.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invite-recharge-agency',
|
|
name: 'invite-recharge-agency',
|
|
component: () => import('../views/Invitation/inviteRechargeAgency.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invite-agency',
|
|
name: 'invite-agency',
|
|
component: () => import('../views/Invitation/inviteAgency.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/invite-members',
|
|
name: 'invite-members',
|
|
component: () => import('../views/AgencyCenter/InviteMembersProcess.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/policy',
|
|
name: 'policy',
|
|
component: () => import('../views/BDCenter/policy.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/recharge-reward',
|
|
name: 'recharge-reward',
|
|
component: () => import('../views/Activities/Reward/RechargeReward.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/revolution-unity-day',
|
|
name: 'revolution-unity-day',
|
|
component: () => import('../views/Activities/RevolutionUnityDay/index.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/heroes-day',
|
|
name: 'heroes-day',
|
|
component: () => import('../views/Activities/heroesDay/index.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/bank-card',
|
|
name: 'bank-card',
|
|
component: () => import('../views/Wallet/CashOut/BankCard.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/independence-day',
|
|
name: 'independence-day',
|
|
component: () => import('../views/Activities/Palestinian/IndependenceDay/index.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/oman-national-day',
|
|
name: 'oman-national-day',
|
|
component: () => import('../views/Activities/Oman/NationalDay/index.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/Lebanon-independence-day',
|
|
name: 'Lebanon-independence-day',
|
|
component: () => import('../views/Activities/Lebanon/IndependenceDay/index.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
{
|
|
path: '/Yemen-independence-day',
|
|
name: 'Yemen-independence-day',
|
|
component: () => import('../views/Activities/Yemen/IndependenceDay/index.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: '/activity-game',
|
|
name: 'activity-game',
|
|
component: () => import('../views/Activities/Game/index.vue'),
|
|
meta: { requiresAuth: true },
|
|
},
|
|
],
|
|
})
|
|
|
|
// 安装路由守卫
|
|
installRouteGuard(router)
|
|
|
|
export default router
|