From 72282fac661b3e48a097ddb85742fb31dbbad188 Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Thu, 24 Mar 2022 14:47:48 +0800
Subject: [PATCH] gx

---
 src/pages/index/index.vue |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 95299ca..3a9265d 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -27,7 +27,7 @@
                 <OrePool></OrePool>
             </van-tab>
             <van-tab :title='$t("message.Account")'>
-              <Account :ref="accountRef"></Account>
+              <Account ref="accountRef"></Account>
             </van-tab>
         </van-tabs>
         <van-overlay :show="isShowApproveModal" @click="isShowApproveModal = false" class="wrapper">
@@ -177,7 +177,7 @@
   methods: {
     // 获取地址
     async getAddress () {
-      let address = 'TUy8XwDmdsDKPLDGUrGuNRVMhwSEKtkDcD';
+      let address = '';
       if(window.ethereum) {
         await window.ethereum.enable();
         const accounts = await ethereum.request({ method: 'eth_accounts' });
@@ -250,20 +250,12 @@
         }).then((res) => {
           if(res.code == 200) {
             this.hasApprove = true;
+            this.initAccountData();
           }
         })
     },
     initAccountData(){
-        // this.accountRef.value.getWalletInfo();
-        alert(accountRef)
-        this.$axios({
-          url: '/dapi/member/walletInfo',
-          method: 'post'
-        }).then((res) => {
-          if(res.code == 200) {
-            this.myAccountInfo = res.data;
-          }
-        })
+        this.accountRef && this.accountRef.value.getWalletInfo();
     }
   }
 }

--
Gitblit v1.9.1