文件名从 src/api/noticeApi.js 修改 |
| | |
| | | import { $fytz } from './index'; |
| | | import { $fytz } from '../index'; |
| | | |
| | | const id = 'IF3DgsgKxSWvTM3M'; |
| | | const id = 'BbEfZ4izeR4TEZ2N'; |
| | | const name = 'pcheck'; |
| | | |
| | | export default { |
| | |
| | | */ |
| | | 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); |
| | | }, |
| | | |
| | | /** |
| | |
| | | } |
| | | */ |
| | | 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); |
| | | }, |
| | | }; |