diff --git a/src/router/index.js b/src/router/index.js index 0767ab5..cee757e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -251,6 +251,12 @@ const router = createRouter({ 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 }, + }, ], }) diff --git a/src/utils/permissionManager.js b/src/utils/permissionManager.js index d93df98..d1e7d8a 100644 --- a/src/utils/permissionManager.js +++ b/src/utils/permissionManager.js @@ -120,6 +120,7 @@ export const ROLE_PERMISSIONS = { '/recharge-agency-recruit', //充值代理介绍页面 '/invitation-to-register', //邀请新用户注册页面 '/lottery', // 抽奖活动页面 + '/cash-out', // 提现页面 ], // 加载页面 diff --git a/src/utils/routeGuard.js b/src/utils/routeGuard.js index c39b01e..ff9e275 100644 --- a/src/utils/routeGuard.js +++ b/src/utils/routeGuard.js @@ -411,6 +411,7 @@ class RouteGuard { '/recharge-agency-recruit', //充值代理介绍页面 '/invitation-to-register', //邀请新用户注册页面 '/lottery', // 抽奖活动页面 + '/cash-out', // 提现页面 ] return publicPages.includes(path) } diff --git a/src/views/Activities/Lottery/Lottery.vue b/src/views/Activities/Lottery/Lottery.vue index ac9d8ba..f11d901 100644 --- a/src/views/Activities/Lottery/Lottery.vue +++ b/src/views/Activities/Lottery/Lottery.vue @@ -377,7 +377,10 @@ -
+
Go to withdraw
@@ -958,10 +961,16 @@ const clearPayee = () => { clearSelectedPayee() } +// 前往搜索代理页 const searchPayee = () => { router.push({ path: '/search-payee', query: { from: 'lottery' } }) } +// 前往提现页 +const goToWithdraw = () => { + router.push('/cash-out') +} + // 转账金币选项 const coinOptions = ref([ { id: 1, amount: 10500, price: 1 }, @@ -1307,7 +1316,9 @@ const getRanking = async () => { if (resRanking.status && resRanking.body) { ranking.value = resRanking.body // 在排行榜中查我的信息 - const myInfo = ranking.value.find((item) => item.account === userInfo.value.account) + const myInfo = ranking.value.find((item) => item.account == userInfo.value.account) + console.log('myInfo:', myInfo) + if (myInfo) { userInfo.value = userInfo.value == {} ? myInfo : Object.assign(userInfo.value, myInfo) } diff --git a/src/views/Wallet/CashOut/CashOut.vue b/src/views/Wallet/CashOut/CashOut.vue new file mode 100644 index 0000000..b096c63 --- /dev/null +++ b/src/views/Wallet/CashOut/CashOut.vue @@ -0,0 +1,7 @@ + + + + +