|
@@ -12,7 +12,7 @@ const _ = require('lodash'); |
|
@@ -12,7 +12,7 @@ const _ = require('lodash'); |
12
|
const helpers = global.yoho.helpers;
|
12
|
const helpers = global.yoho.helpers;
|
13
|
|
13
|
|
14
|
/**
|
14
|
/**
|
15
|
- * 店铺基础模板
|
15
|
+ * 店铺 - 基础模板
|
16
|
*/
|
16
|
*/
|
17
|
const _baseShop = (req, res, shopInfo) => {
|
17
|
const _baseShop = (req, res, shopInfo) => {
|
18
|
|
18
|
|
|
@@ -34,7 +34,7 @@ const _baseShop = (req, res, shopInfo) => { |
|
@@ -34,7 +34,7 @@ const _baseShop = (req, res, shopInfo) => { |
34
|
};
|
34
|
};
|
35
|
|
35
|
|
36
|
/**
|
36
|
/**
|
37
|
- * 店铺首页 || 若店铺使用基础模板就使用基础模板
|
37
|
+ * 店铺首页
|
38
|
* @return int
|
38
|
* @return int
|
39
|
*/
|
39
|
*/
|
40
|
const _shop = (req, res, shopId) => {
|
40
|
const _shop = (req, res, shopId) => {
|
|
@@ -68,7 +68,7 @@ const _shop = (req, res, shopId) => { |
|
@@ -68,7 +68,7 @@ const _shop = (req, res, shopId) => { |
68
|
listModel.getShopData(req, shopId, uid, isApp).then(result => {
|
68
|
listModel.getShopData(req, shopId, uid, isApp).then(result => {
|
69
|
if (result.goBrand) {
|
69
|
if (result.goBrand) {
|
70
|
|
70
|
|
71
|
- // 跳转基础模板
|
71
|
+ /* 若店铺使用基础模板跳转基础模板 */
|
72
|
_baseShop(req, res, result.goBrand);
|
72
|
_baseShop(req, res, result.goBrand);
|
73
|
} else {
|
73
|
} else {
|
74
|
result = _.assign(result, pageHeader);
|
74
|
result = _.assign(result, pageHeader);
|
|
@@ -101,7 +101,12 @@ const category = (req, res) => { |
|
@@ -101,7 +101,12 @@ const category = (req, res) => { |
101
|
});
|
101
|
});
|
102
|
};
|
102
|
};
|
103
|
|
103
|
|
104
|
-// 品牌|店铺落地页
|
104
|
+/**
|
|
|
105
|
+ * 品牌店铺的入口
|
|
|
106
|
+ * @param req
|
|
|
107
|
+ * @param res
|
|
|
108
|
+ * @param next
|
|
|
109
|
+ */
|
105
|
const brand = (req, res, next) => {
|
110
|
const brand = (req, res, next) => {
|
106
|
let params = Object.assign({}, req.query);
|
111
|
let params = Object.assign({}, req.query);
|
107
|
let domain = req.query.domain;
|
112
|
let domain = req.query.domain;
|
|
@@ -179,7 +184,12 @@ const brand = (req, res, next) => { |
|
@@ -179,7 +184,12 @@ const brand = (req, res, next) => { |
179
|
}).catch(next);
|
184
|
}).catch(next);
|
180
|
};
|
185
|
};
|
181
|
|
186
|
|
182
|
-// 店铺简介
|
187
|
+/**
|
|
|
188
|
+ * 店铺简介
|
|
|
189
|
+ * @param req
|
|
|
190
|
+ * @param res
|
|
|
191
|
+ * @param next
|
|
|
192
|
+ */
|
183
|
const shopIntro = (req, res, next) => {
|
193
|
const shopIntro = (req, res, next) => {
|
184
|
let shopId = req.query.shop_id;
|
194
|
let shopId = req.query.shop_id;
|
185
|
let appVersion = req.body.appVersion || false;
|
195
|
let appVersion = req.body.appVersion || false;
|