user_getInfo.go 743 B

12345678910111213141516171819202122232425262728293031
  1. package gatesink
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "bet24.com/log"
  6. "bet24.com/servers/transaction"
  7. )
  8. //查询社交类用户信息(昵称、服务器名称、头像变化)
  9. func (this *user) getInfo(msg, data string) {
  10. action := transaction.NewTransGetInfo()
  11. e := json.Unmarshal([]byte(data), &action.In)
  12. if e != nil {
  13. log.Release("getInfo Unmarshal data failed %v", data)
  14. this.WriteMsg(msg, fmt.Sprintf("getInfo Unmarshal data failed %v", data))
  15. return
  16. }
  17. action.DoAction(nil)
  18. buf, e := json.Marshal(action.Out)
  19. if e != nil {
  20. log.Release("send getInfo return Marshal failed err=%v", e)
  21. this.WriteMsg(msg, fmt.Sprintf("send getInfo return Marshal failed err=%v", e))
  22. return
  23. }
  24. this.WriteMsg(msg, string(buf))
  25. return
  26. }