Explorar o código

filter is_on_sale in good list

Ark %!s(int64=5) %!d(string=hai) anos
pai
achega
c79908cfab
Modificáronse 2 ficheiros con 3 adicións e 1 borrados
  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;
     }