From 0959c095ad9715633d6ccdf10eb3b3d52f0bede1 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 09 五月 2023 09:31:46 +0800
Subject: [PATCH] 2023.5.9前所有小改动版本记录

---
 src/api/fytz/noticeApi.js |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/src/api/noticeApi.js b/src/api/fytz/noticeApi.js
similarity index 64%
rename from src/api/noticeApi.js
rename to src/api/fytz/noticeApi.js
index 70f9b98..175bd98 100644
--- a/src/api/noticeApi.js
+++ b/src/api/fytz/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}`, {
-      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);
   },
 
   /**
@@ -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);
   },
 };

--
Gitblit v1.9.3