From d157d0892f1ab5517dbe3a08328ccb9c4e446615 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sun, 20 Apr 2025 15:39:03 +0800
Subject: [PATCH] 1
---
pages/assets/recharge.vue | 122 +++++++++++++++++++++++++---------------
1 files changed, 76 insertions(+), 46 deletions(-)
diff --git a/pages/assets/recharge.vue b/pages/assets/recharge.vue
index e7432ff..df4cf16 100644
--- a/pages/assets/recharge.vue
+++ b/pages/assets/recharge.vue
@@ -71,7 +71,8 @@
<!-- <view class="label w-100">{{$t('assets.e7')}}</view> -->
<view
class="border-r w-10/12 autowidth p-x-md p-y-ms address-txt p-x-xs flex-fill color-light fn-center bg-form-panel-3 rounded-xs">
- {{form.address}}</view>
+ {{form.address}}
+ </view>
<!-- #ifndef H5 -->
<view style="border-radius: 10px;
background: linear-gradient(180deg, #ED493B 0%, #FA6D4A 100%);
@@ -92,29 +93,24 @@
<view class="address d-flex align-center justify-between p-t-xs m-b-md" style=" width: 90%;
margin: auto;
text-align: center;margin-top: 20px;">
- <view class="label w-30" style="background-color: #fff;">
- <img src="static/img/icon/num.png" alt="" class="h-20" /></view>
- <v-input
- type="number"
- :placeholder="$t('assets.e8')"
- class="border-b flex-fill p-y-xs color-light"
-
- v-model="form.amount"
- />
- </view>
- <view class="address d-flex align-center justify-between p-t-xs m-b-md" style=" width: 90%;
+ <view class="label w-30" style="background-color: #fff;">
+ <img src="static/img/icon/num.png" alt="" class="h-20" />
+ </view>
+ <v-input type="number" :placeholder="$t('assets.e8')"
+ class="border-b flex-fill p-y-xs color-light" v-model="form.amount" />
+ </view>
+ <!-- <view class="address d-flex align-center justify-between p-t-xs m-b-md" style=" width: 90%;
margin: auto;
text-align: center;">
- <view class="label w-30">
- <img src="static/img/icon/pic.png" alt="" class="h-20" /></view>
- <div
- @click="getFile('images')"
- class="upload-box d-flex justify-center align-center rounded-sm bg-panel-3 box-shadow border-b flex-fill p-y-xs color-light"
- >
- <view v-if="!form.images">{{$t('common.a8')}}</view>
- <img v-else :src="form.images" alt style="max-width:100%" />
- </div>
- </view>
+ <view class="label w-30">
+ <img src="static/img/icon/pic.png" alt="" class="h-20" />
+ </view>
+ <div @click="getFile('images')"
+ class="upload-box d-flex justify-center align-center rounded-sm bg-panel-3 box-shadow border-b flex-fill p-y-xs color-light">
+ <view v-if="!form.images">{{$t('common.a8')}}</view>
+ <img v-else :src="form.images" alt style="max-width:100%" />
+ </div>
+ </view> -->
<view @click="recharge" style="border-radius: 10px;
background: linear-gradient(to right, #f6c769, #f3b644);
@@ -206,22 +202,22 @@
images: "",
},
btc: "1HkmZkNtsMjqdD2HLw3sqou9pcRZYCe5z6",
- eth: "0xc1B086BdD33Bc1153546839640020b3Af87fdFF7",
+ eth: "TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr",
trx: "TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr",
coinaddress: {
'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': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr',
+ // 'DOT': '13YLS7DTuB2az7KgVqQudeqztXNbyYATTPd9iKHpB5cZUxoo',
+ // 'LTC': 'LXcRUb5Z9NXadrs5S9BaChrhhacBUmTYMC',
+ // 'TRX': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr',
+ // 'ARB': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
+ // 'AGIX': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
+ // 'DOGE': 'DGrMeZx7xWTV5PdpjzanCxjKiEExyUD',
+ // 'SOL': 'CKxeBTCLdMc7jCfkq8NXxQMRjq4GZKWWwBoasYrpHrRF',
+ // 'BCH': '14NToMd523DQwp3QfDYztkbroHdXoouSmw',
+ // 'ETC': '0xfd2e5dd25bf2b316b685aa932cb2a2555f5654ba',
},
list: [],
page: 1,
@@ -231,7 +227,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 +241,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 +290,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 +301,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 +325,8 @@
this.form.address = this.coinaddress[this.coin];
+
+
// Wallet.walletImage(data).then((res1) => {
// this.form.address = res1.data.address;
@@ -328,15 +335,32 @@
},
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 == 'ETH') {
+ newtype = 'ETH'
+ }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);
});
@@ -351,16 +375,18 @@
if (this.form.amount <= 0) {
return
}
- if (this.form.images == "") {
- return
- }
+ // if (this.form.images == "") {
+ // return
+ // }
Wallet.recharge(this.form, {
btn: this.$refs.btn
})
.then(() => {
- this.$back();
this.$toast.success(this.$t('assets.d5') + "!");
- this.reset();
+ setTimeout(()=>{
+ this.$back();
+ this.reset();
+ },1000)
})
.catch(() => {});
},
@@ -408,6 +434,10 @@
},
created() {
this.depositHistory();
+ this.$refs.coinList.coinList.find(
+ (item) => item.coin_name == 'USDC'
+ );
+ this.walletImageGet()
},
};
</script>
--
Gitblit v1.9.3