Commit c8d5c290 authored by Mac's avatar Mac

分销带的参数

parent faf58980
......@@ -84,7 +84,8 @@ export default {
let t = getCurrentPages();
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
this.path = '/pages/index/index?id=' + this.goodId + "&user_id=" + uid+'&JumpType=1';
let Up = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;
this.path = '/pages/index/index?id=' + this.goodId + "&user_id=" + uid+ "&Up=" + Up+'&JumpType=1';
//console.log(t[t.length - 1]);
this.favorStatus = this.favorite;
......
......@@ -300,18 +300,19 @@ export default {
let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserSmallShopId
: 0;
}
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserSmallShopId
: 0;
}
let Up = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;
this.request2(
{
url: "/api/Mall/GetGoosPoster",
data: {
goodsId: this.id,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + u.UserId,
path: "/pages/index/index?id=" + this.id + "&user_id=" + u.UserId+ "&SmallShopId=" + SmallShopId+'&JumpType=1',
path: "/pages/index/index?id=" + this.id + "&user_id=" + u.UserId+ "&SmallShopId=" + SmallShopId+ "&Up=" + Up+'&JumpType=1',
},
},
(res) => {
......
......@@ -352,6 +352,7 @@ export default {
isAllowShare: 1,
u: {},
vipState: {},
Up:0,
};
},
components: {
......@@ -389,7 +390,10 @@ export default {
//如果有主播名称了先清除
uni.removeStorageSync("AnchorName");
}
if (option && option.Up) {//分享进入校园id
uni.setStorageSync("Up", { Up: option.Up });
}
this.Up = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;//用于分享出去的参数
if (option && option.AnchorName) {
//当传过来有主播名称的时候 存入缓存
uni.setStorageSync("AnchorName", { AnchorName: option.AnchorName });
......@@ -413,6 +417,7 @@ export default {
this.secondary = this.$uiConfig.secondary;
this.setting = uni.getStorageSync("basedata").mall.setting;
wx.showShareMenu({
withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"],
......@@ -448,7 +453,7 @@ export default {
let id = this.id;
return {
title: title,
query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId,
query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up,
imageUrl: imageUrl,
};
},
......@@ -472,7 +477,7 @@ export default {
? this.g.app_share_title
: this.g.name,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId,
path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+'&JumpType=1',
path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=1',
imageUrl:
this.g.app_share_pic != null && this.g.app_share_pic != ""
? this.g.app_share_pic
......
......@@ -299,13 +299,14 @@ export default {
? uni.getStorageSync("mall_UserInfo").UserSmallShopId
: 0;
}
let Up = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;
this.request2(
{
url: "/api/Mall/GetGoosPoster",
data: {
goodsId: this.id,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + u.UserId,
path: "/pages/index/index?id=" + this.id + "&ud=" + u.UserId+ "&Sd=" + SmallShopId
path: "/pages/index/index?i=" + this.id + "&u=" + u.UserId+ "&m=" + SmallShopId+ "&Up=" + Up
+'&P='+encodeURIComponent(JSON.stringify(this.Pickcar))
+'&S='+this.StartTime
+'&E='+this.EndTime
......
......@@ -375,7 +375,7 @@
contentHeight:0,
san:'100px',
windowWidth:0,
Up:0,
}
},
onLoad(option){
......@@ -415,6 +415,10 @@
this.ETime = this.getTime(option.EndTime)
this.EndTime= option.EndTime
}
if (option && option.Up) {//分享进入校园id
uni.setStorageSync("Up", { Up: option.Up });
}
this.Up = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;//用于分享出去的参数
if(option&& option.StartTime && option.EndTime){
let startTime = new Date(option.StartTime); // 开始时间
......@@ -448,7 +452,7 @@
if(this.SmallShopId == 0){//如果微店id为0 去找所属微店id
this.SmallShopId = uni.getStorageSync("mall_UserInfo")? uni.getStorageSync("mall_UserInfo").UserSmallShopId: 0;
}
this.path = "/pages/index/index?GoodsId=" + this.GoodsId + "&user_id=" + this.uid+ "&SmallShopId=" + this.SmallShopId+'&JumpType=3'
this.path = "/pages/index/index?GoodsId=" + this.GoodsId + "&user_id=" + this.uid+ "&SmallShopId=" + this.SmallShopId+ "&Up=" + this.Up+'&JumpType=3'
+'&address='+encodeURIComponent(JSON.stringify(this.address))
+'&Pickcar='+encodeURIComponent(JSON.stringify(this.Pickcar))
+'&StartTime='+this.StartTime
......@@ -473,7 +477,7 @@
this.g.app_share_pic != null && this.g.app_share_pic != ""? this.g.app_share_pic: this.g.pic_url[0].pic_url;
return {
title: title,
query: "GoodsId=" + this.GoodsId + "&user_id=" + this.uid+ "&SmallShopId=" + this.SmallShopId
query: "GoodsId=" + this.GoodsId + "&user_id=" + this.uid+ "&SmallShopId=" + this.SmallShopId+ "&Up=" + this.Up
+'&address='+this.address
+'&Pickcar='+this.Pickcar
+'&StartTime='+this.StartTime
......@@ -493,7 +497,7 @@
}
return {
title: this.g.app_share_title != null && this.g.app_share_title != "" ? this.g.app_share_title : this.g.name,
path: "/pages/index/index?GoodsId=" + this.GoodsId + "&user_id=" + this.uid+ "&SmallShopId=" + this.SmallShopId+'&JumpType=3'
path: "/pages/index/index?GoodsId=" + this.GoodsId + "&user_id=" + this.uid+ "&SmallShopId=" + this.SmallShopId+ "&Up=" + this.Up+'&JumpType=3'
+'&address='+encodeURIComponent(JSON.stringify(this.address))
+'&Pickcar='+encodeURIComponent(JSON.stringify(this.Pickcar))
+'&StartTime='+this.StartTime
......
......@@ -217,6 +217,9 @@ export default {
if (options && options.SmallShopId) {
uni.setStorageSync("SmallShopId", { SmallShopId: options.SmallShopId });
}
if (options && options.Up) {//校园id
uni.setStorageSync("Up", { Up: options.Up });
}
if (options && options.scene) {
//兼容之前小程序的调转
......@@ -243,17 +246,17 @@ export default {
this.JumpType = options.J;
if(options.J == 3){
this.guidecar.GoodsId = options.id;
this.guidecar.GoodsId = options.i;
this.guidecar.address = options.address?JSON.parse(decodeURIComponent(options.address)):'';
this.guidecar.Pickcar = options.P?JSON.parse(decodeURIComponent(options.P)):'';
this.guidecar.StartTime = options.S?options.S:'';
this.guidecar.EndTime = options.E?options.E:'';
}
if (options && options.ud) {
uni.setStorageSync("pid", { pid: options.ud });
if (options && options.u) {
uni.setStorageSync("pid", { pid: options.u });
}
if (options && options.Sd) {
uni.setStorageSync("SmallShopId", { SmallShopId: options.Sd });
if (options && options.m) {
uni.setStorageSync("SmallShopId", { SmallShopId: options.m });
}
}
......@@ -342,6 +345,7 @@ export default {
this.setting = set;
this.isShowBack();
uni.showNavigationBarLoading();
},
// #ifdef MP-WEIXIN
onShareTimeline() {
......@@ -370,9 +374,10 @@ export default {
if(SmallShopId!=0){
title=this.shopData.Name
}
let Up = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;
return {
title: title,
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId,
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId+ "&Up=" + Up,
imageUrl: "",
};
},
......@@ -402,10 +407,11 @@ export default {
if(SmallShopId!=0){
title=this.shopData.Name
}
let Up = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;
return {
title: title,
path:
"/pages/index/index?user_id=" + uid + "&SmallShopId=" + SmallShopId,
"/pages/index/index?user_id=" + uid + "&SmallShopId=" + SmallShopId+ "&Up=" + Up,
imageUrl: "",
};
......
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