Commit c70c5d55 by 李嘉林

es接口

parent a3580570
...@@ -28,7 +28,8 @@ export default { ...@@ -28,7 +28,8 @@ export default {
// development: { mixid: "ytVVdX", "shopid": 3812}, // 驿联科技uat // development: { mixid: "ytVVdX", "shopid": 3812}, // 驿联科技uat
// production: { "mixid":"xhyxshop", "shopid": 1095 }, // 小工蚁新零售 // production: { "mixid":"xhyxshop", "shopid": 1095 }, // 小工蚁新零售
// production: { "mixid":"AntTechnology", "shopid": 1095 }, // 小工蚁新零售 // production: { "mixid":"AntTechnology", "shopid": 1095 }, // 小工蚁新零售
production: { "mixid":"ZJRH", "shopid": 1706 }, // // production: { "mixid":"ZJRH", "shopid": 1706 }, //
production: { "mixid":"LFX", "shopid": 1710 }, // 老凤祥
// production: { "mixid":"SWQ", "shopid": 1641 }, // 麦贝思 // production: { "mixid":"SWQ", "shopid": 1641 }, // 麦贝思
// production: { "mixid":"metasense_doctors", "shopid": 1238 }, // 册为医护端 // production: { "mixid":"metasense_doctors", "shopid": 1238 }, // 册为医护端
// production: { "mixid":"3QqsFT", "shopid": 1337 }, // production: { "mixid":"3QqsFT", "shopid": 1337 },
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
return requestPOST(`${process.env.OLSHOP_URL}/product/query_popular_words_shop`, data); return requestPOST(`${process.env.OLSHOP_URL}/product/query_popular_words_shop`, data);
}, },
queryProductInfo(data) { queryProductInfo(data) {
return requestPOST(`${process.env.OLSHOP_URL}/product/query_product_info`, data); return requestPOST(`${process.env.OLSHOP_URL}/product/select_product_info_on_es`, data);
}, },
// 扫码查询商品 // 扫码查询商品
selectProductInfoOnEs(data) { selectProductInfoOnEs(data) {
......
...@@ -326,13 +326,9 @@ const componentOptions = { ...@@ -326,13 +326,9 @@ const componentOptions = {
query.productAttributeIds = this.data.submitFliterVal.productAttributeIds; query.productAttributeIds = this.data.submitFliterVal.productAttributeIds;
query.minPrice = this.data.submitFliterVal.minPrice; query.minPrice = this.data.submitFliterVal.minPrice;
query.maxPrice = this.data.submitFliterVal.maxPrice; query.maxPrice = this.data.submitFliterVal.maxPrice;
}
const envList = ['xhyx_prod', 'xhyx_beta'];
if (envList.includes(processEnv.NODE_ENV)) {
// 隔离门店搜索
query.searchScopeFlag = 1; query.searchScopeFlag = 1;
} }
goodsApi[envList.includes(processEnv.NODE_ENV)?'selectProductInfoOnEs':'queryProductInfo'](query).then(res => { goodsApi.queryProductInfo(query).then(res => {
this.setData({ loading: false, queryProductInfoLoading: false }); this.setData({ loading: false, queryProductInfoLoading: false });
if (res.data.code == 200) { if (res.data.code == 200) {
let goodsLists = res.data.data.list; let goodsLists = res.data.data.list;
......
...@@ -83,12 +83,9 @@ Component({ ...@@ -83,12 +83,9 @@ Component({
categoryIdList: [], categoryIdList: [],
whetherQueryGoodsAttributeFlag: 0, whetherQueryGoodsAttributeFlag: 0,
whetherToEnableQuickPurchase: 0, whetherToEnableQuickPurchase: 0,
searchScopeFlag: 1,
} }
if (processEnv.NODE_ENV == 'xhyx_prod') { const res = await goodsApi.queryProductInfo(data);
// 隔离门店搜索
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