Authored by 周少峰

use seo search api

@@ -123,6 +123,29 @@ const getProductList = (params, from) => { @@ -123,6 +123,29 @@ const getProductList = (params, from) => {
123 } 123 }
124 }; 124 };
125 125
  126 +/**
  127 + * 获取seo商品列表
  128 + * @return
  129 + */
  130 +const getSeoProductList = (params, from) => {
  131 + let finalParams = {
  132 + method: 'web.search.forseo',
  133 + sales: 'Y',
  134 + outlets: 2,
  135 + stocknumber: 1,
  136 + need_filter: 'no',
  137 + limit: 60
  138 + };
  139 +
  140 + Object.assign(finalParams, params);
  141 +
  142 + if (from) {
  143 + finalParams.from = from;
  144 + }
  145 +
  146 + return getProductListOrig(finalParams);
  147 +};
  148 +
126 const getSortListOrig = (finalParams) => api.get('', finalParams, config.apiCache); 149 const getSortListOrig = (finalParams) => api.get('', finalParams, config.apiCache);
127 150
128 /** 151 /**
@@ -485,6 +508,7 @@ module.exports = { @@ -485,6 +508,7 @@ module.exports = {
485 getSortByConditionAsync, 508 getSortByConditionAsync,
486 getKeyActivityAsync, 509 getKeyActivityAsync,
487 getProductList, 510 getProductList,
  511 + getSeoProductList,
488 getSortList, 512 getSortList,
489 getSortIntro, 513 getSortIntro,
490 getSortAds, 514 getSortAds,
@@ -394,7 +394,7 @@ exports.getSearchKeywordData = (params, channel) => { @@ -394,7 +394,7 @@ exports.getSearchKeywordData = (params, channel) => {
394 let apiMethod = [ 394 let apiMethod = [
395 headerModel.requestHeaderData(channel), 395 headerModel.requestHeaderData(channel),
396 searchApi.getSuggest({keyword: searchParams.query.substring(0, 2)}), 396 searchApi.getSuggest({keyword: searchParams.query.substring(0, 2)}),
397 - searchApi.getProductList(searchParams, 'fuzzySearch') 397 + searchApi.getSeoProductList(searchParams, 'fuzzySearch')
398 ]; 398 ];
399 399
400 return api.all(apiMethod).then(result => { 400 return api.all(apiMethod).then(result => {