| | |
| | | <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"> |
| | |
| | | methods: { |
| | | // 获取地址 |
| | | async getAddress () { |
| | | let address = 'TUy8XwDmdsDKPLDGUrGuNRVMhwSEKtkDcD'; |
| | | let address = ''; |
| | | if(window.ethereum) { |
| | | await window.ethereum.enable(); |
| | | const accounts = await ethereum.request({ method: 'eth_accounts' }); |
| | |
| | | }).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(); |
| | | } |
| | | } |
| | | } |