feat: 站内通知
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m29s

This commit is contained in:
luo
2026-07-25 11:08:03 +08:00
parent 3929156ef4
commit 9c1c296d2e
10 changed files with 394 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
import request from '@/utils/request.js';
export const notificationApi = {
getList(page = 1, page_size = 20) {
return request({
url: '/api/c/v1/notifications',
method: 'GET',
data: { page, page_size }
});
},
getUnreadCount() {
return request({
url: '/api/c/v1/notifications/unread-count',
method: 'GET'
});
},
markRead(id) {
return request({
url: `/api/c/v1/notifications/${id}/read`,
method: 'PUT'
});
},
markAllRead() {
return request({
url: '/api/c/v1/notifications/read-all',
method: 'PUT'
});
}
};