Commit 07ce1379 authored by Xuguangxing's avatar Xuguangxing

feat: 增加详情页分享

parent 23904f66
......@@ -7,7 +7,7 @@
const protocol = window.location.protocol;
const qiniuHost = protocol + '//kdspstatic.q-gp.com/';
const shenceHost = 'https://bn.xyqb.com/sa?project=default'; // 测试地址
// const talosHost = 'https://talos-test1.liangkebang.net';
const talosHost = 'https://talos-test1.liangkebang.net';
const faceHost = 'https://auth-test1.liangkebang.net';
const kdspHost = 'https://kdsp-api-test1.liangkebang.net';
const localHost = 'https://group-buy-test1.liangkebang.net'; // 测试环境页面地址
......@@ -15,7 +15,7 @@ const localHost = 'https://group-buy-test1.liangkebang.net'; // 测试环境页
// const talosHost = 'http://192.168.25.210:8080'; // 张超
// const talosHost = 'http://192.168.28.83:80'; // 董彪
// const talosHost = 'http://192.168.25.122:8098'; // 王永杰
const talosHost = protocol + '//192.168.28.41'; // 超人
// const talosHost = protocol + '//192.168.28.41'; // 超人
const opapiHost = 'https://opapi-test1.liangkebang.net';
const VCC_CHANNEL = '';
const TERMINAL = 'H5';
......
......@@ -104,6 +104,7 @@ import rules from '@/components/rules';
import groupDescInfo from './components/groupDescInfo';
import localStorage from '@/service/localStorage.service';
import sharePic from '@/components/sharePic';
import config from '@/config';
export default {
// eslint-disable-next-line vue/name-property-casing
name: 'goodDetail',
......@@ -154,6 +155,7 @@ export default {
}
},
created() {
console.log(config.localHost);
this.detailParam = { ...this.$route.query };
localStorage.set('activityId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) {
......@@ -193,11 +195,16 @@ export default {
}
},
outputPicUrl(res) {
const fullPath = this.$route.fullPath.replace('skuInfoSmallPic?', 'skuInfo?');
const link =
fullPath.indexOf('groupBuyGroupId=') > -1
? fullPath
: fullPath + `&groupBuyGroupId=${this.groupId}`;
this.picUrl = res || '';
this.shareInfo = {
title: this.detailInfo.goodsName,
desc: '',
link: `${window.location.href}&groupBuyGroupId=${this.groupId}` || '', // 页面地址
link: link || '', // 页面地址
imgUrl: this.detailInfo.thumbImageUrl, // 图片地
posterUrl: res || ''
};
......@@ -266,9 +273,9 @@ export default {
}
},
setStartStatus(data) {
const currentTime = new Date(data.currentTime).getTime();
const activityStartTime = new Date(data.startTime).getTime();
const activityEndTime = new Date(data.endTime).getTime();
const currentTime = new Date(data.currentTime.replace(/\-/g, '/')).getTime();
const activityStartTime = new Date(data.startTime.replace(/\-/g, '/')).getTime();
const activityEndTime = new Date(data.endTime.replace(/\-/g, '/')).getTime();
this.groupTimestemp = data.groupBuyInfo.currentGroupEndTime
? new Date(data.groupBuyInfo.currentGroupEndTime).getTime()
: -1;
......
......@@ -117,7 +117,7 @@ export default {
templateId: shareInfo.templateId,
templateDetailId: shareInfo.templateDetailId
});
let detailUrl = `${config.localHost}/groupBuy/skuInfoSmallPic?h=0&${linkPath}`;
let detailUrl = `${config.localHost}/groupBuy/skuInfo?h=0&${linkPath}`;
if (isWxMp) {
detailUrl = `/pages/webview/webview?url=${encodeURIComponent(JSON.stringify(detailUrl))}`;
}
......
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