2025-03-12 09:20:05 +08:00
|
|
|
import { post, get, del } from "@/utils/request";
|
2022-12-28 10:08:51 +08:00
|
|
|
|
|
|
|
// 获取好友列表服务接口
|
2025-03-12 09:20:05 +08:00
|
|
|
export const ServeGetContacts = (data) => {
|
|
|
|
return get("/contacts/list", data);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
|
|
|
// 解除好友关系服务接口
|
2025-03-12 09:20:05 +08:00
|
|
|
export const ServeDeleteContact = (data) => {
|
|
|
|
return post("/contacts/delete", data);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
|
|
|
// 修改好友备注服务接口
|
2025-03-12 09:20:05 +08:00
|
|
|
export const ServeEditContactRemark = (data) => {
|
|
|
|
return post("/contacts/edit-remark", data);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
2025-03-12 09:20:05 +08:00
|
|
|
// // 搜索联系人
|
|
|
|
// export const ServeSearchContact = data => {
|
|
|
|
// return get('/contacts/search', data)
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 搜索联系人手机号关注
|
|
|
|
export const ServeSearchContact = (data) => {
|
|
|
|
return post("/im/friend/follow-by-mobile", data);
|
|
|
|
};
|
|
|
|
// 搜索联系人userid关注
|
|
|
|
export const ServeSearchuserid = (data) => {
|
|
|
|
return post("/im/friend/follow/" + data);
|
|
|
|
};
|
|
|
|
|
|
|
|
// 搜索联系人取消关注
|
|
|
|
export const ServeDelete = (data) => {
|
|
|
|
return del("/im/friend/unfollow/" + data);
|
|
|
|
};
|
|
|
|
// 搜索手机号用户2.27
|
|
|
|
export const Sersearch = (data) => {
|
|
|
|
return get("/im/friend/search", data);
|
|
|
|
};
|
|
|
|
// 搜索userid用户2.27
|
|
|
|
export const Sersearchtel = (data) => {
|
|
|
|
return get(`/im/friend/user/${data}`);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
|
|
|
// 好友申请服务接口
|
2025-03-12 09:20:05 +08:00
|
|
|
export const ServeCreateContact = (data) => {
|
|
|
|
return post("/contacts/apply/create", data);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
|
|
|
// 查询好友申请服务接口
|
2025-03-12 09:20:05 +08:00
|
|
|
export const ServeGetContactApplyRecords = (data) => {
|
|
|
|
return get("/contacts/apply/records", data);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
|
|
|
// 处理好友申请服务接口
|
2025-03-12 09:20:05 +08:00
|
|
|
export const ServeApplyAccept = (data) => {
|
|
|
|
return post("/contacts/apply/accept", data);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
2025-03-12 09:20:05 +08:00
|
|
|
export const ServeApplyDecline = (data) => {
|
|
|
|
return post("/contacts/apply/decline", data);
|
|
|
|
};
|
2022-12-28 10:08:51 +08:00
|
|
|
|
|
|
|
// 查询好友申请未读数量服务接口
|
|
|
|
export const ServeFindFriendApplyNum = () => {
|
2025-03-12 09:20:05 +08:00
|
|
|
return get("/contacts/apply-unread-num");
|
|
|
|
};
|