Commit bb5b7cee by 李嘉林

feat: 绑定导购优化

parent 73d5915b
...@@ -366,6 +366,13 @@ export default { ...@@ -366,6 +366,13 @@ export default {
}); });
} }
// 加绑定关系
console.log('main-allocation->')
if (wx.getStorageSync('sessionid')) {
indexApi.allocation({
isCover: false,
});
}
} }
}) })
.catch((err) => {}); .catch((err) => {});
......
...@@ -180,6 +180,13 @@ function getThemePage({ mixid, shopid, offlineShopCode }) { ...@@ -180,6 +180,13 @@ function getThemePage({ mixid, shopid, offlineShopCode }) {
mpApp.indexBgCallBack(data) mpApp.indexBgCallBack(data)
} }
} }
// 加绑定关系
console.log('main-allocation->')
if (wx.getStorageSync('sessionid')) {
indexApi.allocation({
isCover: false,
});
}
} }
}) })
.catch((err) => {}); .catch((err) => {});
...@@ -257,12 +264,6 @@ wx.onAppRoute(res => { ...@@ -257,12 +264,6 @@ wx.onAppRoute(res => {
mpBehavior.trackPageView(trackPageViewQuery); mpBehavior.trackPageView(trackPageViewQuery);
trackPageLeave(res); trackPageLeave(res);
}) })
// 加绑定关系
if (wx.getStorageSync('sessionid')) {
indexApi.allocation({
isCover: false,
});
}
}) })
/** /**
* 页面访问时长埋点 * 页面访问时长埋点
......
...@@ -425,7 +425,6 @@ export default { ...@@ -425,7 +425,6 @@ export default {
// 每次切换门店都删除导购数据 // 每次切换门店都删除导购数据
wx.removeStorageSync(this.$store.state.mixid+'setGuideEmployeeId'); wx.removeStorageSync(this.$store.state.mixid+'setGuideEmployeeId');
wx.removeStorageSync(this.$store.state.mixid+'guide_QRCodeType'); wx.removeStorageSync(this.$store.state.mixid+'guide_QRCodeType');
wx.removeStorageSync(this.$store.state.mixid+'temp_QRCodeType');
} else { } else {
this.reloadPage = false; this.reloadPage = false;
} }
...@@ -483,7 +482,6 @@ export default { ...@@ -483,7 +482,6 @@ export default {
// 不是导购进入移除参数 // 不是导购进入移除参数
wx.removeStorageSync(this.$store.state.mixid+'setGuideEmployeeId'); wx.removeStorageSync(this.$store.state.mixid+'setGuideEmployeeId');
wx.removeStorageSync(this.$store.state.mixid+'guide_QRCodeType'); wx.removeStorageSync(this.$store.state.mixid+'guide_QRCodeType');
wx.removeStorageSync(this.$store.state.mixid+'temp_QRCodeType');
} }
if (paramsObj.QRCodeType) { if (paramsObj.QRCodeType) {
wx.setStorageSync(this.$store.state.mixid+'guide_QRCodeType', paramsObj.QRCodeType); wx.setStorageSync(this.$store.state.mixid+'guide_QRCodeType', paramsObj.QRCodeType);
...@@ -529,7 +527,6 @@ export default { ...@@ -529,7 +527,6 @@ export default {
// 每次退出登录都删除导购数据 // 每次退出登录都删除导购数据
wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' }); wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' });
wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' }); wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' });
wx.removeStorage({ key: this.$store.state.mixid+'temp_QRCodeType' });
} }
this.options = wx.getStorageSync("becomeInfo"); this.options = wx.getStorageSync("becomeInfo");
this.changeLocation = options.changeLocation || '' this.changeLocation = options.changeLocation || ''
...@@ -564,7 +561,6 @@ export default { ...@@ -564,7 +561,6 @@ export default {
// 每次退出登录都删除导购数据 // 每次退出登录都删除导购数据
wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' }); wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' });
wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' }); wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' });
wx.removeStorage({ key: this.$store.state.mixid+'temp_QRCodeType' });
} }
// 获取页面数据 // 获取页面数据
if (this.mpApp.globalData.pageList && !this.reloadPage) { if (this.mpApp.globalData.pageList && !this.reloadPage) {
...@@ -620,7 +616,6 @@ export default { ...@@ -620,7 +616,6 @@ export default {
// 重新进店移除导购相关参数 // 重新进店移除导购相关参数
wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' }); wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' });
wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' }); wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' });
wx.removeStorage({ key: this.$store.state.mixid+'temp_QRCodeType' });
return; return;
}; };
console.log('home-methods-reloadEnterShopRule') console.log('home-methods-reloadEnterShopRule')
......
...@@ -336,7 +336,6 @@ export default { ...@@ -336,7 +336,6 @@ export default {
// 每次退出登录都删除导购数据 // 每次退出登录都删除导购数据
wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' }); wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' });
wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' }); wx.removeStorage({ key: this.$store.state.mixid+'guide_QRCodeType' });
wx.removeStorage({ key: this.$store.state.mixid+'temp_QRCodeType' });
} else if (options.from && options.from == "address") { } else if (options.from && options.from == "address") {
log.info('options.from == "address"') log.info('options.from == "address"')
// 来自小程序地址页面 // 来自小程序地址页面
...@@ -382,7 +381,6 @@ export default { ...@@ -382,7 +381,6 @@ export default {
// 非导购方式进入移除本地缓存 // 非导购方式进入移除本地缓存
wx.removeStorageSync(this.$store.state.mixid+'setGuideEmployeeId'); wx.removeStorageSync(this.$store.state.mixid+'setGuideEmployeeId');
wx.removeStorageSync(this.$store.state.mixid+'guide_QRCodeType'); wx.removeStorageSync(this.$store.state.mixid+'guide_QRCodeType');
wx.removeStorageSync(this.$store.state.mixid+'temp_QRCodeType');
} }
wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId); wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId); wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId);
...@@ -542,7 +540,7 @@ export default { ...@@ -542,7 +540,7 @@ export default {
init() { init() {
console.log('index-init', this.mpApp.globalData.pageList); console.log('index-init', this.mpApp.globalData.pageList);
if (!this.mpApp.globalData.pageList) { if (!this.mpApp.globalData.pageList) {
this.getThemePage(); // this.getThemePage();
} }
// 获取小程序开启的订阅消息配置 // 获取小程序开启的订阅消息配置
shop.getWxMiniSubscribeMessageConfig().then(res => { shop.getWxMiniSubscribeMessageConfig().then(res => {
......
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