Authored by 郭成尧

Merge branch 'feature/reds' into release/5.6

... ... @@ -398,7 +398,6 @@ const shop = {
redShop(req, res, next) {
let shopId = req.query.shop_id; // test3 792
let channel = req.yoho.channel || 'boys';
let gender = req.query.gender;
let uid = req.user.uid || 0;
let udid = req.sessionID || 'yoho';
... ... @@ -411,7 +410,7 @@ const shop = {
let shopData = yield redsShopModel.getIntro(shopId);
let favCountData = yield redsShopModel.favCount(shopId, uid, channel, udid);
let decoratorsData = yield redsShopModel.getShopsdecorator(shopId);
let categoryData = yield redsShopModel.getShopCategory(shopId, channel, gender);
let categoryData = yield redsShopModel.getShopCategory(shopId, channel);
let banner = _.get(bannerData, 'data.banner');
let shopInfo = redShopPrcs.shopIntro(_.get(shopData, 'data', {}));
... ...
... ... @@ -160,11 +160,10 @@ const getShopIntro = (shopId, uid) => {
* @param {string} channel 频道
* @return array
*/
const _getShopCategory = (shopId, channel, gender) => {
const _getShopCategory = (shopId, channel) => {
return api.get('', {
method: 'app.shop.getSortInfo',
yh_channel: yhChannel[channel],
gender: gender || '1,3',
shop_id: shopId
}, {code: 200, cache: true}).then(result => {
return result && result.data;
... ... @@ -841,7 +840,7 @@ const getShopCategory = (params) => {
category: []
};
return _getShopCategory(params.shopId, params.channel, params.gender).then(result => {
return _getShopCategory(params.shopId, params.channel).then(result => {
let resultCopy = _.cloneDeep(result);
_.forEach(resultCopy, value => {
... ...
... ... @@ -65,11 +65,10 @@ exports.getShopsdecorator = shopId => {
* @param {string} channel 频道
* @return array
*/
exports.getShopCategory = (shopId, channel, gender) => {
exports.getShopCategory = (shopId, channel) => {
return api.get('', {
method: 'app.shop.getSortInfo',
yh_channel: yhChannel[channel],
gender: gender || '1,3',
shop_id: shopId
});
};
... ...