import request from '@/utils/request'

//1.已有好友的情况 start ------------------------------------->

//1.1 获取消息列表 - 刘佳伟
// export function getTalkSessionList(params) {
//   return request({
//     url: '/chat/getTalkSessionList',
//     method: 'get',
//     params
//   })
// }

//1.1 添加好友
export function addFriend(data) {
  return request({
    url: '/chat/addFriend',
    method: 'post',
    data
  })
}

//1.2 好友列表
export function getFriendsList(data) {
  return request({
    url: '/chat/getFriendsList',
    method: 'post',
    data
  })
}

//1.3 删除好友
export function delFriend(data) {
  return request({
    url: '/chat/delFriend',
    method: 'post',
    data
  })
}

//1.4 编辑好友信息
export function updateFriend(data) {
  return request({
    url: '/chat/updateFriend',
    method: 'post',
    data
  })
}

//1.5 搜索用户
export function searchFriend(data) {
  return request({
    url: '/chat/searchFriend',
    method: 'post',
    data
  })
}

//1.6 获取好友信息
export function getFriendInfo(data) {
  return request({
    url: '/chat/getFriendInfo',
    method: 'post',
    data
  })
}
//1.已有好友的情况 end ------------------------------------->


//2.没有好友的情况 start ------------------------------------->
//2.1 申请成为你好友的列表
export function getFriendsApplyList(data) {
  return request({
    url: '/chat/getFriendsApplyList',
    method: 'post',
    data
  })
}

//2.2 添加当前用户为好友 - 点击好友名片弹窗 添加好友
export function applyFriend(data) {
  return request({
    url: '/chat/applyFriend',
    method: 'post',
    data
  })
}
//2.没有好友的情况 end ------------------------------------->

//3.搜索好友 start ------------------------------------->
//3.1 判断当前用户是否为你的好友
export function isFriend(data) {
  return request({
    url: '/chat/isFriend',
    method: 'post',
    data
  })
}
//3.搜索好友 end ------------------------------------->

//4.会话关系 start ------------------------------------->
//4.1 你当前有几个会话
export function getConversation(data) {
  return request({
    url: '/chat/getConversation',
    method: 'post',
    data
  })
}

//4.2 查询会话下面的聊天记录
export function getChatRecords(data) {
  return request({
    url: '/chat/getChatRecords',
    method: 'post',
    data
  })
}
//4.会话关系 end ------------------------------------->

//5.群聊 start ------------------------------------->
//5.1 创建群聊
export function addGroup(data) {
  return request({
    url: '/chat/addGroup',
    method: 'post',
    data
  })
}

//5.2 群成员列表
export function getGroupMembers(data) {
  return request({
    url: '/chat/getGroupMembers',
    method: 'post',
    data
  })
}

//5.3 获取群列表 - 后期将会从会话列表中获得，该方法将移除
export function getGroupList(data) {
  return request({
    url: '/chat/getGroupList',
    method: 'post',
    data
  })
}

//5.4 获取群消息
export function getGroupInfo(data) {
  return request({
    url: '/chat/getGroupInfo',
    method: 'post',
    data
  })
}

//5.4 加入群聊 - 消息里面邀请加群 接受加入群聊
export function joinGroup(data) {
  return request({
    url: '/chat/joinGroup',
    method: 'post',
    data
  })
}

//5.5 获取群聊的聊天记录
export function getGroupChatRecords(data) {
  return request({
    url: '/chat/getGroupChatRecords',
    method: 'post',
    data
  })
}

//5.6 删除群聊
export function delGroup(data) {
  return request({
    url: '/chat/delGroup',
    method: 'post',
    data
  })
}

//5.7 编辑群聊
export function updateGroup(data) {
  return request({
    url: '/chat/updateGroup',
    method: 'post',
    data
  })
}

//5.8 编辑群成员
export function updateGroupMembers(data) {
  return request({
    url: '/chat/updateGroupMembers',
    method: 'post',
    data
  })
}

//5.9 退出群聊
export function quitGroup(data) {
  return request({
    url: '/chat/quitGroup',
    method: 'post',
    data
  })
}
//5.群聊 end ------------------------------------->

//6.商圈 start ------------------------------------->
//6.1 商圈列表
export function getTopicsList(data) {
  return request({
    url: '/chat/getTopicsList',
    method: 'post',
    data
  })
}

//6.2 新增商圈
export function addTopic(data) {
  return request({
    url: '/chat/addTopic',
    method: 'post',
    data
  })
}

//6.3 商圈信息
export function getTopicInfo(data) {
  return request({
    url: '/chat/getTopicInfo',
    method: 'post',
    data
  })
}

//6.4 审核商圈
export function updateTopic(data) {
  return request({
    url: '/chat/updateTopic',
    method: 'post',
    data
  })
}

//6.5 删除商圈
export function delTopic(data) {
  return request({
    url: '/chat/delTopic',
    method: 'post',
    data
  })
}

//6.6 回复商圈 
export function addReply(data) {
  return request({
    url: '/chat/addReply',
    method: 'post',
    data
  })
}

//6.7 回复商圈列表
export function getTopicReply(data) {
  return request({
    url: '/chat/getTopicReply',
    method: 'post',
    data
  })
}

//6.8 获取话题分类
export function topicType(data) {
  return request({
    url: '/chat/topicType',
    method: 'post',
    data
  })
}

//6.9 获取话题状态
export function topicStatus(data) {
  return request({
    url: '/chat/topicStatus',
    method: 'post',
    data
  })
}

//6.10 审核话题
export function applyTopic(data) {
  return request({
    url: '/chat/applyTopic',
    method: 'post',
    data
  })
}
//6.商圈 end ------------------------------------->