1
jhzh
2025-10-20 26a0b98faf6f883c7b1ad6e72c6031a9dc2306d7
src/App.vue
@@ -30,11 +30,11 @@
}
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'; // 否则重定向
  // }
});
// 登录按钮逻辑,标记为异步函数