获取全部联系人

需要客户端处理首字母,有必要做一下缓存,每次先加载缓存然后再请求服务器,保证没有网的情况下能看到联系人

{
  "code": 200, 
  "msg":'',
  "data": {
    "contact_list": [
      {
        "alias_name": "", 
        "department": null, 
        "email": null, 
        "employee_id": "124", 
        "entry_date": null, 
        "has_ry": true, 
        "name": "\u4f55\u91d1\u521a", 
        "phone": "18602242651", 
        "photo": 3, 
        "portraitUri": "http://172.26.1.191:8001/static/photo3.png", 
        "sex": null, 
        "work_num": "15033", 
        "work_phone": null
      }],
    "white_enterprise":true
 }

获取单一联系人信息

用于群聊或者单聊点击头像 跳转到用户详情页面

{
  "code": 200, 
  "data": {
    "alias_name": "", 
    "department": "\u79fb\u52a8\u90e8\u95e8", 
    "email": "[email protected]", 
    "employee_id": "131", 
    "entry_date": null, 
    "has_ry": true, 
    "name": "\u4e8e\u8fde\u6797", 
    "phone": "13126939916", 
    "photo": 4, 
    "portraitUri": "http://dakaapp.troila.com/static/photo4.png", 
    "sex": 1, 
    "work_num": "15041", 
    "work_phone": "86868686"
  }, 
  "msg": ""
}

创建群聊

加入群聊

获取群信息

{
  "code": 200, 
  "data": {
    "admin_id": "131", 
    "allow_no_admin_add": true, 
    "group_name": "aaa", 
    "portrait": 1, 
    "portraitUri": "http://dakaapp.troila.com/static/photo1.png", 
    "users": [
      {
        "alias_name": "", 
        "department": "\u79fb\u52a8\u90e8\u95e8", 
        "email": "[email protected]", 
        "employee_id": "131", 
        "entry_date": null, 
        "has_ry": true, 
        "name": "\u4e8e\u8fde\u6797", 
        "phone": "13126939916", 
        "photo": 4, 
        "portraitUri": "http://dakaapp.troila.com/static/photo4.png", 
        "sex": 1, 
        "work_num": "15041", 
        "work_phone": "86868686"
      }, 
      {
        "alias_name": null, 
        "department": "\u79fb\u52a8\u90e8\u95e8", 
        "email": null, 
        "employee_id": "fb245f2f8d5d4354b8268feda37f8d39", 
        "entry_date": "2018-04-03", 
        "has_ry": true, 
        "name": "\u5b59\u5bb6\u5b87", 
        "phone": "18602227253", 
        "photo": 7, 
        "portraitUri": "http://dakaapp.troila.com/static/photo7.png", 
        "sex": null, 
        "work_num": null, 
        "work_phone": null
      }    ]
  }, 
  "msg": ""
}

个人退群 (适用于非管理员的方式)

  • 地址: api/v5.0/quit_group
  • POST 方法
  • 参数
    • group_id 群id
    • userid

移除群成员 (适用于管理员移除)

  • 地址: api/v5.0/remove_group_member
  • POST 方法
  • 参数
    • group_id 群id
    • userid 当前角色需要是管理员
    • contact_ids 移除成员的 id 多个 ,分割

退出解散群 (适用于管理员)

  • 地址: api/v5.0/dismiss_group
  • POST 方法
  • 参数
    • group_id 群id
    • userid 当前角色需要是管理员

修改群名称

  • 地址: api/v5.0/changge_group_name
  • POST 方法
  • 参数
    • group_id 群id
    • userid 当前角色需要是管理员
    • group_name 修改后的名称
  • 返回 群资料

修改群头像

  • 地址: api/v5.0/changge_group_portrait
  • POST 方法
  • 参数

    • group_id 群id
    • userid 当前角色需要是管理员
    • portrait 修改后的头像,数字 [0-11)
  • 返回 群资料

获取用户所在的群聊列表

用于通讯录进入群聊列表

  • 地址: api/v5.0/get_user_groups
  • GET 方法
  • 参数
    • userid
  • 返回 群资料

修改 是否允许非管理员添加群成员

  • 地址: api/v5.0/changge_allow_no_admin_add
  • POST 方法
  • 参数

    • group_id 群id
    • userid 当前角色需要是管理员
    • allow_no_admin_add 数字 1表示 允许 0表示不允许
  • 返回 群资料

添加群聊时获取列表

  • 地址:/api/v5.0/get_add_group_contacts
  • method: GET
{
  "code": 200, 
  "msg":''
  "data": [
    {
      "alias_name": null, 
      "department": "\u79fb\u52a8\u90e8\u95e8", 
      "email": null, 
      "employee_id": "fb245f2f8d5d4354b8268feda37f8d39", 
      "entry_date": "2018-04-03", 
      "has_ry": true, 
      "name": "\u5b59\u5bb6\u5b87", 
      "phone": "18602227253", 
      "photo": 7, 
      "portraitUri": "http://dakaapp.troila.com/static/photo7.png", 
      "sex": null, 
      "work_num": null, 
      "work_phone": null
    }, 
    ...
    ]
}

添加群聊时获取列表(组织架构)

  • 地址:/api/v5.0/get_add_group_contacts_from_enterprise
  • method: GET
{
  "code": 200, 
  "data": [
    {
      "department_name": "\u79fb\u52a8\u90e8\u95e8", 
      "employee": [
        {
          "alias_name": null, 
          "department": "\u79fb\u52a8\u90e8\u95e8", 
          "email": null, 
          "employee_id": "fb245f2f8d5d4354b8268feda37f8d39", 
          "entry_date": "2018-04-03", 
          "has_ry": true, 
          "name": "\u5b59\u5bb6\u5b87", 
          "phone": "18602227253", 
          "photo": 7, 
          "portraitUri": "http://dakaapp.troila.com/static/photo7.png", 
          "sex": null, 
          "work_num": null, 
          "work_phone": null
        }
      ], 
      "member_count": 1
    }
  ], 
  "msg": ""
}

发送消息

  • 地址: /api/v5.0/publish_message
  • 参数
    • fromUserId
    • toUserId
    • objectName
    • content

results matching ""

    No results matching ""