Commit c8d5c290 authored by Mac's avatar Mac

分销带的参数

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