IM的链接和断开时机调整,APP打开自动判断登录,链接。退出登录后断开链接

新朋友数量提醒
This commit is contained in:
2022-01-28 11:24:10 +08:00
parent 8e047408e2
commit f9e2819cc7
7 changed files with 728 additions and 615 deletions

View File

@@ -22,14 +22,14 @@ const getImToken = () => {
url: 'im/token',
}, true)
}
// 删除好友
const deleteFriend = (targetId) => {
return request({
method: 'DELETE',
url: 'im/friends/' + targetId,
})
}
// 删除好友
const deleteFriend = (targetId) => {
return request({
method: 'DELETE',
url: 'im/friends/' + targetId,
})
}
// 获取用户信息
const getUserInfo = (targetId) => {
@@ -37,9 +37,9 @@ const getUserInfo = (targetId) => {
url: 'im/userInfo/' + targetId,
})
}
/**
* 查看好友资料,附带好友关系
/**
* 查看好友资料,附带好友关系
*/
const getFriendInfo = (userId) => {
return request({
@@ -84,16 +84,26 @@ const pedingFriend = (recipient) => {
url: 'im/friends/' + recipient
})
}
/**
* 好友申请数量
*/
const getPendingCount = () => {
return request({
url: 'im/friends/pending/count'
})
}
export {
getImToken,
getImToken,
deleteFriend,
getFriends,
getUserInfo,
getUserInfo,
getFriendInfo,
getPedings,
resolveFriend,
rejectFriend,
searchFriend,
pedingFriend
pedingFriend,
getPendingCount
}