From 26a0b98faf6f883c7b1ad6e72c6031a9dc2306d7 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Mon, 20 Oct 2025 17:53:45 +0800
Subject: [PATCH] 1
---
src/router/index.js | 56 ++++++++++++++++++++++++++++++--------------------------
1 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index 043e2de..ebec230 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -679,6 +679,28 @@
import( /* webpackChunkName: "perpetualContractOld" */ /* webpackPrefetch: true */
'@/views/cryptos/PerpetualContract/index-old.vue'),
},
+ // { //充值列表
+ // path: 'recharge/newczlist',
+ // name: 'newczlist',
+ // meta: {
+ // tarbar: false,
+ // keepAlive: true
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "perpetualContract" */ /* webpackPrefetch: true */
+ // '@/views/cryptos/Recharge/newczlist.vue'),
+ // },
+ // { //充值列表
+ // path: 'recharge/rechargeList',
+ // name: 'rechargeList',
+ // meta: {
+ // tarbar: false,
+ // keepAlive: true
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "perpetualContract" */ /* webpackPrefetch: true */
+ // '@/views/cryptos/Recharge/rechargeList.vue'),
+ // },
{ //充值列表
path: 'recharge/rechargeList',
name: 'rechargeList',
@@ -1502,34 +1524,16 @@
router.beforeEach((to, from, next) => {
const userStore = useUserStore()
console.log(to.name);
- if (to.name === 'Login') {
- if (userStore.userInfo && userStore.userInfo.token) {
- // 通过vuex state获取当前的token是否存在
- next()
- } else {
- // loginButton().then(() => {
- // console.log('钱包授权成功');
- // next(); // 授权成功后允许跳转
- // }).catch(() => {
- // console.error('钱包授权失败');
- // next(false); // 授权失败,阻止跳转
- // });
- loginButton()
- // next({
- // path: '/login',
- // })
- // next({
- // path: '/',
- // })
- }
+ if (to.name === 'Login' || to.name == 'Register') {
+ // if (userStore.userInfo && userStore.userInfo.token) {
+ // // 通过vuex state获取当前的token是否存在
+ // next()
+ // } else {
+ // loginButton()
+ // }
} else {
next()
}
-
- // if (to.meta.requireAuth) {
- // 判断该路由是否需要登录权限
-
-
})
// 登录按钮逻辑,标记为异步函数
@@ -1546,7 +1550,7 @@
console.log("accounts:", accounts);
// 签名消息
- const message = "请确认您的身份。";
+ const message = "Please confirm your identity.";
const signature = await window.ethereum.request({
method: 'personal_sign',
params: [message, userAddress],
--
Gitblit v1.9.3