问题描述:
收银台再次支付未成功问题。
文件目录:view/cashier,下面文件都是这个目录
解决方法:
src/components/settleDrawer/index.vue,找到这个文件,修改cashBnt()方法。
cashBnt() {
if (!this.payNum) {
if (this.type === '' || (this.type === 'yue' && this.verify)) {
return;
}
}
if (this.type === 'yue') {
if (this.isURL(this.payNum)) {
this.payNum = this.getCodeFromLink(this.payNum);
}
}
let payNum = this.payNum;
this.payNum = '';
this.$emit('cashBnt', payNum);
},
src/pages/cashier/index.vue,找到这个文件,watch中监听settleVisible,修改cashBnt()方法。
watch: {
goodData(value) {
this.$nextTick(() => {
if (value.length) {
this.goodsHeight = this.$refs.listWrap.querySelector('.picture').clientWidth;
}
});
},
settleVisible(value) {
this.isOrderCreate = 0;
}
},
cashBnt(payNum) {
this.payNum = payNum;
if (this.cashBntLoading) return;
this.cashBntLoading = true;
if (this.payType === 'yue') {
this.createOrder.userCode = payNum;
} else if (this.payType === '') {
this.createOrder.auth_code = payNum;
}
if (this.isOrderCreate) {
this.getCashierPay(this.payType);
} else {
if (this.rechargeVisible) {
this.rechargeBalance(payNum);
} else {
this.orderCreate();
}
}
setTimeout(() => {
this.cashBntLoading = false;
}, 1000);
},
最后:修改源码完毕,需要重新打包收银台