Browse Source

优化

master
ltlzx 4 years ago
parent
commit
ec48bded23
  1. 9
      api/serve/index.js
  2. 12
      pages/assets/draw.vue

9
api/serve/index.js

@ -82,10 +82,11 @@ x.fn = x.prototype = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let reg=new RegExp('/','g')//g代表全部 let reg=new RegExp('/','g')//g代表全部
let newMsg=options.url.replace(reg,'_'); let newMsg=options.url.replace(reg,'_');
// console.info(newMsg)
if(Cache.get(newMsg).data){ if(Cache.get(newMsg).data){
if(newMsg!='_user_walletImage'){ if(newMsg!='_user_walletImage' && newMsg!='_user_withdrawalBalance'){
resolve(Cache.get(newMsg).data); resolve(Cache.get(newMsg).data);
} }
uni.request({ uni.request({
url: this.url, url: this.url,
data: this.data, data: this.data,
@ -94,7 +95,7 @@ x.fn = x.prototype = {
dataType: this.dataType, dataType: this.dataType,
sslVerify: false, sslVerify: false,
success: (res) => { success: (res) => {
// console.info(res) // console.info(res)
let message = res.data.message let message = res.data.message
let code = res.data.code let code = res.data.code
if (code != 200) { if (code != 200) {

12
pages/assets/draw.vue

@ -84,7 +84,8 @@
<!-- <span class="color-light">{{ withdrawFee.withdrawal_fee }} {{coin}}</span> --> <!-- <span class="color-light">{{ withdrawFee.withdrawal_fee }} {{coin}}</span> -->
</view> </view>
<view class="d-flex align-end p-y-xs justify-between bg-form-panel-3 rounded-xs p-y-sm"> <view class="d-flex align-end p-y-xs justify-between bg-form-panel-3 rounded-xs p-y-sm">
<v-input v-model="withdrawFee.withdrawal_fee" disabled class="p-x-ms color-light w-max fn-13 rounded-xs" :placeholder="$t('assets.b9')">
<v-input v-model="coin=='USDT'&&rechargeType==3?withdrawFee.trc20:withdrawFee.withdrawal_fee" disabled class="p-x-ms color-light w-max fn-13 rounded-xs" :placeholder="$t('assets.b9')">
<template #right> <template #right>
{{coin}} {{coin}}
</template> </template>
@ -197,8 +198,8 @@ export default {
withdrawFee: {}, withdrawFee: {},
list: [], list: [],
page: 1, page: 1,
loadMore: true, loadMore: true,
secondaryShow:false secondaryShow:false
}; };
}, },
computed: { computed: {
@ -215,7 +216,9 @@ export default {
this.form.address = ""; this.form.address = "";
if (this.coin != "USDT") { if (this.coin != "USDT") {
this.rechargeType = 1; this.rechargeType = 1;
} }else{
this.rechargeType = 3;
}
this.withdrawalBalance(); this.withdrawalBalance();
} }
}, },
@ -251,6 +254,7 @@ export default {
address_type:this.rechargeType address_type:this.rechargeType
}; };
Wallet.withdrawalBalance(data).then((res) => { Wallet.withdrawalBalance(data).then((res) => {
// console.info(res)
this.withdrawFee = res.data; this.withdrawFee = res.data;
}); });
}, },

Loading…
Cancel
Save