优化支付逻辑,新增支付防抖

This commit is contained in:
weipengfei 2023-07-20 17:47:44 +08:00
parent 7e66b25348
commit 7d60d4a013

View File

@ -56,12 +56,15 @@
onShow() {},
methods: {
changePrice(index){
this.changeMoney = index;
if(this.changeMoney == index)this.changeMoney = -1;
else this.changeMoney = index;
if(this.priceList[index]=='自定义')this.payMoney.money = '';
else this.payMoney.money = this.priceList[index].split('元')[0];
},
//
pay(){
if(!this.payMoney.money)return Toast('请先填写充值金额!')
if(this.payMoney.money<=0)return Toast('充值金额不能小于0!')
if(!this.payTimer){
this.goRecharge();
this.payTimer = setInterval(()=>{