Commit be6e9df0 authored by beisir's avatar beisir

Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy

parents cf008450 ee40dfe8
import cookies from 'js-cookie';
const option = {
domain: window.location.host.indexOf('.q-gp.com') >= 0 ? '.q-gp.com' : ''
domain: window.location.host.indexOf('.q-gp.com') >= 0 ? '.q-gp.com' : '',
expires: 1
};
const Cookies = {
get(key) {
......
......@@ -3,7 +3,7 @@
<div class="desc-item">
<template v-if="groupInfo.groupBuyStatus == 1">
<template v-if="!groupInfo.joinGroup && !groupInfo.canJoinGroupBuyAgain">
拼团失败!
<!-- 您不符合参与此团的条件 -->
</template>
<template v-else>
<p class="desc">
......
......@@ -638,7 +638,7 @@ export default {
const freeAmount =
!IS_THIRD_PAY(this.payType) && this.showCoupon ? faceValue || '0.00' : '0.00';
this.amountInfo = { finalAmt, freeAmount };
cookies.set('amount', { finalAmt, freeAmount });
cookies.set('amount', JSON.stringify({ finalAmt, freeAmount }));
},
async reissueContract() {
await reissueContract({
......
......@@ -75,6 +75,7 @@ import groupBuyApi from '@/api/groupBuy';
import { isApp, isWxMp } from '@/service/validation.service';
import { EventBus } from '@/service/utils.service';
import MpBridge from '@/service/mp';
import cookies from '@/service/cookieStorage.service';
export default {
components: {
// Goods,
......@@ -96,14 +97,21 @@ export default {
};
},
created() {
const { orderNo, reason, amount, freeAmount, payType } = this.$route.query;
const { orderNo, reason, payType } = this.$route.query;
const { success } = this.$route.meta;
// const amount = cookies.get('amount') || {};
try {
const amount = JSON.parse(cookies.get('amount'));
this.money = amount.finalAmt || '';
this.freeAmount = amount.freeAmount || '';
} catch (e) {
this.money = '';
this.freeAmount = '';
}
this.payType = payType || '';
this.money = amount || '';
this.orderNo = orderNo;
this.reason = reason || '';
this.isSuccess = success || false;
this.freeAmount = freeAmount || '';
this.payStatus = success ? '订单支付成功' : '订单支付失败';
this.payStatusName = success ? '支付成功' : '支付失败';
this.getCouponList();
......
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