Commit 954ca8fa by 李嘉林

优化

parent b034ce42
......@@ -215,6 +215,7 @@ export default {
showSpe: false,
pageLoading: true,
firstOpenPage: true, //首次打开页面
h5Params: {}, //params
};
},
components:{
......@@ -333,6 +334,7 @@ export default {
console.log(options,this.firstOpenPage,'---------home----options')
log.info(options, '---------home----options')
let h5Params = options && options.params ? JSON.parse(decodeURIComponent(options.params)) : {};
this.h5Params = h5Params;
console.log(h5Params,'--h5Params')
if (Object.keys(h5Params).length>0) {
// 存储h5url门店信息
......@@ -340,11 +342,6 @@ export default {
offlineShopCode:h5Params.offlineShopCode,
offlineShopName:h5Params.offlineShopName,
});
} else {
setStoreInfo({
offlineShopCode: "",
offlineShopName: "",
});
}
//进页面存储需要绑定的信息
if(options.userId||options.spokesmanRelId) {
......@@ -528,12 +525,11 @@ export default {
if (!openThousandsStoresFlag) return;
console.log(wx.getStorageSync("locationObj"),'--locationObj')
let locationObj = wx.getStorageSync("locationObj") ? JSON.parse(wx.getStorageSync("locationObj")) : {};
let { offlineShopCode } = getStoreInfo();
let query = {
channelType: 2, //设备类型(0:pc,1:app,2:小程序)
consumerLongitude: locationObj.longitude?locationObj.longitude.toString() : "", //经度,小程序和app可以获取到就要传,没有不传
consumerLatitude: locationObj.latitude?locationObj.latitude.toString() : "", //纬度,小程序和app可以获取到就要传,没有不传
distributionOfficerShopCode: offlineShopCode|| "" //分销员门店id,没有不传
distributionOfficerShopCode: this.h5Params.offlineShopCode || "" //分销员门店id,没有不传
}
let res = await shop.getEnterShopId(query);
if (res.data.code == 200) {
......
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