};
},
created: function() {
+ const curMsgListener = this.st.conn.onmessage; //from Game or Hall
const socketMessageListener = msg => {
+ curMsgListener(msg);
const data = JSON.parse(msg.data);
if (data.code == "newchat") //only event at this level
{
this.chats.push({msg:data.msg,
- name:data.name || "@nonymous", sid:data.sid});
+ name:data.name || "@nonymous", sid:data.from});
}
};
const socketCloseListener = () => {