/api/cocos/login
接受参数 {"name":"001","pwd":"001"}
返回参数 {"success":true,"client":{"id":1,"name":"001","nickname":"张无忌","pwd":"001"}}
/api/cocos/get/room
接受参数 无参数
返回参数
{"success":true,
"roomList":[{"id":1,"name":"1号桌1"},
{"id":2,"name":"2号桌2"},
{"id":3,"name":"3号桌333"},
{"id":4,"name":"4号桌333"},
{"id":5,"name":"5号桌aa"},
{"id":6,"name":"6号桌eee"}
]
}
/api/cocos/get/room/paler/list
用户进入房间的时候会调用一下。把用户加入到房间中。再返回列表
接受参数 {"roomId":1,"clientId":1}
返回参数
{"index_":0,
"success":true,
"roomClientList":[
{"client":{"id":1,"name":"001","nickname":"张无忌","pwd":"001"},"id":2,"index_":0,"room":{"id":1,"name":""}}]
}
index_ 新加入的用户也就是我, 所在的位置
roomClientList 放的是,客户对应的房间(包括现在进入的客户),客户实体client房间实体room,index_是此客户对应的位置。
站长微信:xiaomao0055
站长QQ:14496453