popup.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /* eslint-disable */
  2. import { createRouter, createWebHashHistory, createWebHistory } from "vue-router"
  3. import Tabcontent from '@/view/popup/tabbar-page/index.vue'
  4. import Home from '@/view/popup/tabbar-page/wallter/popup.vue'
  5. import NFT from '@/view/popup/tabbar-page/nft/index.vue'
  6. import Message from '@/view/popup/tabbar-page/message/index.vue'
  7. import More from '@/view/popup/tabbar-page/more/index.vue'
  8. import NFTDetail from '@/view/popup/tabbar-page/nft/detail.vue'
  9. import Withdraw from '@/view/popup/withdraw/index.vue'
  10. import WithdrawInfo from '@/view/popup/withdraw/info.vue'
  11. import WithdrawConfirm from '@/view/popup/withdraw/confirm.vue'
  12. import WithdrawSuccess from '@/view/popup/withdraw/success.vue'
  13. import RiskWarning from '@/view/popup/withdraw/risk-warning.vue'
  14. import WithdrawPaypal from '@/view/popup/withdraw/paypal.vue'
  15. import WithdrawHome from '@/view/popup/withdraw/home.vue'
  16. import Transactions from '@/view/popup/transactions.vue'
  17. import TopUp from '@/view/popup/top-up/index.vue'
  18. import TopUpInfo from '@/view/popup/top-up/info.vue'
  19. import TopUpHome from '@/view/popup/top-up/home.vue'
  20. import CurrencyDetail from '@/view/popup/currency-detail.vue'
  21. import Setting from '@/view/popup/setting/index.vue'
  22. // 2. 定义路由配置
  23. const routes = [
  24. {
  25. path: '/',
  26. name: 'tabcontent',
  27. component: Tabcontent,
  28. children: [
  29. {
  30. path: "",
  31. name: 'home',
  32. component: Home
  33. },
  34. {
  35. path: "NFT",
  36. name: 'NFT',
  37. component: NFT
  38. },
  39. {
  40. path: "message",
  41. name: 'message',
  42. component: Message
  43. },
  44. {
  45. path: "more",
  46. name: 'more',
  47. component: More
  48. },
  49. ]
  50. },
  51. {
  52. path: '/withdraw',
  53. name: 'withdraw',
  54. component: Withdraw,
  55. children: [
  56. {
  57. path: 'home',
  58. name: 'WithdrawHome',
  59. component: WithdrawHome
  60. },
  61. {
  62. path: 'info',
  63. name: 'WithdrawInfo',
  64. component: WithdrawInfo,
  65. },
  66. {
  67. path: 'confirm',
  68. name: 'WithdrawConfirm',
  69. component: WithdrawConfirm,
  70. },
  71. {
  72. path: 'risk',
  73. name: 'RiskWarning',
  74. component: RiskWarning,
  75. },
  76. {
  77. path: 'success',
  78. name: 'WithdrawSuccess',
  79. component: WithdrawSuccess,
  80. },
  81. {
  82. path: 'paypal',
  83. name: 'WithdrawPaypal',
  84. component: WithdrawPaypal,
  85. }
  86. ],
  87. },
  88. {
  89. path: '/top-up',
  90. name: 'TopUp',
  91. component: TopUp,
  92. children: [
  93. {
  94. path: 'home',
  95. name: 'TopUpHome',
  96. component: TopUpHome
  97. },
  98. {
  99. path: 'info',
  100. name: 'TopUpInfo',
  101. component: TopUpInfo
  102. },
  103. ]
  104. },
  105. {
  106. path: '/transactions',
  107. name: 'Transactions',
  108. component: Transactions
  109. },
  110. {
  111. path: '/NFTDetail',
  112. name: 'NFTDetail',
  113. component: NFTDetail
  114. },
  115. {
  116. path: '/currencyDetail',
  117. name: 'currencyDetail',
  118. component: CurrencyDetail
  119. },
  120. {
  121. path: '/setting',
  122. name: 'setting',
  123. component: Setting
  124. }
  125. ]
  126. // 3. 创建路由实例
  127. const router = createRouter({
  128. // 4. 采用hash 模式
  129. history: createWebHashHistory('popup.html'),
  130. // 采用 history 模式
  131. // history: createWebHistory('popup.html'),
  132. routes, // short for `routes: routes`
  133. });
  134. console.log(process.env.BASE_URL)
  135. export default router