Commit bd9a36bb authored by 张子雨's avatar 张子雨

feat(pay):修复收银台线上bug

parent 53d6db37
...@@ -8,7 +8,7 @@ const queryPayInfo = function(data) { ...@@ -8,7 +8,7 @@ const queryPayInfo = function(data) {
}; };
const prepay = async function(data) { const prepay = async function(data) {
const scDeviceId = await saDeviceId(); const scDeviceId = await saDeviceId();
return request.post(`${talosHost}/open/checkout/prepay`, data, { return request.post(`${talosHost}/open/checkout/v2/prepay`, data, {
customHeader: { customHeader: {
scDeviceId scDeviceId
}, },
...@@ -18,7 +18,7 @@ const prepay = async function(data) { ...@@ -18,7 +18,7 @@ const prepay = async function(data) {
const pay = async function(data) { const pay = async function(data) {
const scDeviceId = await saDeviceId(); const scDeviceId = await saDeviceId();
return request.post(`${talosHost}/open/checkout/pay`, data, { return request.post(`${talosHost}/open/checkout/v2/pay`, data, {
customHeader: { customHeader: {
scDeviceId scDeviceId
}, },
...@@ -27,7 +27,7 @@ const pay = async function(data) { ...@@ -27,7 +27,7 @@ const pay = async function(data) {
}; };
const queryPayStatus = function(data) { const queryPayStatus = function(data) {
return request.post(`${talosHost}/open/checkout/pay_status/query`, data); return request.post(`${talosHost}/open/checkout/v2/pay_status/query`, data);
}; };
const sendSms = function(data) { const sendSms = function(data) {
......
...@@ -194,6 +194,14 @@ export default { ...@@ -194,6 +194,14 @@ export default {
'https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html'; 'https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html';
}, },
openCancelPopup() { openCancelPopup() {
if (this.orderInfo.orderStatusInfo.paymentInProgress) {
this.$dialog({
message: '订单支付处理中,请稍后再试',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$dialog({ this.$dialog({
title: '取消订单', title: '取消订单',
message: '您真的要取消吗?', message: '您真的要取消吗?',
...@@ -217,6 +225,14 @@ export default { ...@@ -217,6 +225,14 @@ export default {
} }
}, },
toPay() { toPay() {
if (this.orderInfo.orderStatusInfo.paymentInProgress) {
this.$dialog({
message: '支付中,请勿重复支付',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$router.push({ path: '/pay', query: { orderNo: this.orderNo } }); this.$router.push({ path: '/pay', query: { orderNo: this.orderNo } });
}, },
toGoods() { toGoods() {
......
...@@ -109,6 +109,14 @@ export default { ...@@ -109,6 +109,14 @@ export default {
}, },
toPay() { toPay() {
if (this.currentOrder.paymentInProgress) {
this.$dialog({
message: '支付中,请勿重复支付',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$router.push({ path: '/pay', query: { orderNo: this.currentOrder.orderNo } }); this.$router.push({ path: '/pay', query: { orderNo: this.currentOrder.orderNo } });
}, },
toGoods() { toGoods() {
...@@ -123,6 +131,14 @@ export default { ...@@ -123,6 +131,14 @@ export default {
this.$set(this.navList[this.currentTab], key, val); this.$set(this.navList[this.currentTab], key, val);
}, },
orderCancelPopup() { orderCancelPopup() {
if (this.currentOrder.paymentInProgress) {
this.$dialog({
message: '订单支付处理中,请稍后再试',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$dialog({ this.$dialog({
title: '取消订单', title: '取消订单',
message: '您真的要取消吗?', message: '您真的要取消吗?',
......
...@@ -48,6 +48,7 @@ const IS_CREDIT_PAY = method => ...@@ -48,6 +48,7 @@ const IS_CREDIT_PAY = method =>
const PAYMENT_CODE_PAY = 1; // 支付密码 const PAYMENT_CODE_PAY = 1; // 支付密码
const SMS_VERIFICATION_CODE_PAY = 2; //短信验证码 const SMS_VERIFICATION_CODE_PAY = 2; //短信验证码
const FACE_VERIFICATION_CODE_PAY = 4; //人脸验证 const FACE_VERIFICATION_CODE_PAY = 4; //人脸验证
const CENTER_CODE_PAY = 5; //支付中
const PAY_SUCCESS = 3; // 支付成功 const PAY_SUCCESS = 3; // 支付成功
const PAY_PAYING = 2; //支付中 const PAY_PAYING = 2; //支付中
...@@ -161,5 +162,6 @@ export { ...@@ -161,5 +162,6 @@ export {
ACCOUNT_APPLY_AUDITING, ACCOUNT_APPLY_AUDITING,
ACCOUNT_APPLY_AUDIT_FAIL, ACCOUNT_APPLY_AUDIT_FAIL,
SMS_VERIFICATION_CODE_PAY, SMS_VERIFICATION_CODE_PAY,
FACE_VERIFICATION_CODE_PAY FACE_VERIFICATION_CODE_PAY,
CENTER_CODE_PAY
}; };
...@@ -117,7 +117,8 @@ import { ...@@ -117,7 +117,8 @@ import {
creditPayStatusType, creditPayStatusType,
ACCOUNT_APPLY_SUCCESS, ACCOUNT_APPLY_SUCCESS,
SMS_VERIFICATION_CODE_PAY, //短信验证码 SMS_VERIFICATION_CODE_PAY, //短信验证码
FACE_VERIFICATION_CODE_PAY FACE_VERIFICATION_CODE_PAY,
CENTER_CODE_PAY
} from './STATIC_DATA'; } from './STATIC_DATA';
import { import {
pay, pay,
...@@ -504,6 +505,8 @@ export default { ...@@ -504,6 +505,8 @@ export default {
}); });
this.close(); this.close();
this.goOcr(); this.goOcr();
} else if (creditPayStatus === CENTER_CODE_PAY) {
this.payResult('Waiting');
} }
}, },
payResult(type, error) { payResult(type, error) {
......
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