StephenArk30 5 年 前
コミット
3e4e65d407
2 ファイル変更3 行追加3 行削除
  1. 1 1
      src/api/controller/goods.js
  2. 2 2
      src/api/controller/index.js

+ 1 - 1
src/api/controller/goods.js

@@ -13,7 +13,7 @@ module.exports = class extends Base {
   async indexAction() {
     const model = this.model('goods');
     const goodsList = await model.select();
-
+l
     return this.success(goodsList);
   }
 

+ 2 - 2
src/api/controller/index.js

@@ -4,8 +4,8 @@ module.exports = class extends Base {
   async indexAction() {
     const banner = await this.model('ad').where({ad_position_id: 1}).select();
     const channel = await this.model('channel').order({sort_order: 'asc'}).select();
-    const newGoods = await this.model('goods').field(['id', 'name', 'list_pic_url', 'retail_price']).where({is_new: 1}).limit(4).select();
-    const hotGoods = await this.model('goods').field(['id', 'name', 'list_pic_url', 'retail_price', 'goods_brief']).where({is_hot: 1}).limit(3).select();
+    const newGoods = await this.model('goods').field(['id', 'name', 'list_pic_url', 'retail_price']).where({is_new: 1}).select();
+    const hotGoods = await this.model('goods').field(['id', 'name', 'list_pic_url', 'retail_price', 'goods_brief']).where({is_hot: 1}).select();
     const brandList = await this.model('brand').where({is_new: 1}).order({new_sort_order: 'asc'}).limit(4).select();
     const topicList = await this.model('topic').limit(3).select();