|
@@ -252,7 +252,7 @@ export default {
|
|
|
this.params.guideName = this.params.guestId
|
|
this.params.guideName = this.params.guestId
|
|
|
this.params.guestId = null
|
|
this.params.guestId = null
|
|
|
}
|
|
}
|
|
|
- this.params.qrCode = qrcode
|
|
|
|
|
|
|
+ this.params.qrCode = (qrcode || '').trim()
|
|
|
this.params.discount = cardInfo ? cardInfo.discount : ''
|
|
this.params.discount = cardInfo ? cardInfo.discount : ''
|
|
|
this.params.password = cardInfo ? cardInfo.password : ''
|
|
this.params.password = cardInfo ? cardInfo.password : ''
|
|
|
this.params.memberSystemId = cardInfo ? cardInfo.memberSystemId : ''
|
|
this.params.memberSystemId = cardInfo ? cardInfo.memberSystemId : ''
|
|
@@ -272,13 +272,15 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
submitOnlinePay () {
|
|
submitOnlinePay () {
|
|
|
- if (!this.payCode) {
|
|
|
|
|
|
|
+ // 扫码盒子通常会在码值末尾追加回车/空格,提交前需要去掉
|
|
|
|
|
+ const payCode = (this.payCode || '').trim()
|
|
|
|
|
+ if (!payCode) {
|
|
|
this.$message.error('请输入支付码')
|
|
this.$message.error('请输入支付码')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.payCodeDialogVisible = false
|
|
this.payCodeDialogVisible = false
|
|
|
// 直接调用 handleSubmit,避免被 submit 的 1000ms 前置节流吞掉(扫码盒子输入极快时必现)
|
|
// 直接调用 handleSubmit,避免被 submit 的 1000ms 前置节流吞掉(扫码盒子输入极快时必现)
|
|
|
- this.handleSubmit(this.payCode)
|
|
|
|
|
|
|
+ this.handleSubmit(payCode)
|
|
|
// this.createOrder(this.params, true)
|
|
// this.createOrder(this.params, true)
|
|
|
},
|
|
},
|
|
|
cancelOnlinePay () {
|
|
cancelOnlinePay () {
|
|
@@ -395,7 +397,7 @@ export default {
|
|
|
handlePayCodeInput (e) {
|
|
handlePayCodeInput (e) {
|
|
|
this.timer && clearTimeout(this.timer)
|
|
this.timer && clearTimeout(this.timer)
|
|
|
this.timer = setTimeout(() => {
|
|
this.timer = setTimeout(() => {
|
|
|
- if (this.payCode.length > 10) {
|
|
|
|
|
|
|
+ if ((this.payCode || '').trim().length > 10) {
|
|
|
this.submitOnlinePay()
|
|
this.submitOnlinePay()
|
|
|
}
|
|
}
|
|
|
}, 200)
|
|
}, 200)
|