Commit 86c98add authored by Mac's avatar Mac

微店参数的提交

parent 8ba08fca
......@@ -118,6 +118,7 @@ export default {
getLogin(obj) {
var that = this;
let pid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0;
let SmallShopId = uni.getStorageSync("SmallShopId")?uni.getStorageSync("SmallShopId").SmallShopId:0;
that.request2(
{
url: '/api/AppletLogin/Login',
......@@ -127,7 +128,8 @@ export default {
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid
SuperiorId: pid,
SmallShopId:SmallShopId,
}
},
res => {
......@@ -140,6 +142,7 @@ export default {
this.couponMessage = res.couponMessage;
}
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
}
}
);
......
......@@ -355,10 +355,14 @@ export default {
if (option && option.user_id) {
uni.setStorageSync("pid", { pid: option.user_id });
}
if (option && option.SmallShopId) {
uni.setStorageSync("SmallShopId", { SmallShopId: option.SmallShopId });
}
if (uni.getStorageSync("AnchorName")) {
//如果有主播名称了先清除
uni.removeStorageSync("AnchorName");
}
if (option && option.AnchorName) {
//当传过来有主播名称的时候 存入缓存
uni.setStorageSync("AnchorName", { AnchorName: option.AnchorName });
......@@ -395,6 +399,9 @@ export default {
let uid = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserId
: 0;
let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0;
let title =
this.g.app_share_title != null && this.g.app_share_title != ""
? this.g.app_share_title
......@@ -406,7 +413,7 @@ export default {
let id = this.id;
return {
title: title,
query: "id=" + this.id + "&user_id=" + uid,
query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId,
imageUrl: imageUrl,
};
},
......@@ -417,12 +424,13 @@ export default {
}, 2500);
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
return {
title:
this.g.app_share_title != null && this.g.app_share_title != ""
? this.g.app_share_title
: this.g.name,
path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid,
path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId,
imageUrl:
this.g.app_share_pic != null && this.g.app_share_pic != ""
? this.g.app_share_pic
......
......@@ -192,6 +192,9 @@ export default {
if (options && options.user_id) {
uni.setStorageSync("pid", { pid: options.user_id });
}
if (options && options.SmallShopId) {
uni.setStorageSync("SmallShopId", { SmallShopId: options.SmallShopId });
}
if (options && options.scene) {
//兼容之前小程序的调转
......@@ -242,10 +245,13 @@ export default {
let uid = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserId
: 0;
let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0;
console.log(uid);
return {
title: "",
query: "user_id=" + uid,
query: "user_id=" + uid+"&SmallShopId=" + SmallShopId,
imageUrl: "",
};
},
......@@ -257,11 +263,14 @@ export default {
let uid = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserId
: 0;
let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0;
return {
title: this.setting.share_title
? this.setting.share_title
: uni.getStorageSync("basedata").mall.name,
path: "/pages/index/index?user_id=" + uid,
path: "/pages/index/index?user_id=" + uid+"&SmallShopId=" + SmallShopId,
imageUrl: this.setting.share_pic ? this.setting.share_pic : "",
};
},
......
......@@ -154,6 +154,9 @@ export default {
if (option.user_id) {
uni.setStorageSync("pid", { pid: option.user_id });
}
if (option.SmallShopId) {
uni.setStorageSync("SmallShopId", { SmallShopId: option.SmallShopId });
}
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
......@@ -189,7 +192,10 @@ export default {
let uid = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserId
: 0;
let customParams = encodeURIComponent(JSON.stringify({ user_id: uid }));
let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0;
let customParams = encodeURIComponent(JSON.stringify({ user_id: uid ,SmallShopId:SmallShopId}));
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${cx.roomid}&custom_params=${customParams}`,
});
......
......@@ -448,13 +448,13 @@
this.QRcodeShow = true;
let that = this
let UserInfo = uni.getStorageSync('mall_UserInfo') ?uni.getStorageSync('mall_UserInfo'):{};
let wdUserId = this.SmallShops.UserInfo.UserId
uni.showNavigationBarLoading();
that.request2(
{
url: '/api/AppletUser/GetWeiXinQRCodeForAppletSmallShops',
data: {
Path:'pages/index/index?user_id=' + UserInfo.UserId+'&wdUserId='+ wdUserId,
Path:'pages/index/index?user_id=' + UserInfo.UserId+'&SmallShopId='+ UserInfo.SmallShopId,
With:212,
}
},
......@@ -463,6 +463,7 @@
that.fenxqrcode = that.host2+res.data;
// that.fenxqrcode = 'http://192.168.2.16:8088/upfile/temporary/d259ce3f-eee3-4c20-976d-4d054f6f16b3.jpg';
console.log(that.fenxqrcode)
console.log('pages/index/index?user_id=' + UserInfo.UserId+'&SmallShopId='+ UserInfo.SmallShopId)
}
);
},
......
......@@ -2,8 +2,8 @@ export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.2.16:8088"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
Vue.prototype.host2 = "http://192.168.2.16:8088"
// Vue.prototype.host2 = "http://192.168.2.65"
Vue.prototype.request = function(param, success, failed) {
//网络请求
......@@ -86,6 +86,7 @@ export default {
// token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0;
let SmallShopId = uni.getStorageSync("SmallShopId")?uni.getStorageSync("SmallShopId").SmallShopId:0;
this.request2(
{
url: '/api/AppletLogin/Login',
......@@ -95,13 +96,15 @@ export default {
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid
SuperiorId: pid,
SmallShopId:SmallShopId,
}
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
}
}
);
......
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