Pārlūkot izejas kodu

filter is_on_sale in good list

Ark 5 gadi atpakaļ
vecāks
revīzija
c79908cfab
2 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 1 0
      .gitignore
  2. 2 1
      src/api/controller/goods.js

+ 1 - 0
.gitignore

@@ -35,3 +35,4 @@ app/
 
 config.development.js
 adapter.development.js
+package-lock.json

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

@@ -13,7 +13,6 @@ module.exports = class extends Base {
   async indexAction() {
     const model = this.model('goods');
     const goodsList = await model.select();
-l
     return this.success(goodsList);
   }
 
@@ -123,6 +122,8 @@ l
     const goodsQuery = this.model('goods');
 
     const whereMap = {};
+    whereMap.is_on_sale = 1;
+    whereMap.is_delete = 0;
     if (!think.isEmpty(isNew)) {
       whereMap.is_new = isNew;
     }