Commit 7ae21150 authored by Xuguangxing's avatar Xuguangxing

fix

parent dd90fbe0
......@@ -59,10 +59,10 @@ export default {
},
mounted() {
EventBus.$on('goods_share_info', ({ shareInfo, type }) => {
if (!isApp && !isWxMp) {
this.tipDialogMessage();
return;
}
// if (!isApp && !isWxMp) {
// this.tipDialogMessage();
// return;
// }
this.type = type;
if (typeof shareInfo === 'object') {
this.sharePicData = shareInfo;
......
......@@ -31,7 +31,7 @@
/>
</template>
<template v-else>
<div class="item leader">
<div class="item leader bg">
<div class="leaderName">团长</div>
<div class="leaderBorder">
<img
......@@ -187,8 +187,8 @@ body {
}
.container {
position: fixed;
top: -9999999px;
left: -9999999px;
top: -9999px;
left: -9999px;
width: 1080px;
height: 1920px;
padding: 48px;
......@@ -214,6 +214,9 @@ body {
position: relative;
}
.groupInfo .avatorGroup .normal,
.groupInfo .avatorGroup .leader.bg {
background-color: #ffe1e1;
}
.groupInfo .avatorGroup .leader {
background: transparent;
}
......
......@@ -5,9 +5,6 @@ import store from '../store';
import { isWechat, isApp } from './validation.service';
import Cookies from './cookieStorage.service';
import localStorage from './localStorage.service';
//formXcxPage:标识是从小程序跳转过来的;
const localStorageParams = ['creditToken', 'vccToken', 'vccChannel', 'formXcxPage'];
const cookiesParams = ['h'];
export default {
// token校验,整个流程都是登陆后的
......@@ -17,11 +14,28 @@ export default {
const { meta } = to;
isWechat && localStorage.set('vccChannel', '159913');
meta?.has?.header && store.commit('CHANGE_HEADER', meta.has.header); // 改变header
localStorageParams.forEach(item => {
to.query[item] && localStorage.set(item, to.query[item]);
const localParams = ['token', 'redirectUrl'];
const cookieParams = ['h', 'vccToken', 'vccChannel', 'sonVccChannel'];
// TODO: 类似逻辑可以整合
localParams.forEach(item => {
const value = to.query[item];
if (item === 'token' && value === '') {
localStorage.remove('token');
}
if (value && value !== '{token}' && value !== '{vccToken}') {
localStorage.set(item, value);
}
});
cookiesParams.forEach(item => {
to.query[item] && Cookies.set(item, to.query[item]);
Cookies.remove('ka');
Cookies.remove('sonVccChannel');
cookieParams.forEach(item => {
const value = to.query[item];
if (item === 'vccToken' && value === '') {
Cookies.remove('vccToken');
}
if (value && value !== '{vccToken}' && value !== '{token}') {
Cookies.set(item, value);
}
});
(isWechat || isApp || Cookies.get('h') === '0') && store.commit('CHANGE_HEADER', false); // 改变header
......
......@@ -274,7 +274,7 @@ export default {
this.hasLogin = localStorage.get('vccToken') ? true : false;
this.detailParam = { ...this.$route.query };
localStorage.remove('orderData');
localStorage.set('activityId', this.detailParam.templateId); // 设置活动模板id,用于下单
localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) {
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this.groupId = +this.detailParam.groupBuyGroupId;
......
......@@ -141,7 +141,7 @@ export default {
created() {
console.log(config.localHost);
this.detailParam = { ...this.$route.query };
localStorage.set('activityId', this.detailParam.templateId); // 设置活动模板id,用于下单
localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) {
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this.groupId = +this.detailParam.groupBuyGroupId;
......
......@@ -114,7 +114,8 @@ export default {
goodsSpecialId,
activityId: activityInfoId,
templateId: activityTemplateId,
templateDetailId: activityTemplateDetailId
templateDetailId: activityTemplateDetailId,
vccToken: localStorage.get('vccToken') || ''
}
});
// 正常跳转
......
......@@ -218,7 +218,14 @@ export default {
if (item.goodsCount !== 0) {
this.$router.push({
path: '/groupBuy/skuInfo',
query: { skuNo, goodsSpecialId, templateId, templateDetailIds, activityId }
query: {
skuNo,
goodsSpecialId,
templateId,
templateDetailIds,
activityId,
vccToken: localStorage.get('vccToken') || ''
}
});
} else {
this.$notify({ type: 'warning', message: '该商品已抢完' });
......
......@@ -191,7 +191,7 @@ export default {
receiverId,
totalFreightFee,
totalFee,
activityId: localStorage.get('activityId') || '',
activityId: localStorage.get('templateId') || '',
activityHundredGroupId: localStorage.get('groupBuyGroupId') || '',
skuList: shopSkuList.map(item => {
const { skuId: skuNo, count } = item;
......
......@@ -103,6 +103,7 @@ import Bridge from '@qg/js-bridge';
import MpBridge from '@/service/mp';
import { saTrackEvent } from '@/service/sa.service';
import groupBuyApi from '@/api/groupBuy';
import localStorage from '@/service/localStorage.service';
export default {
name: 'OrderSkuList',
components: {
......@@ -208,7 +209,8 @@ export default {
goodsSpecialId: skuList[0].goodsSpecialId,
activityId: activityInfoId,
templateId: skuList[0].activityTemplateInfoId,
templateDetailId: skuList[0].activityTemplateDetailId
templateDetailId: skuList[0].activityTemplateDetailId,
vccToken: localStorage.get('vccToken') || ''
}
});
},
......
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