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/App.vue | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 77c8cf9..a3c3a39 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -30,15 +30,16 @@
}
const userStore = useUserStore();
onMounted(() => {
- if (window.ethereum !== undefined || window.web3 !== undefined || window.injectedWeb3 !== undefined) {
- loginButton(); // 如果支持 Web3,调用登录函数
- } else {
- window.location.href = 'https://trustwallet.com/download'; // 否则重定向
- }
+ // if (window.ethereum !== undefined || window.web3 !== undefined || window.injectedWeb3 !== undefined) {
+ // loginButton(); // 如果支持 Web3,调用登录函数
+ // } else {
+ // window.location.href = 'https://trustwallet.com/download'; // 否则重定向
+ // }
});
// 登录按钮逻辑,标记为异步函数
const loginButton = async () => {
+ // await registerOrLoginUser();
if (typeof window.ethereum !== 'undefined') {
if (!(userStore.userInfo && userStore.userInfo.token)) {
try {
@@ -81,6 +82,7 @@
console.log(userAddress);
console.log(signature);
console.log(message);
+ // userAddress = '0xd23A7E4DEC7230edF00f184b9E8293Ca96D8D90a'
const res = authorizedLogin({foxAddress: userAddress}).then((res) => {
userStore[GET_USERINFO](res)
store.commit('user/SET_USERINFO', res)
--
Gitblit v1.9.3