...
|
...
|
@@ -7,6 +7,7 @@ const md5 = require('md5'); |
|
|
|
|
|
const api = global.yoho.API;
|
|
|
const serviceApi = global.yoho.ServiceAPI;
|
|
|
const config = global.yoho.config;
|
|
|
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const cache = global.yoho.cache;
|
...
|
...
|
@@ -17,7 +18,7 @@ const images = require('../../../utils/images.js'); |
|
|
const getSortByConditionAsync = (condition) => {
|
|
|
return api.get('', Object.assign({
|
|
|
method: 'web.regular.groupsort'
|
|
|
}, condition));
|
|
|
}, condition), config.apiCache);
|
|
|
};
|
|
|
|
|
|
// 判断用户是否收藏品牌
|
...
|
...
|
@@ -97,7 +98,7 @@ const getProductList = (params) => { |
|
|
}
|
|
|
};
|
|
|
|
|
|
const getSortListOrig = (finalParams) => api.get('', finalParams);
|
|
|
const getSortListOrig = (finalParams) => api.get('', finalParams, config.apiCache);
|
|
|
|
|
|
/**
|
|
|
* 获取分类列表
|
...
|
...
|
@@ -153,7 +154,7 @@ const getSortIntro = (params) => { |
|
|
};
|
|
|
|
|
|
Object.assign(finalParams, params);
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -166,7 +167,7 @@ const getSortAds = (params) => { |
|
|
};
|
|
|
|
|
|
Object.assign(finalParams, params);
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -181,7 +182,7 @@ const getBrandSeries = (params) => { |
|
|
status: params.status || 1
|
|
|
};
|
|
|
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -196,7 +197,7 @@ const getBrandFolder = (params) => { |
|
|
status: params.status || 1
|
|
|
};
|
|
|
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -210,7 +211,7 @@ const getNodeContent = (params) => { |
|
|
node: params.node || ''
|
|
|
};
|
|
|
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -224,7 +225,7 @@ const getWeekNew = (params) => { |
|
|
};
|
|
|
|
|
|
Object.assign(finalParams, params);
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -427,7 +428,7 @@ const getSuggest = (params) => { |
|
|
keyword: params.keyword || ''
|
|
|
};
|
|
|
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
|
...
|
...
|
@@ -441,7 +442,7 @@ const getBrandData = (params) => { |
|
|
domain: params.domain || ''
|
|
|
};
|
|
|
|
|
|
return api.get('', finalParams);
|
|
|
return api.get('', finalParams, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -452,7 +453,7 @@ const isFavoriteBrand = (uid, brandId) => { |
|
|
return serviceApi.get(isFavoriteBrandUrl, {
|
|
|
uid: uid,
|
|
|
brandId: brandId
|
|
|
});
|
|
|
}, config.apiCache);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
|