Commit 59e90c9d authored by Xuguangxing's avatar Xuguangxing

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

parents f887e4ff 4cf6b028
......@@ -376,9 +376,7 @@ export function paramsParentheses(pointer) {
}
export function firstGroupShare(shareInfo, type) {
if (!isWxMp) {
return;
}
if (!isWxMp) return;
const nativeBridge = new MpBridge();
if (!shareInfo) {
nativeBridge.run({
......@@ -395,6 +393,7 @@ export function firstGroupShare(shareInfo, type) {
return;
}
// eslint-disable-next-line no-unused-vars
const vccTokenString = `vccToken=${encodeURIComponent('{token}')}`;
let linkPath = '';
let detailData = {
skuNo: shareInfo.skuNo,
......@@ -406,18 +405,14 @@ export function firstGroupShare(shareInfo, type) {
};
switch (type) {
case 0:
linkPath = `${config.localHost}/groupBuy/list?activityId=${
shareInfo.activityId
}&vccToken=${encodeURIComponent('{token}')}`;
linkPath = `${config.localHost}/groupBuy/list?activityId=${shareInfo.activityId}&${vccTokenString}`;
break;
case 1:
linkPath = `${config.localHost}/orderList/0?&vccToken=${encodeURIComponent('{token}')}`;
linkPath = `${config.localHost}/orderList/0?${vccTokenString}`;
break;
case 2:
case 3:
if (shareInfo.groupBuyGroupId) {
detailData.groupBuyGroupId = shareInfo.groupBuyGroupId;
}
shareInfo.groupBuyGroupId && (detailData.groupBuyGroupId = shareInfo.groupBuyGroupId);
linkPath = qs.stringify(detailData);
linkPath = `${config.localHost}/groupBuy/skuInfo?${linkPath}`;
break;
......@@ -426,15 +421,14 @@ export function firstGroupShare(shareInfo, type) {
JSON.stringify(linkPath)
)}`;
const tagName = type ? '[0元购] ' : '';
let shareDic = {
title: `${tagName}${shareInfo.skuName}`,
link: shareInfo.linkPath, // 页面地址
imgUrl: shareInfo.skuImg // 图片地
};
nativeBridge.run({
event: 'showShareView',
data: {
shareDic
shareDic: {
title: `${tagName}${shareInfo.skuName}`,
link: shareInfo.linkPath, // 页面地址
imgUrl: shareInfo.skuImg // 图片地
}
}
});
}
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