mirror of
https://github.com/Leo501/CocosCreatorTutorial.git
synced 2026-05-31 22:49:23 +08:00
完善pomelo客户端
This commit is contained in:
23
PomeloClient/assets/Script/model/ChatInfoModel.js
Normal file
23
PomeloClient/assets/Script/model/ChatInfoModel.js
Normal file
@@ -0,0 +1,23 @@
|
||||
class ChatInfoModel {
|
||||
constructor() {
|
||||
this.chatInfo = {};
|
||||
}
|
||||
|
||||
setName(name) {
|
||||
this.chatInfo.name = name;
|
||||
}
|
||||
|
||||
getName() {
|
||||
return this.chatInfo.name;
|
||||
}
|
||||
|
||||
setRoomId(rid) {
|
||||
this.chatInfo.rid = rid;
|
||||
}
|
||||
|
||||
getRoomId() {
|
||||
return this.chatInfo.rid;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new ChatInfoModel();
|
||||
9
PomeloClient/assets/Script/model/ChatInfoModel.js.meta
Normal file
9
PomeloClient/assets/Script/model/ChatInfoModel.js.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "756b8874-c003-4da3-be5f-51d7f0f6ad5e",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
||||
20
PomeloClient/assets/Script/model/ChatUserModel.js
Normal file
20
PomeloClient/assets/Script/model/ChatUserModel.js
Normal file
@@ -0,0 +1,20 @@
|
||||
class ChatUserModel {
|
||||
constructor() {
|
||||
this.users = [];
|
||||
}
|
||||
|
||||
setUsers(arr) {
|
||||
delete this.users;
|
||||
this.users = arr;
|
||||
}
|
||||
|
||||
getUser() {
|
||||
return this.users;
|
||||
}
|
||||
|
||||
addUser(user) {
|
||||
this.users.push(user);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new ChatUserModel();
|
||||
9
PomeloClient/assets/Script/model/ChatUserModel.js.meta
Normal file
9
PomeloClient/assets/Script/model/ChatUserModel.js.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "e6a0f93a-9079-44dc-b204-ce03cdf9764e",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
||||
Reference in New Issue
Block a user