Commit 8e74d94a by 侯体倬

导购字段统一,传参优化

parent d1ec7fc9
......@@ -80,9 +80,9 @@ export default {
}
// 判断当前是否为导购分享
const guideEmployeeId = wx.getStorageSync(this.$store.state.mixid + 'guideEmployeeId');
if (guideEmployeeId) {
this.params += `&setGuideEmployeeId=${guideEmployeeId}`;
const setGuideEmployeeId = wx.getStorageSync(this.$store.state.mixid + 'setGuideEmployeeId');
if (setGuideEmployeeId) {
this.params += `&setGuideEmployeeId=${setGuideEmployeeId}`;
}
// tabbar 跳转
let homeIndex = checkTabbarPage("/");
......
......@@ -454,6 +454,10 @@ export default {
offlineShopName:paramsObj.offlineShopName,
});
}
// 判断是否为导购分享进入
if (paramsObj.setGuideEmployeeId) {
wx.setStorageSync(this.$store.state.mixid+'setGuideEmployeeId', paramsObj.setGuideEmployeeId);
}
this.showStoreAddr = true;
wx.setStorageSync('attractingCustomerChannelId',sceneObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',sceneObj.storeId);
......
......@@ -84,9 +84,9 @@ export default {
this.params+=`&latitude=${latitude}&longitude=${longitude}`
}
// 判断当前是否为导购分享
const guideEmployeeId = wx.getStorageSync(this.$store.state.mixid + 'guideEmployeeId');
if (guideEmployeeId) {
this.params += `&setGuideEmployeeId=${guideEmployeeId}`;
const setGuideEmployeeId = wx.getStorageSync(this.$store.state.mixid + 'setGuideEmployeeId');
if (setGuideEmployeeId) {
this.params += `&setGuideEmployeeId=${setGuideEmployeeId}`;
}
console.log(this.link,'=======',this.page,'++++++++++++++',this.params,'************')
let pageUrl1 = (this.page.startsWith('http://') || this.page.startsWith('https://'))? (this.page + this.params) : this.link+this.page+this.params
......@@ -344,10 +344,6 @@ export default {
offlineShopName:paramsObj.offlineShopName,
});
}
// 判断是否为导购分享进入
if (paramsObj.guideEmployeeId) {
wx.setStorageSync(this.$store.state.mixid+'guideEmployeeId', paramsObj.guideEmployeeId);
}
wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId);
wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId);
......
......@@ -12,9 +12,9 @@ const getRequestHeader = (extraHeader = {}) => {
}
// 判断是否存在导购员 id
const guideEmployeeId = wx.getStorageSync(store.state.mixid + 'guideEmployeeId');
if (guideEmployeeId) {
BASE_HEADER['Guide-Employee-Id'] = guideEmployeeId;
const setGuideEmployeeId = wx.getStorageSync(store.state.mixid + 'setGuideEmployeeId');
if (setGuideEmployeeId) {
BASE_HEADER['Guide-Employee-Id'] = setGuideEmployeeId;
}
return Object.assign(BASE_HEADER, extraHeader);
......
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