Prechádzať zdrojové kódy

filter is_on_sale in good list

Ark 5 rokov pred
rodič
commit
c79908cfab
2 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  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;
     }