reloaded 4 years ago
parent
commit
8aea16ba5c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/service/notice.js

+ 2 - 1
app/service/notice.js

@@ -62,6 +62,7 @@ class NoticeService extends CrudService {
     const res = [];
     for (const _notice of notices) {
       const notice = _.cloneDeep(JSON.parse(JSON.stringify(_notice)));
+      const { noticeid, content, notified, meta } = notice;
       const elm = [];
       for (const notified of notice.notified) {
         const _notified = _.cloneDeep(JSON.parse(JSON.stringify(notified)));
@@ -70,7 +71,7 @@ class NoticeService extends CrudService {
         console.log({ ...JSON.parse(JSON.stringify(userinfo)), ..._notified });
         elm.push({ ...JSON.parse(JSON.stringify(userinfo)), ..._notified });
       }
-      res.push(elm);
+      res.push({ noticeid, content, meta, notified: elm });
     }
     return { data: res, total };
   }