mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 07:55:53 +08:00
商品详情页分享朋友圈分享好友,以及一些小优化
This commit is contained in:
@@ -394,12 +394,22 @@ export default {
|
||||
routerVal: "",
|
||||
};
|
||||
},
|
||||
// #ifdef MP-WEIXNI
|
||||
shareAppMessage() {
|
||||
return {
|
||||
title: this.goodsDetail.goodsName,
|
||||
type: 0,
|
||||
query:`id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`,
|
||||
path: `/pages/product/goods`,
|
||||
imageUrl:this.goodsDetail.goodsGalleryList[0],
|
||||
};
|
||||
},
|
||||
// #endif
|
||||
watch: {
|
||||
isGroup(val) {
|
||||
if (val) {
|
||||
let timer = setInterval(() => {
|
||||
this.$refs.popupGoods.buyType = "PINTUAN";
|
||||
|
||||
clearInterval(timer);
|
||||
}, 100);
|
||||
|
||||
@@ -442,10 +452,12 @@ export default {
|
||||
},
|
||||
async onLoad(options) {
|
||||
this.routerVal = options;
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序默认分享
|
||||
uni.showShareMenu({ withShareTicket: true });
|
||||
uni.showShareMenu({
|
||||
withShareTicket: true,
|
||||
menus: ["shareAppMessage", "shareTimeline"],
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
async onShow() {
|
||||
@@ -501,6 +513,12 @@ export default {
|
||||
});
|
||||
|
||||
let response = await getGoods(id, goodsId);
|
||||
if (!response.data.success) {
|
||||
uni.navigateBack({
|
||||
delta: 2,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 这里是绑定分销员
|
||||
if (distributionId || this.$store.state.distributionId) {
|
||||
|
||||
Reference in New Issue
Block a user