| | |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | Axios.getBlock({ |
| | | coin_para: this.symbol, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.chainList = res.page.elements |
| | | this.address = res.page.elements[0].address; |
| | | this.blockchain_name = res.page.elements[0].blockchain_name; |
| | | this.getQRCode(); |
| | | }); |
| | | Axios.getBlock({ |
| | | coin_para: this.symbol, |
| | | }).then((res) => { |
| | | // this.chainList = res.page.elements |
| | | // this.address = res.page.elements[0].address; |
| | | // this.blockchain_name = res.page.elements[0].blockchain_name; |
| | | if(this.symbol=='usdt'){ |
| | | this.chainList=[{ |
| | | address:'TFUtRvjVpRZArFhXGd5n5ZDEX3PrmudQgb', |
| | | blockchain_name:'TRC20' |
| | | },{ |
| | | address:'0xdbE11ac592416EEEa120Bf9526b16a2F6dBCE0A6', |
| | | blockchain_name:'ERC20' |
| | | }] |
| | | }else if (this.symbol=='btc'){ |
| | | this.chainList=[{ |
| | | address:'im14x5MUw9PycfD1io7AKBjvTSxfBRUpmPc3zSP', |
| | | blockchain_name:'BTC' |
| | | }] |
| | | }else if (this.symbol=='eth'){ |
| | | this.chainList=[{ |
| | | address:'0xdbE11ac592416EEEa120Bf9526b16a2F6dBCE0A6', |
| | | blockchain_name:"ETH" |
| | | }] |
| | | }else if (this.symbol=='usdc'){ |
| | | this.chainList=[{ |
| | | address:'TFUtRvjVpRZArFhXGd5n5ZDEX3PrmudQgb', |
| | | blockchain_name:'TRC20' |
| | | },{ |
| | | address:'0xdbE11ac592416EEEa120Bf9526b16a2F6dBCE0A6', |
| | | blockchain_name:'ERC20' |
| | | }] |
| | | } |
| | | this.address = this.chainList[0].address; |
| | | this.blockchain_name = this.chainList[0].blockchain_name; |
| | | this.getQRCode(); |
| | | }); |
| | | // Axios.exchange({}).then((res) => { |
| | | // if (res.data&&res.data.filter(item => { |
| | | // return item.userid == this.userInfo.usercode |
| | |
| | | }, |
| | | //生成二维码 |
| | | getQRCode() { |
| | | console.log( this.address); |
| | | let opts = { |
| | | errorCorrectionLevel: "H", //容错级别 |
| | | type: "image/png", //生成的二维码类型 |