Authored by 郭成尧

'shop-ok'

... ... @@ -12,7 +12,7 @@ const _ = require('lodash');
const helpers = global.yoho.helpers;
/**
* 店铺基础模板
* 店铺 - 基础模板
*/
const _baseShop = (req, res, shopInfo) => {
... ... @@ -34,7 +34,7 @@ const _baseShop = (req, res, shopInfo) => {
};
/**
* 店铺首页 || 若店铺使用基础模板就使用基础模板
* 店铺首页
* @return int
*/
const _shop = (req, res, shopId) => {
... ... @@ -68,7 +68,7 @@ const _shop = (req, res, shopId) => {
listModel.getShopData(req, shopId, uid, isApp).then(result => {
if (result.goBrand) {
// 跳转基础模板
/* 若店铺使用基础模板跳转基础模板 */
_baseShop(req, res, result.goBrand);
} else {
result = _.assign(result, pageHeader);
... ... @@ -101,7 +101,12 @@ const category = (req, res) => {
});
};
// 品牌|店铺落地页
/**
* 品牌店铺的入口
* @param req
* @param res
* @param next
*/
const brand = (req, res, next) => {
let params = Object.assign({}, req.query);
let domain = req.query.domain;
... ... @@ -179,7 +184,12 @@ const brand = (req, res, next) => {
}).catch(next);
};
// 店铺简介
/**
* 店铺简介
* @param req
* @param res
* @param next
*/
const shopIntro = (req, res, next) => {
let shopId = req.query.shop_id;
let appVersion = req.body.appVersion || false;
... ...
... ... @@ -455,15 +455,13 @@ const getShopData = (req, shopId, uid, isApp) => {
_getShopDecorator(shopId),
searchModel.getFilterData({
shop_id: shopId,
gender: '1,3', // TODO TAR 获取性别
channel: channel,
brand: '' // TODO TAR 获取品牌
gender: req.query.gender || '1,3',
channel: channel
}),
searchModel.getSearchData({
shop_id: shopId,
gender: '1,3', // TODO TAR 获取性别
channel: channel,
brand: '' // TODO TAR 获取品牌
gender: req.query.gender || '1,3',
channel: channel
})
]).then((result) => {
shopData = {
... ... @@ -479,7 +477,7 @@ const getShopData = (req, shopId, uid, isApp) => {
// noinspection JSCheckFunctionSignatures
return Object.assign(_formShopData(shopData, shopId, isApp),
{filter: result[1]}, {goods: result[2]}); // TODO TAR 获取筛选数据和商品数据数据校验
{filter: result[1]}, {goods: result[2]});
});
});
... ...