| | |
| | | <OrePool></OrePool> |
| | | </van-tab> |
| | | <van-tab :title='$t("message.Account")'> |
| | | <Account></Account> |
| | | <Account :ref="accountRef"></Account> |
| | | </van-tab> |
| | | </van-tabs> |
| | | <van-overlay :show="isShowApproveModal" @click="isShowApproveModal = false" class="wrapper"> |
| | |
| | | }, |
| | | setup() { |
| | | const { proxy } = getCurrentInstance(); |
| | | let accountRef = ref(null); |
| | | let walletAddress = ref(''); |
| | | let hasApprove = ref(false); |
| | | let isShowApproveModal = ref(false); |
| | |
| | | |
| | | walletAddress, //地址 |
| | | hasApprove, //是否授权 |
| | | myAccountInfo: reactive({}) |
| | | |
| | | accountRef |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | isApprove () { |
| | | this.$axios({ |
| | | url: '/dapp/common/isApprove/' + this.walletAddress, |
| | | url: '/dapi/common/isApprove/' + this.walletAddress, |
| | | method: 'get' |
| | | }).then((res) => { |
| | | if(res.code == 200) { |
| | | this.hasApprove = true; |
| | | this.getWalletInfo() |
| | | this.initAccountData() |
| | | sessionStorage.setItem('address', this.walletAddress); |
| | | }else{ |
| | | this.hasApprove = false; |
| | |
| | | }, |
| | | submitApprove () { |
| | | this.$axios({ |
| | | url: '/dapp/common/approve', |
| | | url: '/dapi/common/approve', |
| | | method: 'post', |
| | | data: { |
| | | address: this.walletAddress, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getWalletInfo(){ |
| | | initAccountData(){ |
| | | // this.accountRef.value.getWalletInfo(); |
| | | alert(accountRef) |
| | | this.$axios({ |
| | | url: '/dapp/member/walletInfo', |
| | | url: '/dapi/member/walletInfo', |
| | | method: 'post' |
| | | }).then((res) => { |
| | | if(res.code == 200) { |