Commit 87b56971 authored by Xuguangxing's avatar Xuguangxing

fix

parent 60e87ead
...@@ -191,8 +191,7 @@ export default { ...@@ -191,8 +191,7 @@ export default {
payContractInfo: {}, payContractInfo: {},
isCheckAgreement: false, isCheckAgreement: false,
mergePayPretreatmentInfo: {}, mergePayPretreatmentInfo: {},
tradeType: isWechat ? 'JSAPI' : 'MWEB', tradeType: isWechat ? 'JSAPI' : 'MWEB'
amountInfo: {}
}; };
}, },
computed: { computed: {
...@@ -533,23 +532,12 @@ export default { ...@@ -533,23 +532,12 @@ export default {
}, },
payResult(type, error) { payResult(type, error) {
/* 跳转支付结果页面 */ /* 跳转支付结果页面 */
alert(
JSON.stringify({
reason: error,
orderNo: this.orderNo,
payType: this.payType,
amount: this.amountInfo.finalAmt || '',
freeAmount: this.amountInfo.freeAmount || ''
})
);
this.$router.replace({ this.$router.replace({
name: `pay${type}`, name: `pay${type}`,
query: { query: {
reason: error, reason: error,
orderNo: this.orderNo, orderNo: this.orderNo,
payType: this.payType, payType: this.payType
amount: this.amountInfo.finalAmt || '',
freeAmount: this.amountInfo.freeAmount || ''
} }
}); });
}, },
...@@ -646,7 +634,6 @@ export default { ...@@ -646,7 +634,6 @@ export default {
: (orderAmt - faceValue || 0).toFixed(2); : (orderAmt - faceValue || 0).toFixed(2);
const freeAmount = const freeAmount =
!IS_THIRD_PAY(this.payType) && this.showCoupon ? faceValue || '0.00' : '0.00'; !IS_THIRD_PAY(this.payType) && this.showCoupon ? faceValue || '0.00' : '0.00';
this.amountInfo = { finalAmt, freeAmount };
cookies.set('amount', { finalAmt, freeAmount }); cookies.set('amount', { finalAmt, freeAmount });
}, },
async reissueContract() { async reissueContract() {
......
...@@ -75,6 +75,7 @@ import groupBuyApi from '@/api/groupBuy'; ...@@ -75,6 +75,7 @@ import groupBuyApi from '@/api/groupBuy';
import { isApp, isWxMp } from '@/service/validation.service'; import { isApp, isWxMp } from '@/service/validation.service';
import { EventBus } from '@/service/utils.service'; import { EventBus } from '@/service/utils.service';
import MpBridge from '@/service/mp'; import MpBridge from '@/service/mp';
import cookies from '@/service/cookieStorage.service';
export default { export default {
components: { components: {
// Goods, // Goods,
...@@ -96,8 +97,8 @@ export default { ...@@ -96,8 +97,8 @@ export default {
}; };
}, },
created() { created() {
alert('query=' + JSON.stringify(this.$route.query)); const { orderNo, reason, payType } = this.$route.query;
const { orderNo, reason, amount, freeAmount, payType } = this.$route.query; const { amount, freeAmount } = cookies.get('amount') || {};
const { success } = this.$route.meta; const { success } = this.$route.meta;
this.payType = payType || ''; this.payType = payType || '';
this.money = amount || ''; this.money = amount || '';
......
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