riku
2025-09-16 5ad61d6ad3a0ce12c7fe0808527069b09a7c9c0d
src/api/fytz/noticeApi.js
@@ -9,23 +9,27 @@
   */
  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);
  },
  /**
@@ -62,6 +66,6 @@
  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);
  }
};