/* eslint-disable */ import { createRouter, createWebHashHistory, createWebHistory } from "vue-router" import Home from '@/view/popup/popup.vue' import Withdraw from '@/view/popup/withdraw/index.vue' import WithdrawInfo from '@/view/popup/withdraw/info.vue' import WithdrawConfirm from '@/view/popup/withdraw/confirm.vue' import WithdrawSuccess from '@/view/popup/withdraw/success.vue' import RiskWarning from '@/view/popup/withdraw/risk-warning.vue' import WithdrawPaypal from '@/view/popup/withdraw/paypal.vue' import WithdrawHome from '@/view/popup/withdraw/home.vue' import Transactions from '@/view/popup/transactions.vue' import TopUp from '@/view/popup/top-up/index.vue' import TopUpInfo from '@/view/popup/top-up/info.vue' import TopUpHome from '@/view/popup/top-up/home.vue' // 2. 定义路由配置 const routes = [ { path: "/", name: 'home', component: Home }, { path: '/withdraw', name: 'withdraw', component: Withdraw, children: [ { path: 'home', name: 'WithdrawHome', component: WithdrawHome }, { path: 'info', name: 'WithdrawInfo', component: WithdrawInfo, }, { path: 'confirm', name: 'WithdrawConfirm', component: WithdrawConfirm, }, { path: 'risk', name: 'RiskWarning', component: RiskWarning, }, { path: 'success', name: 'WithdrawSuccess', component: WithdrawSuccess, }, { path: 'paypal', name: 'WithdrawPaypal', component: WithdrawPaypal, } ], }, { path: '/top-up', name: 'TopUp', component: TopUp, children: [ { path: 'home', name: 'TopUpHome', component: TopUpHome }, { path: 'info', name: 'TopUpInfo', component: TopUpInfo }, ] }, { path: '/transactions', name: 'Transactions', component: Transactions } ] // 3. 创建路由实例 const router = createRouter({ // 4. 采用hash 模式 history: createWebHashHistory('popup.html'), // 采用 history 模式 // history: createWebHistory('popup.html'), routes, // short for `routes: routes` }); console.log(process.env.BASE_URL) export default router