riku
2023-05-09 0959c095ad9715633d6ccdf10eb3b3d52f0bede1
src/api/fytz/noticeApi.js
文件名从 src/api/noticeApi.js 修改
@@ -1,6 +1,6 @@
import { $fytz } from './index';
import { $fytz } from '../index';
const id = 'IF3DgsgKxSWvTM3M';
const id = 'BbEfZ4izeR4TEZ2N';
const name = 'pcheck';
export default {
@@ -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}`, {
    return $fytz
      .post(`notifications/history?${params}`, {
      ecNoticetype: type,
      ecNoticesubtype: subtype,
    });
      })
      .then((res) => res.data);
  },
  /**
   * 鑾峰彇鐢ㄦ埛鏈閫氱煡
   */
  getNotification() {
    return $fytz.get('notifications', {
    return $fytz
      .get('notifications', {
      params: {
        userId: id,
        page: 1,
        per_page: 30,
      },
    });
      })
      .then((res) => res.data);
  },
  /**
@@ -60,8 +64,10 @@
      }
   */
  releaseNotice(notice) {
    notice.authorId = id
    notice.authorName = name
    return $fytz.post(`notifications/${id}/release2`, notice);
    notice.authorId = id;
    notice.authorName = name;
    return $fytz
      .post(`notifications/${id}/release2`, notice)
      .then((res) => res.data);
  },
};