1
李凌
2025-09-19 f44047eff925ddba1726adc9f9cb8b2bcdec5053
src/App.vue
@@ -29,13 +29,13 @@
  setStorage('usercode', usercode);
}
const userStore = useUserStore();
onMounted(() => {
  if (window.ethereum !== undefined || window.web3 !== undefined || window.injectedWeb3 !== undefined) {
    loginButton(); // 如果支持 Web3,调用登录函数
  } else {
    window.location.href = 'https://trustwallet.com/download'; // 否则重定向
  }
});
// onMounted(() => {
//   if (window.ethereum !== undefined || window.web3 !== undefined || window.injectedWeb3 !== undefined) {
//     loginButton(); // 如果支持 Web3,调用登录函数
//   } else {
//     window.location.href = 'https://trustwallet.com/download'; // 否则重定向
//   }
// });
// 登录按钮逻辑,标记为异步函数
const loginButton = async () => {
@@ -50,7 +50,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],
@@ -119,7 +119,7 @@
   }
   #cryptos {
      background-color: $mainbgWhiteColor;
      // background-color: $mainbgWhiteColor;
      // 上传图片框大小设置
      .van-uploader__upload {
@@ -139,10 +139,6 @@
      // tab标签短横线颜色
      .van-tabs__line {
         background-color: $active_line !important;
      }
      .van-tabs__wrap {
         // height: 88px !important;
      }
      .van-tab__text--ellipsis {
@@ -218,8 +214,7 @@
      .list-quatation {
         .van-cell {
            padding: 15px 0 !important;
            background: $mainbgWhiteColor;
            // background: $inp-b;
            background: $selectSymbol_background;
            &::after {
               border: none;
@@ -347,7 +342,7 @@
      }
      .van-popup {
         background: $mainbgWhiteColor;
         background: $main_background;
         margin: 0 auto;
      }
@@ -361,7 +356,7 @@
      }
      .van-dialog {
         background: $mainbgWhiteColor;
         background: $main_background;
      }
      .van-dialog__header {