Explorar o código

添加cms 查询条件

asd123a20 %!s(int64=2) %!d(string=hai) anos
pai
achega
cec6efe9a8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      service-cms/app/service/content.js

+ 2 - 1
service-cms/app/service/content.js

@@ -46,7 +46,7 @@ class ContentService extends Service {
       throw error;
     }
   }
-  async query({ skip, limit, title, date, bind, keywords, svip, isShow, status, istop, parentCode }) {
+  async query({ skip, limit, title, date, bind, keywords, svip, isShow, status, istop, parentCode, recommend }) {
     if (parentCode) {
       const menus = await this.service.menu.menuList({ code: parentCode });
       const filter = { bind: { $in: menus } };
@@ -72,6 +72,7 @@ class ContentService extends Service {
         filter.$or.push(JSON.parse(datas));
       }
     }
+    if (recommend) filter.recommend = recommend;
     if (bind) filter.bind = bind;
     try {
       let res;