|
|
@ -27,8 +27,12 @@ func (ws *WsCtl) HandleConnect(s *melody.Session) { |
|
|
|
} |
|
|
|
|
|
|
|
client := NewClient(s, ws.node, roomId) |
|
|
|
token := query.Get("token") |
|
|
|
LoginMid(client, &Message{Data: map[string]interface{}{"token": token}}) // 登录设置
|
|
|
|
|
|
|
|
var res = map[string]interface{}{} |
|
|
|
for k, v := range query { |
|
|
|
res[k] = v[0] |
|
|
|
} |
|
|
|
LoginMid(client, &Message{Data: res}) // 登录设置
|
|
|
|
ws.node.conns[s] = client |
|
|
|
ws.node.handleMelodyConnect(client) |
|
|
|
} |
|
|
|