lrf hace 2 años
padre
commit
6273d94a3b
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 0 1
      app/middleware/checkLogin.js
  2. 2 1
      app/service/view/goods.js

+ 0 - 1
app/middleware/checkLogin.js

@@ -3,7 +3,6 @@ const _ = require('lodash');
 const whiteList = [];
 module.exports = options => {
   return async function checklogin(ctx, next) {
-    console.log(ctx.admin);
     await next();
   };
 };

+ 2 - 1
app/service/view/goods.js

@@ -105,7 +105,8 @@ class GoodsService extends CrudService {
   }
 
   async indexActTagsGoods() {
-    const list = await this.ctx.model.System.ActTags.find({ status: '0' }).sort({ sort: 1 });
+    // 将使用中且展示在首页的查出来排序
+    const list = await this.ctx.model.System.ActTags.find({ status: '0', show_index: '0' }).sort({ sort: 1 });
     const result = [];
     for (const t of list) {
       const { label, value } = t;