riku
2023-12-18 356f54467f525f437f41271fb62f6be66f2ab1e5
src/api/fytz/noticeApi.js
@@ -9,27 +9,23 @@
   */
  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,
      })
      .then((res) => res.data);
    return $fytz.post(`notifications/history?${params}`, {
      ecNoticetype: type,
      ecNoticesubtype: subtype
    });
  },
  /**
   * 获取用户未读通知
   */
  getNotification() {
    return $fytz
      .get('notifications', {
        params: {
          userId: id,
          page: 1,
          per_page: 30,
        },
      })
      .then((res) => res.data);
    return $fytz.get('notifications', {
      params: {
        userId: id,
        page: 1,
        per_page: 30
      }
    });
  },
  /**
@@ -66,8 +62,6 @@
  releaseNotice(notice) {
    notice.authorId = id;
    notice.authorName = name;
    return $fytz
      .post(`notifications/${id}/release2`, notice)
      .then((res) => res.data);
  },
    return $fytz.post(`notifications/${id}/release2`, notice);
  }
};