| | |
| | | */ |
| | | getNoticeHistory({ type, subtype = null, page = 1, perPage = 20 }) { |
| | | const params = `userId=${id}&page=${page}&per_page=${perPage}`; |
| | | return $fytz.post(`notifications/history?${params}`, { |
| | | ecNoticetype: type, |
| | | ecNoticesubtype: subtype |
| | | }); |
| | | return $fytz |
| | | .post(`notifications/history?${params}`, { |
| | | ecNoticetype: type, |
| | | ecNoticesubtype: subtype |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 获取用户未读通知 |
| | | */ |
| | | getNotification() { |
| | | return $fytz.get('notifications', { |
| | | params: { |
| | | userId: id, |
| | | page: 1, |
| | | per_page: 30 |
| | | } |
| | | }); |
| | | return $fytz |
| | | .get('notifications', { |
| | | params: { |
| | | userId: id, |
| | | page: 1, |
| | | per_page: 30 |
| | | } |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | releaseNotice(notice) { |
| | | notice.authorId = id; |
| | | notice.authorName = name; |
| | | return $fytz.post(`notifications/${id}/release2`, notice); |
| | | return $fytz.post(`notifications/${id}/release2`, notice).then((res) => res.data); |
| | | } |
| | | }; |