Commit f9a87af4 by 李嘉林

榜单组件改es接口

parent 6bbaca4b
const app = getApp(); const app = getApp();
const { goodsApi, DFSImg, $themeToLink } = app; const { goodsApi, DFSImg, $themeToLink, processEnv } = app;
Component({ Component({
behaviors: [], behaviors: [],
...@@ -84,7 +84,11 @@ Component({ ...@@ -84,7 +84,11 @@ Component({
whetherQueryGoodsAttributeFlag: 0, whetherQueryGoodsAttributeFlag: 0,
whetherToEnableQuickPurchase: 0, whetherToEnableQuickPurchase: 0,
} }
const res = await goodsApi.queryProductInfo(data); if (processEnv.NODE_ENV == 'xhyx_prod') {
// 隔离门店搜索
data.searchScopeFlag = 1;
}
const res = await goodsApi[processEnv.NODE_ENV == 'xhyx_prod'?'selectProductInfoOnEs':'queryProductInfo'](data);
if (res.data.code == 200) { if (res.data.code == 200) {
res.data.data.list && res.data.data.list.forEach(item => { res.data.data.list && res.data.data.list.forEach(item => {
item.productImgUrl = DFSImg(item.productImgUrl); item.productImgUrl = DFSImg(item.productImgUrl);
......
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