QinGang_interested/lib/http/modules/notif_api.dart

69 lines
1.6 KiB
Dart

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 ,
},
);
}
}