popup.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* eslint-disable */
  2. import { createRouter, createWebHashHistory, createWebHistory } from "vue-router"
  3. import Home from '@/view/popup/popup.vue'
  4. import Withdraw from '@/view/popup/withdraw/index.vue'
  5. import WithdrawInfo from '@/view/popup/withdraw/info.vue'
  6. import WithdrawConfirm from '@/view/popup/withdraw/confirm.vue'
  7. import WithdrawSuccess from '@/view/popup/withdraw/success.vue'
  8. import RiskWarning from '@/view/popup/withdraw/risk-warning.vue'
  9. import WithdrawPaypal from '@/view/popup/withdraw/paypal.vue'
  10. import WithdrawHome from '@/view/popup/withdraw/home.vue'
  11. import Transactions from '@/view/popup/transactions.vue'
  12. import TopUp from '@/view/popup/top-up/index.vue'
  13. import TopUpInfo from '@/view/popup/top-up/info.vue'
  14. import TopUpHome from '@/view/popup/top-up/home.vue'
  15. // 2. 定义路由配置
  16. const routes = [
  17. {
  18. path: "/",
  19. name: 'home',
  20. component: Home
  21. },
  22. {
  23. path: '/withdraw',
  24. name: 'withdraw',
  25. component: Withdraw,
  26. children: [
  27. {
  28. path: 'home',
  29. name: 'WithdrawHome',
  30. component: WithdrawHome
  31. },
  32. {
  33. path: 'info',
  34. name: 'WithdrawInfo',
  35. component: WithdrawInfo,
  36. },
  37. {
  38. path: 'confirm',
  39. name: 'WithdrawConfirm',
  40. component: WithdrawConfirm,
  41. },
  42. {
  43. path: 'risk',
  44. name: 'RiskWarning',
  45. component: RiskWarning,
  46. },
  47. {
  48. path: 'success',
  49. name: 'WithdrawSuccess',
  50. component: WithdrawSuccess,
  51. },
  52. {
  53. path: 'paypal',
  54. name: 'WithdrawPaypal',
  55. component: WithdrawPaypal,
  56. }
  57. ],
  58. },
  59. {
  60. path: '/top-up',
  61. name: 'TopUp',
  62. component: TopUp,
  63. children: [
  64. {
  65. path: 'home',
  66. name: 'TopUpHome',
  67. component: TopUpHome
  68. },
  69. {
  70. path: 'info',
  71. name: 'TopUpInfo',
  72. component: TopUpInfo
  73. },
  74. ]
  75. },
  76. {
  77. path: '/transactions',
  78. name: 'Transactions',
  79. component: Transactions
  80. }
  81. ]
  82. // 3. 创建路由实例
  83. const router = createRouter({
  84. // 4. 采用hash 模式
  85. history: createWebHashHistory('popup.html'),
  86. // 采用 history 模式
  87. // history: createWebHistory('popup.html'),
  88. routes, // short for `routes: routes`
  89. });
  90. console.log(process.env.BASE_URL)
  91. export default router