Commit c5bd8792 by HouTiZhuo

全网搜 bug 修复

parent 2c03ab4d
......@@ -146,15 +146,16 @@ export default {
this.options = options;
log.info(this.options,'----------------index-----options')
Object.assign(this.$data, this.$options.data());
let h5Params = options && options.params ? JSON.parse(decodeURIComponent(options.params)) : "";
console.log(h5Params,'--h5Params')
if (h5Params) {
// 存储h5url门店信息
setStoreInfo({
offlineShopCode:h5Params.offlineShopCode,
offlineShopName:h5Params.offlineShopName,
});
}
try {
const h5Params = options && options.params ? JSON.parse(decodeURIComponent(options.params)) : "";
if (h5Params) {
// 存储h5url门店信息
setStoreInfo({
offlineShopCode:h5Params.offlineShopCode,
offlineShopName:h5Params.offlineShopName,
});
}
} catch (e) { console.log(e) }
if(wx.getStorageSync("workBox")){
this.params += `&workBox=${wx.getStorageSync("workBox")}`
}
......
......@@ -52,13 +52,13 @@ Component({
let query = `?placeHolderText=${placeHolderText}`;
if (this.data.datas.componentData['searchModel'] == 1) {
query += `&searchScopeFlag=${this.data.searchScopeFlag}`;
// 重置默认全网搜
this.setData({ searchScopeFlag: 0 });
}
let link = `/contentSearch/contentSearch${query}`;
if (this.data.datas.componentData['searchModel'] == 1 && this.data.searchScopeFlag == 0) {
link = `/goodsSearch/searchAllGoods${query}`;
}
// 重置默认全网搜
this.setData({ searchScopeFlag: 0 });
app.$themeToLink({ type: 1, link });
},
// 本店搜
......
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