['红包提现,红包转化默认值处理优化']

This commit is contained in:
2021-11-23 10:59:20 +08:00
parent 4611cb984e
commit 02a59e7720
2 changed files with 26 additions and 17 deletions

View File

@@ -7,16 +7,17 @@
<span>( {{ cost || '0.00' }} CNY)</span>
</view>
<view class="balance">{{ balance || '0.00' }}</view>
<!-- <view class="frozen" @click="withdrawDetail">提现记录</view> -->
<!-- <view class="frozen" @click="withdrawDetail">提现记录</view> -->
</view>
</view>
<view class="withdrawing-content">
<view class="item">
<view style="flex: 1;">
<view class="inputTxt">提现数量</view>
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;"
placeholder="请输入提现数量" :disabled="balance===0" />
<input class="input_num" ref='inputNumber' v-model="withdraw_input" @input='inputNum'
:value="withdraw_input" type="number"
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现数量"
:disabled="balance===0" />
</view>
<view class="all" @click="all">全部提现</view>
</view>
@@ -44,7 +45,7 @@
withdraw_input: '', // 提现通证数量
bank_accounts: 0,
bankInfo: {},
certification:false,//默认没有认证
certification: false, //默认没有认证
};
},
onLoad() {
@@ -60,10 +61,10 @@
// 提现基本信息
getInfo() {
cashsCreate().then(res => {
this.withdraw_input = Number(res.balance)
// this.withdraw_input = Number(res.balance)
this.balance = res.balance
this.cost = res.cost
this.total = Number(res.balance) * Number(res.cost)
// this.total = Number(res.balance) * Number(res.cost)
this.certification = res.certification
uni.setStorageSync('refresh', false)
}).catch(err => {
@@ -73,6 +74,7 @@
})
})
},
// 输入提现通证数量
inputNum(e) {
let number = Number(e.detail.value)
@@ -92,10 +94,13 @@
uni.showToast({
title: '最大值能超过' + this.balance + '',
icon: 'none',
duration: 2000
duration: 2000,
mask: true
});
this.withdraw_input = this.balance
this.total = this.balance * this.cost
this.$nextTick(() => {
this.withdraw_input = this.balance
this.total = this.balance * this.cost
})
}
}
},
@@ -106,7 +111,7 @@
this.total = this.balance * this.cost
} else {
uni.showToast({
title: '啥也没有,我也做不到~',
title: '请核对提现金额~',
icon: 'none',
duration: 2000
})
@@ -145,7 +150,7 @@
}
uni.showModal({
title: '温馨提示',
content:'您是否确认提现到现金红包账户,交易将免手续费',
content: '您是否确认提现到现金红包账户,交易将免手续费',
confirmColor: '#7c52fc',
cancelColor: '#cacaca',
cancelText: '我再想想',

View File

@@ -23,7 +23,7 @@
<view class="item">
<view style="flex: 1;">
<view class="inputTxt">提现金额</view>
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number" placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现金额" :disabled="balance===0" />
<input class="input_num" ref='inputNuber' v-model="withdraw_input" @input='inputNum' type="number" placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现金额" :disabled="balance===0" />
</view>
<view class="all" @click="all">全部提现</view>
</view>
@@ -96,7 +96,7 @@
this.balance = res.balance
this.tax = res.tax
this.bank_accounts = res.bank_accounts.length
this.withdraw_input = Number(res.balance)
// this.withdraw_input = Number(res.balance)
this.certification = res.certification
uni.setStorageSync('refresh', false)
}).catch(err => {
@@ -117,16 +117,20 @@
uni.showToast({
title: '当前不能提现',
icon: 'none',
duration: 2000
duration: 2000,
mask: true
});
this.withdraw_input = 0
} else {
uni.showToast({
title: '最大值能超过' + this.balance + '',
icon: 'none',
duration: 2000
duration: 2000,
mask: true
});
this.withdraw_input = this.balance
this.$nextTick(() => {
this.withdraw_input = this.balance
})
}
}
},