QinGang_interested/lib/http/modules/notif_api.dart

107 lines
2.5 KiB
Dart
Raw Normal View History

2026-02-28 16:18:08 +08:00
import 'package:dio/dio.dart';
import 'package:qhd_prevention/http/ApiService.dart';
import 'package:qhd_prevention/http/HttpManager.dart';
class NotifApi {
/// 通知列表
static Future<Map<String, dynamic>> getNoticeList(Map data) {
return HttpManager().request(
'${ApiService.basePath}/appmenu',
'/noticeReadRecord/list',
method: Method.post,
data: {
...data ,
},
);
}
/// 通知详情
static Future<Map<String, dynamic>> getNoticeDetail(String noticeId) {
return HttpManager().request(
'${ApiService.basePath}/appmenu',
'/notice/noticeContentInfo/$noticeId',
method: Method.get,
data: {
// ...data ,
},
);
}
/// 已阅
static Future<Map<String, dynamic>> saveReadNoticeDetail(String noticeId) {
return HttpManager().request(
'${ApiService.basePath}/appmenu',
'/noticeReadRecord/save',
method: Method.post,
data: {
"noticeId": noticeId,
},
);
}
/// 回复
static Future<Map<String, dynamic>> replyContent(String noticeReadId,String replyContent) {
return HttpManager().request(
'${ApiService.basePath}/appmenu',
'/noticeReadRecord/reply',
method: Method.put,
data: {
"noticeReadId": noticeReadId,
"replyContent": replyContent,
},
);
}
/// 通知数量
static Future<Map<String, dynamic>> getNotifRedPoint() {
return HttpManager().request(
'${ApiService.basePath}/appmenu',
'/notice/unreadCount',
method: Method.get,
data: {
// ...data ,
},
);
}
2026-03-23 08:41:16 +08:00
/// 公告列表
static Future<Map<String, dynamic>> getAnnouncementList(Map data) {
return HttpManager().request(
'${ApiService.basePath}/base',
'/messages/page?pageSize=9999&pageIndex=${data['pageIndex']}',
method: Method.get,
data: {
// ...data ,
},
);
}
/// 公告详情
static Future<Map<String, dynamic>> getAnnouncementDetail(String noticeId) {
return HttpManager().request(
'${ApiService.basePath}/message',
'/messages/$noticeId',
method: Method.get,
data: {
// ...data ,
},
);
}
/// 公告列表数量
static Future<Map<String, dynamic>> getAnnouncementRedPoint() {
return HttpManager().request(
'${ApiService.basePath}/base',
'/messages/page?pageSize=9999&pageIndex=1&statusEnum=UNREAD',
method: Method.get,
data: {
// ...data ,
},
);
}
2026-02-28 16:18:08 +08:00
}