tianyi 1 month ago
parent
commit
f86f9ab3cb
  1. 65
      pages/shop/wallet.vue

65
pages/shop/wallet.vue

@ -256,7 +256,10 @@
this.syncActiveWallet() this.syncActiveWallet()
this.$forceUpdate(); this.$forceUpdate();
} else { } else {
this.tui.toast(res.message) uni.showToast({
title: res.message,
icon: 'none'
})
} }
uni.hideLoading() uni.hideLoading()
}) })
@ -370,35 +373,56 @@
let that = this let that = this
if (!this.lockWithdrawClick()) return if (!this.lockWithdrawClick()) return
if (this.submittingWithdraw) { if (this.submittingWithdraw) {
that.tui.toast('提现处理中,请勿重复提交') uni.showToast({
title: '提现处理中,请勿重复提交',
icon: 'none'
})
return return
} }
const amount = Number(this.commionAmount) const amount = Number(this.commionAmount)
const maxAmount = Number(this.withdrawMaxAmount) || 0 const maxAmount = Number(this.withdrawMaxAmount) || 0
if(!amount || amount < 1){ if(!amount || amount < 1){
that.tui.toast('提现金额不能小于1元') uni.showToast({
title: '提现金额不能小于1元',
icon: 'none'
})
return return
} }
if(amount > 5000){ if(amount > 5000){
that.tui.toast('单笔提现金额不能超过5000元') uni.showToast({
title: '单笔提现金额不能超过5000元',
icon: 'none'
})
return return
} }
if(amount > maxAmount){ if(amount > maxAmount){
that.tui.toast('提现金额不能超过可提现金额') uni.showToast({
title: '提现金额不能超过可提现金额',
icon: 'none'
})
return return
} }
const aliName = (this.aliName || '').trim() const aliName = (this.aliName || '').trim()
const aliAccount = (this.aliAccount || '').trim() const aliAccount = (this.aliAccount || '').trim()
if(!aliName){ if(!aliName){
that.tui.toast('支付宝实名名称不能为空') uni.showToast({
title: '支付宝实名名称不能为空',
icon: 'none'
})
return return
} }
if(!aliAccount){ if(!aliAccount){
that.tui.toast('支付宝账号不能为空') uni.showToast({
title: '支付宝账号不能为空',
icon: 'none'
})
return return
} }
if(!this.isValidAliAccount(aliAccount)){ if(!this.isValidAliAccount(aliAccount)){
that.tui.toast('支付宝账号需为手机号或邮箱') uni.showToast({
title: '支付宝账号需为手机号或邮箱',
icon: 'none'
})
return return
} }
this.submittingWithdraw = true this.submittingWithdraw = true
@ -423,13 +447,19 @@
that.beginData(); that.beginData();
} else { } else {
that.closeWithdrawPopup() that.closeWithdrawPopup()
that.tui.toast(failMessage || '提现失败,请稍后再试', 2500) uni.showToast({
title: failMessage || '提现失败,请稍后再试',
icon: 'none'
})
return return
} }
uni.hideLoading() uni.hideLoading()
}).catch((res) => { }).catch((res) => {
that.closeWithdrawPopup() that.closeWithdrawPopup()
that.tui.toast(that.getWithdrawErrorMessage(res) || '提现失败,请稍后再试', 2500) uni.showToast({
title: that.getWithdrawErrorMessage(res) || '提现失败,请稍后再试',
icon: 'none'
})
}) })
}, },
isValidAliAccount(account){ isValidAliAccount(account){
@ -535,11 +565,17 @@
} }
}) })
} else { } else {
this.tui.toast(res.message || '未找到关联订单') uni.showToast({
title: res.message || '未找到关联订单',
icon: 'none'
})
} }
this.resolvingSettlementOrderId = false this.resolvingSettlementOrderId = false
}).catch((res) => { }).catch((res) => {
this.tui.toast(res && res.message ? res.message : '未找到关联订单') uni.showToast({
title: res && res.message ? res.message : '未找到关联订单',
icon: 'none'
})
this.resolvingSettlementOrderId = false this.resolvingSettlementOrderId = false
}) })
}, },
@ -563,7 +599,10 @@
} }
that.$forceUpdate() that.$forceUpdate()
} else { } else {
that.tui.toast(res.message) uni.showToast({
title: res.message,
icon: 'none'
})
return return
} }
uni.hideLoading() uni.hideLoading()

Loading…
Cancel
Save