Commit 2592f20a authored by FE-安焕焕's avatar FE-安焕焕 👣

余额不足提示

parent 8486ebb9
...@@ -199,6 +199,13 @@ export default { ...@@ -199,6 +199,13 @@ export default {
this.payContractInfo.payContractIsSign && this.payContractInfo.payContractIsSign &&
this.creditPayInfo.accountStatus === ACCOUNT_APPLY_SUCCESS this.creditPayInfo.accountStatus === ACCOUNT_APPLY_SUCCESS
); );
},
canUseAmount() {
return (
((this.selectedCoupon?.faceValue && +this.selectedCoupon.faceValue) || 0) +
((this.displayInfo?.creditPayInfo?.canAmt && +this.displayInfo.creditPayInfo.canAmt) || 0) -
((this.displayInfo?.orderAmt && +this.displayInfo.orderAmt) || 0)
);
} }
}, },
watch: { watch: {
...@@ -405,6 +412,15 @@ export default { ...@@ -405,6 +412,15 @@ export default {
this.retrieveLink(); this.retrieveLink();
return; return;
} }
if (this.payType === CREDIT_PAY && this.canUseAmount < 0) {
this.$dialog({
message: '您的消费额度不足,请更换支付方式!',
confirmButtonText: '知道了',
showCancelButton: false,
confirmButtonColor: '#EC1500'
});
return;
}
const paramsData = { const paramsData = {
...params, ...params,
quitUrl: Current_Url, quitUrl: Current_Url,
...@@ -434,15 +450,6 @@ export default { ...@@ -434,15 +450,6 @@ export default {
}); });
return; return;
} }
if (error?.msg === '用户额度小于订单需支付额度') {
this.$dialog({
message: '您的消费额度不足,请更换支付方式!',
confirmButtonText: '知道了',
showCancelButton: false,
confirmButtonColor: '#EC1500'
});
return;
}
if (codeArr.indexOf(error?.response?.businessCode) < 0) { if (codeArr.indexOf(error?.response?.businessCode) < 0) {
this.payResult('Fail', error.message); this.payResult('Fail', error.message);
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment