Commit ec94a064 authored by Xuguangxing's avatar Xuguangxing

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

parents 0ac257e2 2ce78d9f
......@@ -41,7 +41,7 @@ export default {
sharePicData: {},
shareInfo: {},
type: 0,
typeStatus: {
0: '入口活动页面',
1: '拼团列表页面',
......@@ -67,10 +67,9 @@ export default {
if (typeof shareInfo === 'object') {
this.sharePicData = shareInfo;
this.handleShareInfo(shareInfo);
// 如果shareInfo为data数据则直接创建海报
return;
}
// 调用分享数据接口
// 如果shareInfo为data数据则直接创建海报
this.getGroupShareInfo(shareInfo);
});
},
......@@ -128,19 +127,24 @@ export default {
const type = this.type;
let shareInfo = this.sharePicData;
let linkPath = '';
switch (type) {
case 0:
linkPath = `${config.localHost}/groupBuy/list?h=0&activityId=${shareInfo.activityId}`;
break;
case 1:
linkPath = qs.stringify({
let detailData = {
skuNo: shareInfo.skuNo,
groupBuyGroupId: shareInfo.groupBuyGroupId,
goodsSpecialId: shareInfo.goodsSpecialId,
activityId: shareInfo.activityId,
templateId: shareInfo.templateId,
templateDetailId: shareInfo.templateDetailId
});
};
switch (type) {
case 0:
linkPath = `${config.localHost}/groupBuy/list?h=0&activityId=${shareInfo.activityId}`;
break;
case 1:
case 2:
case 3:
if (shareInfo.groupBuyGroupId) {
detailData.groupBuyGroupId = shareInfo.groupBuyGroupId;
}
linkPath = qs.stringify(detailData);
linkPath = `${config.localHost}/groupBuy/skuInfo?h=0&${linkPath}`;
break;
}
......
......@@ -2,7 +2,7 @@ import { isAndroid, isIOS, isXyqb } from './validation.service';
import Bridge from '@qg/js-bridge';
const jsBridge = new Bridge();
import Vue from 'vue';
// import qs from 'qs';
export const EventBus = new Vue();
/**
* 替换邮箱字符
......@@ -365,19 +365,7 @@ export function setAppTitleColor(bgcolor = '#fff') {
});
}
export function appShareEventChange({ title, desc, link, imgUrl, posterUrl }) {
const data = {
event: 'showShareView',
data: {
platform: ['weChat', 'timeLine', 'QQ', 'CopyLink', 'GeneratePoster'], //依次分别是微信、朋友圈、QQ好友、QQ空间、复制链接
shareDic: {
title,
desc,
link, // 页面地址
imgUrl, // 图片地址
posterUrl
}
}
};
jsBridge.showShareView(data);
}
// export function paramsParentheses(urlPath) {
// console.log(qs);
// // urlPath
// }
import * as types from './type';
import groupBuy from '@/api/groupBuy';
import { isWxMp, isApp } from '@/service/validation.service';
import { appShareEventChange } from '@/service/utils.service';
import { isWxMp } from '@/service/validation.service';
// import { paramsParentheses } from '@/service/utils.service';
const state = {
header: true,
title: '支付中心',
......@@ -105,7 +105,8 @@ const mutations = {
// 'https://group-buy-test1.liangkebang.net/groupBuy/list?h=0&activityId=39'//
const [res] = await groupBuy.getScheme({
miniUrl: 'pages/product/goodDetail',
params: window.location.href
// params: `url=${window.location.href}`
params: `url=${'https://group-buy-test1.liangkebang.net/groupBuy/list&h=0&activityId=39'}`
});
const url = res;
window.location.href = url; // todo 需要验证
......@@ -122,9 +123,6 @@ const mutations = {
state.shareInfo = options;
state.showShare = true;
}
if (isApp) {
appShareEventChange(options);
}
},
[types.GOODS_SHARE_CLOSE](state) {
state.showShare = false;
......
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