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) { ...@@ -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) {
......
...@@ -8,7 +8,8 @@ const http = new HttpRequest( ...@@ -8,7 +8,8 @@ const http = new HttpRequest(
{ {
headers: { headers: {
'x-user-terminal': 'H5', 'x-user-terminal': 'H5',
version: appVersion || '7900' version: appVersion || '7900',
'qg-tenant-id': 560761
} }
}, },
function(msg) { function(msg) {
......
...@@ -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; //支付中
...@@ -172,5 +173,6 @@ export { ...@@ -172,5 +173,6 @@ export {
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,
payTypeMap payTypeMap
}; };
...@@ -119,7 +119,8 @@ import { ...@@ -119,7 +119,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,
...@@ -253,7 +254,7 @@ export default { ...@@ -253,7 +254,7 @@ export default {
async queryPayInfo() { async queryPayInfo() {
const [data, error] = await queryPayInfo({ const [data, error] = await queryPayInfo({
orderNo: this.orderNo, orderNo: this.orderNo,
isUsedMergePayMethod: cookies.get('source') !== 'tob' // 是否需要组合支付,true需要。false不需要 isUsedMergePayMethod: false // 是否需要组合支付,true需要。false不需要
}); });
if (error && codeArr.indexOf(error?.response?.businessCode) < 0) { if (error && codeArr.indexOf(error?.response?.businessCode) < 0) {
this.payResult('Fail'); this.payResult('Fail');
...@@ -521,6 +522,8 @@ export default { ...@@ -521,6 +522,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