Commit 0491deda by 李嘉林

feat: 优化绑定导购、门店

parent 8638651d
...@@ -92,6 +92,7 @@ console.log(process.env,'-----------------config------') ...@@ -92,6 +92,7 @@ console.log(process.env,'-----------------config------')
uploadFile(data) { uploadFile(data) {
return requestPOST(`${process.env.OLSHOP_URL}/common/uploadFile`,data) return requestPOST(`${process.env.OLSHOP_URL}/common/uploadFile`,data)
}, },
// 商城二维码分配组织或跟进人
allocation(data) { allocation(data) {
return requestPOST(`${process.env.OLSHOP_URL}/user/allocation`,data) return requestPOST(`${process.env.OLSHOP_URL}/user/allocation`,data)
}, },
......
...@@ -101,11 +101,4 @@ export default { ...@@ -101,11 +101,4 @@ export default {
data data
); );
}, },
// 商城二维码分配组织或跟进人
ShopCodeDistributionOrg(data) {
return requestPOST(
`${process.env.OLSHOP_URL}/user/allocation`,
data
);
},
}; };
...@@ -197,7 +197,7 @@ let viewPageList = []; // 两个参数 上一个页面、当前页面 ...@@ -197,7 +197,7 @@ let viewPageList = []; // 两个参数 上一个页面、当前页面
* 全局页面切换监听 * 全局页面切换监听
*/ */
wx.onAppRoute(res => { wx.onAppRoute(res => {
console.log(res, '--res') console.log('onAppRoute->', res);
let whetherToForceLogin = mpApp.globalData.shopInfo && mpApp.globalData.shopInfo.whetherToForceLogin || 0 let whetherToForceLogin = mpApp.globalData.shopInfo && mpApp.globalData.shopInfo.whetherToForceLogin || 0
log.info("wx.onAppRoute", res, mpApp.globalData.shopInfo, whetherToForceLogin, wx.getStorageSync('sessionid'), res.path != "pages/login/main"); log.info("wx.onAppRoute", res, mpApp.globalData.shopInfo, whetherToForceLogin, wx.getStorageSync('sessionid'), res.path != "pages/login/main");
console.log(res,mpApp.globalData.shopInfo,whetherToForceLogin,wx.getStorageSync('sessionid'),res.path !="pages/login/main",'---------wx.onAppRoute') console.log(res,mpApp.globalData.shopInfo,whetherToForceLogin,wx.getStorageSync('sessionid'),res.path !="pages/login/main",'---------wx.onAppRoute')
...@@ -257,6 +257,12 @@ wx.onAppRoute(res => { ...@@ -257,6 +257,12 @@ wx.onAppRoute(res => {
mpBehavior.trackPageView(trackPageViewQuery); mpBehavior.trackPageView(trackPageViewQuery);
trackPageLeave(res); trackPageLeave(res);
}) })
// 加绑定关系
if (wx.getStorageSync('sessionid')) {
indexApi.allocation({
isCover: false,
});
}
}) })
/** /**
* 页面访问时长埋点 * 页面访问时长埋点
......
...@@ -617,6 +617,10 @@ export default { ...@@ -617,6 +617,10 @@ export default {
console.log("refreshInit--------2") console.log("refreshInit--------2")
this.refreshInit(); this.refreshInit();
wx.removeStorageSync("firstView"); wx.removeStorageSync("firstView");
// 重新进店移除导购相关参数
wx.removeStorage({ key: this.$store.state.mixid+'setGuideEmployeeId' });
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')
...@@ -1282,7 +1286,7 @@ export default { ...@@ -1282,7 +1286,7 @@ export default {
ShopCodeDistributionOrg() { ShopCodeDistributionOrg() {
let setGuideEmployeeId = wx.getStorageSync(this.$store.state.mixid + 'setGuideEmployeeId'); let setGuideEmployeeId = wx.getStorageSync(this.$store.state.mixid + 'setGuideEmployeeId');
if (setGuideEmployeeId) { if (setGuideEmployeeId) {
shop.ShopCodeDistributionOrg({ indexApi.allocation({
isCover: false, isCover: false,
employeeId: setGuideEmployeeId employeeId: setGuideEmployeeId
}); });
......
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