浏览代码

修改绑定编码不需要模糊查询

asd123a20 2 年之前
父节点
当前提交
c00e9062cc
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      service-cms/app/service/content.js

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

@@ -60,7 +60,7 @@ class ContentService extends Service {
     }
 
     const filter = {};
-    const arr = { title, date, bind, keywords, svip, isShow, status, istop };
+    const arr = { title, date, keywords, svip, isShow, status, istop };
     for (const e in arr) {
       let datas;
       if (e === 'keywords') {
@@ -73,6 +73,7 @@ class ContentService extends Service {
         filter.$or.push(JSON.parse(datas));
       }
     }
+    if (bind) filter.bind = bind;
     try {
       let res;
       const total = await this.model.find({ ...filter }, { content: false });