Authored by 郭成尧

code-better

... ... @@ -370,7 +370,7 @@ const shop = {
* 红人店铺
*/
redShop(req, res, next) {
let shopId = 34; // test
let shopId = req.query.shop_id || 792; // test3
Promise.all([
redsShopModel.getBanner(shopId), // 0: 获取红人店 banner
... ...
... ... @@ -14,10 +14,8 @@ const api = global.yoho.API;
*/
exports.getBanner = shopId => {
let params = {
// method: 'app.popular.shop.banner',
method: 'app.shop.banner', // TODO: this is mock api,use up
shop_id: shopId,
app_type: 0 // 0 有货 1 blk
method: 'app.popular.shop.banner',
shop_id: shopId
};
return api.get('', params, {cache: true, code: 200});
... ... @@ -44,10 +42,8 @@ exports.getShopsBrands = shopId => {
*/
exports.getIntro = shopId => {
let params = {
// method: 'app.popular.shops.getIntro',
method: 'app.shops.getIntro',
shop_id: shopId,
app_type: 0
shop_id: shopId
};
return api.get('', params, {cache: true, code: 200});
... ... @@ -62,8 +58,7 @@ exports.getIntro = shopId => {
exports.getShopsdecorator = shopId => {
let params = {
method: 'app.popular.shopsdecorator',
shop_id: shopId,
app_type: 0
shop_id: shopId
};
return api.get('', params, {cache: true, code: 200});
... ...