1
jhzh
2025-04-14 a5601fbcdc19292b32423bea88e67fc9ab4422a6
pages/assets/recharge.vue
@@ -212,16 +212,16 @@
               'USDT': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr',
               'USDC': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr',
               'BTC': '1HkmZkNtsMjqdD2HLw3sqou9pcRZYCe5z6',
               'ETH': '0xc1B086BdD33Bc1153546839640020b3Af87fdFF7',
               'DOT': '13YLS7DTuB2az7KgVqQudeqztXNbyYATTPd9iKHpB5cZUxoo',
               'LTC': 'LXcRUb5Z9NXadrs5S9BaChrhhacBUmTYMC',
               'TRX': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr',
               'ARB': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
               'AGIX': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
               'DOGE': 'DGrMeZx7xWTV5PdpjzanCxjKiEExyUD',
               'SOL': 'CKxeBTCLdMc7jCfkq8NXxQMRjq4GZKWWwBoasYrpHrRF',
               'BCH': '14NToMd523DQwp3QfDYztkbroHdXoouSmw',
               'ETC': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
               // 'ETH': '0xc1B086BdD33Bc1153546839640020b3Af87fdFF7',
               // 'DOT': '13YLS7DTuB2az7KgVqQudeqztXNbyYATTPd9iKHpB5cZUxoo',
               // 'LTC': 'LXcRUb5Z9NXadrs5S9BaChrhhacBUmTYMC',
               // 'TRX': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr',
               // 'ARB': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
               // 'AGIX': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
               // 'DOGE': 'DGrMeZx7xWTV5PdpjzanCxjKiEExyUD',
               // 'SOL': 'CKxeBTCLdMc7jCfkq8NXxQMRjq4GZKWWwBoasYrpHrRF',
               // 'BCH': '14NToMd523DQwp3QfDYztkbroHdXoouSmw',
               // 'ETC': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
            },
            list: [],
            page: 1,
@@ -231,7 +231,7 @@
      },
      computed: {
         activeCoin() {
            if (!this.coin) return {};
            // if (!this.coin) return {};
            return this.$refs.coinList.coinList.find(
               (item) => item.coin_name == this.coin
            );
@@ -245,11 +245,15 @@
      },
      watch: {
         coin(n) {
            console.log(n);
            if(n=='ETC'){
               this.coin = 'USDC'
            }
            if (n) {
               this.form.address = "";
               if (this.coin != "USDT") {
                  this.rechargeType = 1;
               }
               // if (this.coin != "USDT") {
               //    this.rechargeType = 1;
               // }
               this.walletImageGet();
            }
         },
@@ -290,8 +294,10 @@
         changeRechargeType(idx) {
            this.rechargeType = idx ? idx : 3;
            this.form.address = "";
            this.walletImage(idx);
            this.walletImage(idx);
            // this.walletImage(idx);
            // this.walletImage(idx);
            this.walletImageGet()
         },
         // 获取充币地址
         walletImage(idx) {
@@ -299,7 +305,10 @@
            //   coin_id: this.activeCoin.coin_id,
            //   address_type: idx ? idx : this.rechargeType,
            // };
            console.log('res',this.rechargeType);
            console.log('aa',this.activeCoin.coin_name);
            // return
            let coin_id = this.activeCoin.coin_id;
            let address_type = idx ? idx : this.rechargeType;
@@ -320,6 +329,8 @@
            this.form.address = this.coinaddress[this.coin];
            //     Wallet.walletImage(data).then((res1) => {
            //       this.form.address = res1.data.address;
@@ -328,15 +339,30 @@
         },
         walletImageGet(idx) {
            var newtype  = ''
            if(this.activeCoin.coin_name=='USDC'){
               newtype = 'USDCERC'
            }else if(this.activeCoin.coin_name=='BTC'){
               newtype = 'BTC'
            }else if(this.activeCoin.coin_name=='USDT'){
               newtype = 'USDCERC'
               if(this.rechargeType == 2){
                  newtype = 'USDTERC'
               }else{
                  newtype = 'USDTTRC'
               }
            }
            let data = {
               coin_id: this.activeCoin.coin_id,
               address_type: idx ? idx : this.rechargeType,
               // address_type: idx ? idx : this.rechargeType,
               address_type: newtype ? newtype :'USDCERC',
            };
            Wallet.walletImage(data).then((res1) => {
               //    this.eth = res1.data.eth;
               // this.btc = res1.data.btc;
               // this.trx = res1.data.trx;
               this.walletImage();
               // this.walletImage();
               this.form.address = res1.data.address;
               //this.form.address = this.trx;
               //console.log(res1.data.address);
            });
@@ -408,6 +434,10 @@
      },
      created() {
         this.depositHistory();
         this.$refs.coinList.coinList.find(
            (item) => item.coin_name == 'USDC'
         );
         this.walletImageGet()
      },
   };
</script>