feat: 未读消息计数
This commit is contained in:
@ -539,4 +539,7 @@ class Api {
|
||||
/// 关闭会话
|
||||
static const String removeSession =
|
||||
'${HttpString.tUrl}/session_svr/v1/session_svr/remove_session';
|
||||
|
||||
/// 消息未读数
|
||||
static const String unread = '${HttpString.tUrl}/x/im/web/msgfeed/unread';
|
||||
}
|
||||
|
@ -225,4 +225,16 @@ class MsgHttp {
|
||||
return {'status': false, 'date': [], 'msg': res.data['message']};
|
||||
}
|
||||
}
|
||||
|
||||
static Future unread() async {
|
||||
var res = await Request().get(Api.unread);
|
||||
if (res.data['code'] == 0) {
|
||||
return {
|
||||
'status': true,
|
||||
'data': res.data['data'],
|
||||
};
|
||||
} else {
|
||||
return {'status': false, 'date': [], 'msg': res.data['message']};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user