[关闭]
@fuyb1986 2016-03-26T06:48:05.000000Z 字数 1819 阅读 676

HTML5 启动 iOS IM 界面的方法

好热闹


两种 IM 聊天

基本需求

基本流程

Created with Raphaël 2.1.2UserUserHTML5HTML5ServerServeriOSiOSUser Start O2O ChartGet Token: username,passwordReturn: tokenStart O2O Chat View: token,username,passowrd,to_usernameDo Something: tokenUser Start Group ChartGet Token: username,passwordReturn: tokenStart Group Chat View: token,username,password,gorup idDo Something: tokenUser Start CS ChartGet CS Info: username,passwordReturn: cs_info, tokenStart CS Chat View: cs_id, cs_name,username,passwordDo Something: token

启动单聊

Description

启动单聊

Method and URL Structure

Method Resouce URL
GET aichashuo://enter_single_chat/

Request Parameters

Name Description Required Default
username 用户名 YES
password 密码 YES
token 用户 token YES
to_username 单聊对象 YES

Request

  1. {
  2. "username":"username",
  3. "password":"password",
  4. "token":"token",
  5. "to_username":"username",
  6. }

cURL Example

  1. aichashuo://enter_single_chat/?username=18002&password=123456&to_username=18030&token=QBe+hbw/q0rShpFN4k/REBM

启动群聊

Description

启动单聊

Method and URL Structure

Method Resouce URL
GET aichashuo://enter_rong_chatroom/

Request Parameters

Name Description Required Default
username 用户名 YES
password 密码 YES
token 用户 token YES
group_id 群 ID YES

Request

  1. {
  2. "username":"username",
  3. "password":"password",
  4. "token":"token",
  5. "group_id":1234,
  6. }

cURL Example

  1. aichashuo://enter_rong_chatroom/?username=18001234&password=123456&group_id=555&token=QBe+hbw/q0rShpFN8k/REBM

启动客服

Description

启动单聊

Method and URL Structure

Method Resouce URL
GET aichashuo://enter_custom_service/

Request Parameters

Name Description Required Default
username 用户名 YES
password 密码 YES
token 用户 token YES
id 客服公众号 ID YES
name 客服公众号昵称 YES

Request

  1. {
  2. "username":"username",
  3. "password":"password",
  4. "token":"token",
  5. "id":"haorenao_cs_001",
  6. "name":u'我的客服',
  7. }

cURL Example

  1. aichashuo://enter_custom_service/?id=haorenao_cs_001&name=我的客服&username=180123456&password=123456&token=QBe+hbw/q0rShpFN8k/REBM

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注