Authored by 周少峰

search api url

... ... @@ -7,6 +7,8 @@ const mysqlPromise = require('../../../lib/mysql-promise');
const config = require('../../../config/config');
const singleBrandKeyPre = config.singleBrandKeyPre;
const singleSortKeyPre = config.singleSortKeyPre;
const brandUrl = `${config.domains.search}brand/list.json`;
const sortUrl = `${config.domains.search}sortgroup.json`;
class seoModel extends model {
... ... @@ -26,7 +28,7 @@ class seoModel extends model {
if (!brands) {
// 调用接口
return this.get('http://192.168.102.216:8080/yohosearch/brand/list.json').then(res => {
return this.get(brandUrl).then(res => {
if (res) {
this.ctx.redis.setAsync(brandsRedisKey, JSON.stringify(res));
brands = res;
... ... @@ -87,7 +89,7 @@ class seoModel extends model {
if (!sorts) {
// 调用接口
return this.get('http://192.168.102.216:8080/yohosearch/sortgroup.json',{needAllSort:1, needSmallSort: 1}).then(res => {
return this.get(sortUrl,{needAllSort:1, needSmallSort: 1}).then(res => {
if (res) {
this.ctx.redis.setAsync(sortsRedisKey, JSON.stringify(res));
sorts = res;
... ...
... ... @@ -47,6 +47,7 @@ const defaults = {
serviceNotify: 'http://service-test3.yohops.com:9999/',
global: 'http://global-test-soa.yohops.com:9999/',
platformApi: 'http://192.168.102.48:8088/',
search: 'http://192.168.102.216:8080/yohosearch/',
// prod
// singleApi: 'http://single.yoho.cn/',
... ... @@ -55,6 +56,7 @@ const defaults = {
// serviceNotify: 'http://service.yoho.cn/',
// global: 'http://api-global.yohobuy.com/',
// platformApi: 'http://172.16.6.210:8088/',
// search: 'http://search.yohoops.org/yohosearch/',
// gray
// singleApi: 'http://single.gray.yohops.com/',
... ...