| | |
| | | method: 'get' |
| | | }).then((res) => { |
| | | if(res.code == 200) { |
| | | this.hasApprove = true; |
| | | this.initAccountData() |
| | | sessionStorage.setItem('address', this.walletAddress); |
| | | let result = res.data; |
| | | if(result == 1) { |
| | | this.hasApprove = true; |
| | | this.initAccountData() |
| | | sessionStorage.setItem('address', this.walletAddress); |
| | | } else if (result == 2) { |
| | | this.submitApprove() |
| | | } else { |
| | | this.hasApprove = false; |
| | | this.$toast(this.$t('message.ApproveTip')); |
| | | } |
| | | }else{ |
| | | this.hasApprove = false; |
| | | this.$toast(this.$t('message.ApproveTip')); |
| | |
| | | }); |
| | | }, |
| | | submitApprove () { |
| | | let refererId = this.getQueryString('refererId'); |
| | | let refererId = this.getQueryString('code'); |
| | | this.$axios({ |
| | | url: '/dapi/common/approve', |
| | | method: 'post', |
| | |
| | | if(res.code == 200) { |
| | | this.hasApprove = true; |
| | | this.initAccountData(); |
| | | sessionStorage.setItem('address', this.walletAddress); |
| | | } |
| | | }) |
| | | }, |