Commit ea975873 authored by 郭志伟's avatar 郭志伟

Merge branch 'feature/orderPaymentStatus' into 'master'

Feature/order payment status

See merge request !15
parents c9bc8ed6 f2cc15a5
......@@ -8,7 +8,7 @@ const queryPayInfo = function(data) {
};
const prepay = async function(data) {
const scDeviceId = await saDeviceId();
return request.post(`${talosHost}/open/checkout/prepay`, data, {
return request.post(`${talosHost}/open/checkout/v2/prepay`, data, {
customHeader: {
scDeviceId
},
......@@ -18,7 +18,7 @@ const prepay = async function(data) {
const pay = async function(data) {
const scDeviceId = await saDeviceId();
return request.post(`${talosHost}/open/checkout/pay`, data, {
return request.post(`${talosHost}/open/checkout/v2/pay`, data, {
customHeader: {
scDeviceId
},
......@@ -27,7 +27,7 @@ const pay = async 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) {
......
......@@ -8,7 +8,8 @@ const http = new HttpRequest(
{
headers: {
'x-user-terminal': 'H5',
version: appVersion || '7900'
version: appVersion || '7900',
'qg-tenant-id': 560761
}
},
function(msg) {
......
......@@ -194,6 +194,14 @@ export default {
'https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html';
},
openCancelPopup() {
if (this.orderInfo.orderStatusInfo.paymentInProgress) {
this.$dialog({
message: '订单支付处理中,请稍后再试',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$dialog({
title: '取消订单',
message: '您真的要取消吗?',
......@@ -217,6 +225,14 @@ export default {
}
},
toPay() {
if (this.orderInfo.orderStatusInfo.paymentInProgress) {
this.$dialog({
message: '支付中,请勿重复支付',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$router.push({ path: '/pay', query: { orderNo: this.orderNo } });
},
toGoods() {
......
......@@ -109,6 +109,14 @@ export default {
},
toPay() {
if (this.currentOrder.paymentInProgress) {
this.$dialog({
message: '支付中,请勿重复支付',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$router.push({ path: '/pay', query: { orderNo: this.currentOrder.orderNo } });
},
toGoods() {
......@@ -123,6 +131,14 @@ export default {
this.$set(this.navList[this.currentTab], key, val);
},
orderCancelPopup() {
if (this.currentOrder.paymentInProgress) {
this.$dialog({
message: '订单支付处理中,请稍后再试',
confirmButtonText: '知道了',
showCancelButton: false
});
return;
}
this.$dialog({
title: '取消订单',
message: '您真的要取消吗?',
......
......@@ -48,6 +48,7 @@ const IS_CREDIT_PAY = method =>
const PAYMENT_CODE_PAY = 1; // 支付密码
const SMS_VERIFICATION_CODE_PAY = 2; //短信验证码
const FACE_VERIFICATION_CODE_PAY = 4; //人脸验证
const CENTER_CODE_PAY = 5; //支付中
const PAY_SUCCESS = 3; // 支付成功
const PAY_PAYING = 2; //支付中
......@@ -172,5 +173,6 @@ export {
ACCOUNT_APPLY_AUDIT_FAIL,
SMS_VERIFICATION_CODE_PAY,
FACE_VERIFICATION_CODE_PAY,
CENTER_CODE_PAY,
payTypeMap
};
......@@ -119,7 +119,8 @@ import {
creditPayStatusType,
ACCOUNT_APPLY_SUCCESS,
SMS_VERIFICATION_CODE_PAY, //短信验证码
FACE_VERIFICATION_CODE_PAY
FACE_VERIFICATION_CODE_PAY,
CENTER_CODE_PAY
} from './STATIC_DATA';
import {
pay,
......@@ -253,7 +254,7 @@ export default {
async queryPayInfo() {
const [data, error] = await queryPayInfo({
orderNo: this.orderNo,
isUsedMergePayMethod: cookies.get('source') !== 'tob' // 是否需要组合支付,true需要。false不需要
isUsedMergePayMethod: false // 是否需要组合支付,true需要。false不需要
});
if (error && codeArr.indexOf(error?.response?.businessCode) < 0) {
this.payResult('Fail');
......@@ -521,6 +522,8 @@ export default {
});
this.close();
this.goOcr();
} else if (creditPayStatus === CENTER_CODE_PAY) {
this.payResult('Waiting');
}
},
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