Commit 86c98add authored by Mac's avatar Mac

微店参数的提交

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