popup.js 4.0 KB

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