mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 08:55:52 +08:00
IM
This commit is contained in:
109
im/src/api/chat.js
Normal file
109
im/src/api/chat.js
Normal file
@@ -0,0 +1,109 @@
|
||||
import { post, get, upload, del } from "@/utils/request";
|
||||
|
||||
// 获取聊天列表服务接口
|
||||
export const ServeGetTalkList = (data) => {
|
||||
return get("/im/talk/list", data);
|
||||
};
|
||||
|
||||
// 获取聊天列表服务接口
|
||||
export const ServeGetStoreTalkList = (data) => {
|
||||
return get("/im/talk/store/list", data);
|
||||
};
|
||||
|
||||
// 聊天列表创建服务接口
|
||||
export const ServeCreateTalkList = (id) => {
|
||||
return get(`/im/talk/user/${id}`);
|
||||
};
|
||||
|
||||
// 删除聊天列表服务接口
|
||||
export const ServeDeleteTalkList = (data) => {
|
||||
return del("/im/talk", data);
|
||||
};
|
||||
|
||||
// 对话列表置顶服务接口
|
||||
export const ServeTopTalkList = (data) => {
|
||||
return post("/im/talk/top", data);
|
||||
};
|
||||
|
||||
// 清除聊天消息未读数服务接口
|
||||
export const ServeClearTalkUnreadNum = (data) => {
|
||||
return post("/im/talk/update-unread-num", data);
|
||||
};
|
||||
|
||||
// 获取聊天记录服务接口
|
||||
export const ServeTalkRecords = (data) => {
|
||||
return get("/im/message", data);
|
||||
};
|
||||
|
||||
// 获取转发会话记录详情列表服务接口
|
||||
export const ServeGetForwardRecords = (data) => {
|
||||
return get("/im/talk/get-forward-records", data);
|
||||
};
|
||||
|
||||
// 对话列表置顶服务接口
|
||||
export const ServeSetNotDisturb = (data) => {
|
||||
return post("/im/talk/disturb", data);
|
||||
};
|
||||
|
||||
// 查找用户聊天记录服务接口
|
||||
export const ServeFindTalkRecords = (data) => {
|
||||
return get("/im/talk/find-chat-records", data);
|
||||
};
|
||||
|
||||
// 搜索用户聊天记录服务接口
|
||||
export const ServeSearchTalkRecords = (data) => {
|
||||
return get("/im/talk/search-chat-records", data);
|
||||
};
|
||||
|
||||
export const ServeGetRecordsContext = (data) => {
|
||||
return get("/im/talk/get-records-context", data);
|
||||
};
|
||||
|
||||
// 发送代码块消息服务接口
|
||||
export const ServeSendTalkCodeBlock = (data) => {
|
||||
return post("/im/talk/message/code", data);
|
||||
};
|
||||
|
||||
// 发送聊天文件服务接口
|
||||
export const ServeSendTalkFile = (data) => {
|
||||
return post("/im/talk/message/file", data);
|
||||
};
|
||||
|
||||
// 发送聊天图片服务接口
|
||||
export const ServeSendTalkImage = (data) => {
|
||||
return upload("/common/common/upload/file", data);
|
||||
};
|
||||
|
||||
// 发送表情包服务接口
|
||||
export const ServeSendEmoticon = (data) => {
|
||||
return post("/im/talk/message/emoticon", data);
|
||||
};
|
||||
|
||||
// 转发消息服务接口
|
||||
export const ServeForwardRecords = (data) => {
|
||||
return post("/im/talk/message/forward", data);
|
||||
};
|
||||
|
||||
// 撤回消息服务接口
|
||||
export const ServeRevokeRecords = (data) => {
|
||||
return post("/im/talk/message/revoke", data);
|
||||
};
|
||||
|
||||
// 删除消息服务接口
|
||||
export const ServeRemoveRecords = (data) => {
|
||||
return post("/im/talk/message/delete", data);
|
||||
};
|
||||
|
||||
// 收藏表情包服务接口
|
||||
export const ServeCollectEmoticon = (data) => {
|
||||
return post("/im/talk/message/collect", data);
|
||||
};
|
||||
|
||||
//投票
|
||||
export const ServeSendVote = (data) => {
|
||||
return post("/im/talk/message/vote", data);
|
||||
};
|
||||
|
||||
export const ServeConfirmVoteHandle = (data) => {
|
||||
return post("/im/talk/message/vote/handle", data);
|
||||
};
|
||||
45
im/src/api/contacts.js
Normal file
45
im/src/api/contacts.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import { post, get } from '@/utils/request'
|
||||
|
||||
// 获取好友列表服务接口
|
||||
export const ServeGetContacts = data => {
|
||||
return get('/contacts/list', data)
|
||||
}
|
||||
|
||||
// 解除好友关系服务接口
|
||||
export const ServeDeleteContact = data => {
|
||||
return post('/contacts/delete', data)
|
||||
}
|
||||
|
||||
// 修改好友备注服务接口
|
||||
export const ServeEditContactRemark = data => {
|
||||
return post('/contacts/edit-remark', data)
|
||||
}
|
||||
|
||||
// 搜索联系人
|
||||
export const ServeSearchContact = data => {
|
||||
return get('/contacts/search', data)
|
||||
}
|
||||
|
||||
// 好友申请服务接口
|
||||
export const ServeCreateContact = data => {
|
||||
return post('/contacts/apply/create', data)
|
||||
}
|
||||
|
||||
// 查询好友申请服务接口
|
||||
export const ServeGetContactApplyRecords = data => {
|
||||
return get('/contacts/apply/records', data)
|
||||
}
|
||||
|
||||
// 处理好友申请服务接口
|
||||
export const ServeApplyAccept = data => {
|
||||
return post('/contacts/apply/accept', data)
|
||||
}
|
||||
|
||||
export const ServeApplyDecline = data => {
|
||||
return post('/contacts/apply/decline', data)
|
||||
}
|
||||
|
||||
// 查询好友申请未读数量服务接口
|
||||
export const ServeFindFriendApplyNum = () => {
|
||||
return get('/contacts/apply-unread-num')
|
||||
}
|
||||
26
im/src/api/emoticon.js
Normal file
26
im/src/api/emoticon.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { post, get, upload } from '@/utils/request'
|
||||
|
||||
// 查询用户表情包服务接口
|
||||
export const ServeFindUserEmoticon = () => {
|
||||
return get('/emoticon/list')
|
||||
}
|
||||
|
||||
// 查询系统表情包服务接口
|
||||
export const ServeFindSysEmoticon = () => {
|
||||
return get('/emoticon/system')
|
||||
}
|
||||
|
||||
// 设置用户表情包服务接口
|
||||
export const ServeSetUserEmoticon = data => {
|
||||
return post('/emoticon/set-user-emoticon', data)
|
||||
}
|
||||
|
||||
// 移除收藏表情包服务接口
|
||||
export const ServeDelCollectEmoticon = data => {
|
||||
return post('/emoticon/del-collect-emoticon', data)
|
||||
}
|
||||
|
||||
// 上传表情包服务接口
|
||||
export const ServeUploadEmoticon = data => {
|
||||
return upload('/emoticon/upload-emoticon', data)
|
||||
}
|
||||
5
im/src/api/goods.js
Normal file
5
im/src/api/goods.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { post, get, upload, del } from "@/utils/request";
|
||||
|
||||
export const ServeGetGoodsDetail = (data) => {
|
||||
return get(`/im/goods/goods/sku/${data.goodsId}/${data.skuId}`);
|
||||
};
|
||||
66
im/src/api/group.js
Normal file
66
im/src/api/group.js
Normal file
@@ -0,0 +1,66 @@
|
||||
import { post, get } from '@/utils/request'
|
||||
|
||||
// 查询用户群聊服务接口
|
||||
export const ServeGetGroups = () => {
|
||||
return get('/group/list')
|
||||
}
|
||||
|
||||
// 获取群信息服务接口
|
||||
export const ServeGroupDetail = data => {
|
||||
return get('/group/detail', data)
|
||||
}
|
||||
|
||||
// 创建群聊服务接口
|
||||
export const ServeCreateGroup = data => {
|
||||
return post('/group/create', data)
|
||||
}
|
||||
|
||||
// 修改群信息
|
||||
export const ServeEditGroup = data => {
|
||||
return post('/group/edit', data)
|
||||
}
|
||||
|
||||
// 邀请好友加入群聊服务接口
|
||||
export const ServeInviteGroup = data => {
|
||||
return post('/group/invite', data)
|
||||
}
|
||||
|
||||
// 移除群聊成员服务接口
|
||||
export const ServeRemoveMembersGroup = data => {
|
||||
return post('/group/remove-members', data)
|
||||
}
|
||||
|
||||
// 管理员解散群聊服务接口
|
||||
export const ServeDismissGroup = data => {
|
||||
return post('/group/dismiss', data)
|
||||
}
|
||||
|
||||
// 用户退出群聊服务接口
|
||||
export const ServeSecedeGroup = data => {
|
||||
return post('/group/secede', data)
|
||||
}
|
||||
|
||||
// 修改群聊名片服务接口
|
||||
export const ServeUpdateGroupCard = data => {
|
||||
return post('/group/set-group-card', data)
|
||||
}
|
||||
|
||||
// 获取用户可邀请加入群组的好友列表
|
||||
export const ServeGetInviteFriends = data => {
|
||||
return get('/group/invite-friends', data)
|
||||
}
|
||||
|
||||
// 获取群组成员列表
|
||||
export const ServeGetGroupMembers = data => {
|
||||
return get('/group/members', data)
|
||||
}
|
||||
|
||||
// 获取群组公告列表
|
||||
export const ServeGetGroupNotices = data => {
|
||||
return get('/group/notices', data)
|
||||
}
|
||||
|
||||
// 编辑群公告
|
||||
export const ServeEditGroupNotice = data => {
|
||||
return post('/group/edit-notice', data)
|
||||
}
|
||||
16
im/src/api/upload.js
Normal file
16
im/src/api/upload.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { post, get, upload } from '@/utils/request'
|
||||
|
||||
// 上传头像裁剪图片服务接口
|
||||
export const ServeUploadFileStream = data => {
|
||||
return post('/upload/file-stream', data)
|
||||
}
|
||||
|
||||
// 查询大文件拆分信息服务接口
|
||||
export const ServeFindFileSplitInfo = (data = {}) => {
|
||||
return get('/upload/get-file-split-info', data)
|
||||
}
|
||||
|
||||
// 文件拆分上传服务接口
|
||||
export const ServeFileSubareaUpload = (data = {}, options = {}) => {
|
||||
return upload('/upload/file-subarea-upload', data, options)
|
||||
}
|
||||
26
im/src/api/user.js
Normal file
26
im/src/api/user.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { get } from "@/utils/request";
|
||||
|
||||
// 获取用户相关设置信息
|
||||
export const ServeGetUserSetting = () => {
|
||||
return get("/im/user");
|
||||
};
|
||||
|
||||
// 获取店铺相关设置信息
|
||||
export const ServeGetStoreSetting = () => {
|
||||
return get("/im/user/store");
|
||||
};
|
||||
|
||||
// 获取用户相关设置信息
|
||||
export const ServeGetUserDetail = (memberId) => {
|
||||
return get(`/im/user/${memberId}`);
|
||||
};
|
||||
|
||||
// 获取店铺相关设置信息
|
||||
export const ServeGetStoreDetail = (storeId) => {
|
||||
return get(`/im/user/store/${storeId}`);
|
||||
};
|
||||
|
||||
// 获取店铺相关设置信息
|
||||
export const ServeGetFootPrint = (params) => {
|
||||
return get(`/im/user/history`,params);
|
||||
};
|
||||
Reference in New Issue
Block a user