You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

223 lines
11 KiB

  1. cc.exports.OpcodeLoginMarkLog = 103
  2. cc.exports.OpcodeLoginEchoNot = 0
  3. --------------------------- 注册登陆 -------------------------
  4. cc.exports.OpcodeLoginInfoGet = 101
  5. cc.exports.OpcodeLoginInfoAck = 102
  6. cc.exports.OpcodeLoginInfoCodeGet = 105
  7. cc.exports.OpcodeLoginInfoCodeAck = 106
  8. cc.exports.OpcodeLoginInfoCodeNoti = 901
  9. cc.exports.OpcodeVerifyAnonymousReq = 1001
  10. cc.exports.OpcodeVerifyPhoneReq = 1002
  11. cc.exports.OpcodeVerifyAccountAck = 1004
  12. cc.exports.OpcodeUnidQueryReq = 1009
  13. cc.exports.OpcodeUnidQueryAck = 1010
  14. cc.exports.OpcodeBindPhoneReq = 1011
  15. cc.exports.OpcodeBindPhoneAck = 1012
  16. cc.exports.OpcodeGetCodeReq = 1017
  17. cc.exports.OpcodeGetCodeAck = 1018
  18. cc.exports.OpcodeBindCPAccountReq = 1023
  19. cc.exports.OpcodeBindCPAccountAck = 1024
  20. cc.exports.OpcodeQueryByCPAccountReq = 1025
  21. cc.exports.OpcodeQueryByCPAccountAck = 1026
  22. cc.exports.OpcodeQueryCPAccountByPIDReq = 1027
  23. cc.exports.OpcodeQueryCPAccountByPIDAck = 1028
  24. cc.exports.OpcodeUnbindCPAccountReq = 1029
  25. cc.exports.OpcodeUnbindCPAccountAck = 1030
  26. G_EapProtos[OpcodeLoginMarkLog] = {
  27. PID = {1, "uint32"}, --0成功
  28. LogType = {2, "uint32"}, --失败返回错误描述
  29. Message = {3, "string"}, --结果数组JSON串
  30. AppID = {4, "sint32"},
  31. }
  32. G_EapProtos[OpcodeLoginEchoNot] = {
  33. }
  34. -------------------------------- 新协议 ----------------------------------
  35. --------------------------------------------------------------------------
  36. -- [登陆] ----------->>
  37. -- 登录大厅
  38. G_EapProtos[OpcodeLoginInfoGet] = {
  39. nPID = {1, "uint32"}, -- 用户id
  40. strTicket = {2, "string"}, -- 用户ticket
  41. nPlatform = {3, "sint32"}, -- 平台, app:1, sdk:2
  42. StrMac = {4, "string"}, -- mac地址
  43. StrIP = {5, "string"}, -- 上报ip
  44. }
  45. G_EapProtos[OpcodeLoginInfoAck] = {
  46. nRet = {1, "sint32"}, -- 0成功, -1数据转换失败 -2平台类型错误 -3删除玩家旧记录失败
  47. nPID = {2, "uint32"}, -- 用户账号名
  48. nCurTime = {9, "uint32"}, -- 当前服务器时间
  49. }
  50. -- 验证(注册)账号
  51. G_EapProtos[OpcodeVerifyAnonymousReq] = {
  52. nSource = {1, "uint32"}, -- 渠道ID
  53. strDeviceId = {2, "string"}, -- 设备ID
  54. strIP = {3, "string"}, -- 登录IP地址
  55. }
  56. --手机号验证(注册)账号
  57. G_EapProtos[OpcodeVerifyPhoneReq] = {
  58. nPhone = {1, "uint64"}, -- 用户手机号
  59. strPassword = {2, "string"}, -- 用户密码
  60. nSource = {3, "uint32"}, -- 渠道ID
  61. strDeviceId = {4, "string"}, -- 设备ID
  62. strIP = {5, "string"}, -- 登录IP地址
  63. strCodeType = {6, "string"}, -- 验证码的用途(为空则使用密码登录)
  64. nCode = {7, "uint32"}, -- 短信验证码
  65. strPhone = {8, "string"}, -- 可选、手机号的字符串类型(兼容无法解析int64的环境)
  66. }
  67. G_EapProtos[OpcodeVerifyAccountAck] = {
  68. nRet = {1, "sint32"}, -- 0成功, 1首次验证(注册), -1失败, -6验证码错误, -7验证码失效, -8登录密码为空, -40002用户名不存在, -40004密码错误, -40012禁用IP, -40013禁用账号, -40015禁用设备
  69. strTicket = {2, "string"}, -- 通行证, 失败为空
  70. nPID = {3, "uint32"}, -- 用户ID
  71. ext = {4, "string"}, -- 扩展信息json格式数据
  72. }
  73. -- 通过游戏ID查询用户信息
  74. G_EapProtos[OpcodeQueryByCPAccountReq] = {
  75. nAppID = {1, "uint32"}, --第三方应用id
  76. strCPUserID = {2, "string"}, --第三方账号
  77. }
  78. G_EapProtos[OpcodeQueryByCPAccountAck] = {
  79. nRet = {1, "sint32"}, --0成功, -1失败, -40018 CP账号信息不存在
  80. nPID = {2, "uint32"}, --查询用户的ID
  81. strTicket = {3, "string"}, --通过请求的appid和strCPUserID查找到的pid对应的平台通行证
  82. }
  83. -- 绑定三方帐号
  84. G_EapProtos[OpcodeBindCPAccountReq] = {
  85. nPID = {1, "uint32"}, -- 用户的ID
  86. strTicket = {2, "string"}, -- 通行证
  87. nAppID = {3, "uint32"}, -- 第三方应用id
  88. strCPUserID = {4, "string"}, -- 第三方账号
  89. strCPUserNickname = {5, "string"}, -- 第三方名称
  90. }
  91. G_EapProtos[OpcodeBindCPAccountAck] = {
  92. nRet = {1, "sint32"}, -- 0:绑定成功 -1:已经绑定其他id
  93. -- 通过请求的appid和StrThirdID查找到的pid,可能与请求的pid不同;
  94. -- 此时客户端需要请求此pid详情,用于展示头像、昵称、手机号、微信号等,让用户切换账号
  95. nPID = {2, "uint32"},
  96. strTicket = {3, "string"}, -- 通过请求的appid和StrThirdID查找到的pid对应的ticket
  97. nAppID = {4, "uint32"}, -- nPID对应的应用id
  98. strCPUserID = {5, "string"}, -- 第三方账号
  99. strCPUserNickname = {6, "string"}, -- 第三方名称
  100. }
  101. G_EapProtos["ThirdInfo"] = {
  102. strThirdAccount = {1, "string"}, -- 第三方账号信息
  103. nThirdAccountType = {2, "uint32"}, -- 第三方账号类型,1:微信,2:QQ,3:新浪,4:字节,5:苹果
  104. }
  105. -- 查询电竞app账号信息
  106. G_EapProtos[OpcodeUnidQueryReq] = {
  107. nAccount = {1, "sint64"}, -- nAccount>0为手机号,nAccount<0为nPID
  108. strPassword = {2, "string"}, -- 是否验证密码,为空为不验证密码
  109. bIncludeThird = {3, "bool"}, -- 是否查询绑定的第三方账号,0:不查询, 1:查询
  110. }
  111. G_EapProtos[OpcodeUnidQueryAck] = {
  112. nRet = {1, "sint32"}, -- 0成功, -1失败, -8参数错误, -40002用户id或帐号不存在
  113. nPID = {2, "uint32"}, -- 用户ID
  114. nPhone = {3, "uint64"}, -- 用户注册的手机号
  115. nSource = {4, "uint32"}, -- 用户注册渠道
  116. Thirds = {5, "ThirdInfo", "repeated"}, -- 绑定的第三方账号 -- repeated ThirdInfo
  117. strPhone = {6, "string"},
  118. nRegTime = {7, "uint32"}, -- 账号注册时间
  119. strRegIP = {8, "string"}, -- 账号注册IP
  120. strRegDevice = {9, "string"}, -- 账号注册设备
  121. }
  122. -- 信息码通知
  123. G_EapProtos[OpcodeLoginInfoCodeGet] = {
  124. PID = {2, "sint32"}, --玩家账号
  125. strTicket = {3, "string"}, --通行证
  126. Code = {4, "string"}, --信息码,不为空为查询;为空则AppID、GameID不能为空
  127. MatchID = {5, "string"}, --要报名的赛事
  128. AppID = {6, "sint32"}, --平台
  129. GameID = {7, "sint32"}, --游戏ID
  130. }
  131. G_EapProtos[OpcodeLoginInfoCodeAck] = {
  132. nRet = {1, "sint32"},
  133. CodeInfo = {2, "LoginInfoCodeNoti"},
  134. }
  135. G_EapProtos["LoginInfoCodeNoti"] = {
  136. Code = {1, "string"}, --信息码
  137. nPID = {2, "sint32"}, --玩家账号
  138. strTicket = {3, "string"}, --通行证
  139. MatchID = {4, "string"}, --要报名的赛事
  140. AppID = {5, "sint32"}, --平台
  141. GameID = {6, "sint32"}, --游戏ID
  142. TimeOut = {7, "uint32"}, --信息码过期时间
  143. }
  144. G_EapProtos[OpcodeLoginInfoCodeNoti] = {
  145. Code = {1, "string"}, --信息码
  146. nPID = {2, "sint32"}, --玩家账号
  147. strTicket = {3, "string"}, --通行证
  148. MatchID = {4, "string"}, --要报名的赛事
  149. AppID = {5, "sint32"}, --平台
  150. GameID = {6, "sint32"}, --游戏ID
  151. TimeOut = {7, "uint32"}, --信息码过期时间
  152. }
  153. -- 获取手机验证码
  154. G_EapProtos[OpcodeGetCodeReq] = {
  155. strCodeType = {1, "string"}, -- 验证码的用途(请求方自定义标识)
  156. nPhoneNum = {2, "uint64"}, -- 手机号
  157. strPhone = {3, "string"}, -- 可选、手机号的字符串类型(兼容无法解析int64的环境)
  158. }
  159. G_EapProtos[OpcodeGetCodeAck] = {
  160. nRet = {1, "sint32"}, -- 0成功, -1失败, -4发送频率过快, -5手机号错误
  161. strCodeType = {2, "string"}, -- 验证码的用途
  162. }
  163. -- 绑定手机
  164. G_EapProtos[OpcodeBindPhoneReq] = {
  165. nPID = {1, "uint32"}, -- 用户ID
  166. nPhone = {2, "uint64"}, -- 手机号
  167. strPassword = {3, "string"}, -- 密码不为空则在绑定手机的同时修改密码(用于第三方账号登录时设定密码)
  168. strCodeType = {4, "string"}, -- 验证码的用途
  169. nCode = {5, "uint32"}, -- 短信验证码
  170. strPhone = {6, "string"}, -- 可选、手机号的字符串类型(兼容无法解析int64的环境)
  171. }
  172. G_EapProtos[OpcodeBindPhoneAck] = {
  173. nPID = {1, "uint32"}, -- 用户ID
  174. nRet = {2, "sint32"}, -- 0成功, -1失败, -6验证码错误, -7验证码失效, -40006注册账号已绑定过手机, -40007手机已被注册
  175. nPhone = {3, "uint64"}, -- 绑定成功后的手机号
  176. strPhone = {4, "string"}, -- 可选、手机号的字符串类型(兼容无法解析int64的环境)
  177. }
  178. -- 通过平台账号查询第三方账号信息
  179. G_EapProtos[OpcodeQueryCPAccountByPIDReq] = {
  180. nAppID = {1, "uint32"}, -- 第三方应用ID
  181. nPID = {2, "uint32"}, -- 用户平台ID
  182. }
  183. G_EapProtos[OpcodeQueryCPAccountByPIDAck] = {
  184. nRet = {1, "sint32"}, -- 0成功, -1失败, -40018CP账号信息不存在
  185. nAppID = {2, "uint32"}, -- 第三方应用ID
  186. strCPUserID = {3, "string"}, -- 第三方用户账号ID
  187. strCPName = {4, "string"}, -- 第三方用户账号昵称
  188. }
  189. -- 解绑第三方游戏账号
  190. G_EapProtos[OpcodeUnbindCPAccountReq] = {
  191. nPID = {1, "uint32"}, -- 用户的ID
  192. strTicket = {2, "string"}, -- 通行证(为空时判断nAppID和strAppSecret是否合法,代表后台操作)
  193. nAppID = {3, "uint32"}, -- 应用ID(系统分配)
  194. strAppSecret = {4, "string"}, -- 应用秘钥(系统分配)
  195. nCPAppID = {5, "uint32"}, -- 第三方应用ID
  196. strCPUserID = {6, "string"}, -- 第三方用户账号ID
  197. }
  198. G_EapProtos[OpcodeUnbindCPAccountAck] = {
  199. nRet = {1, "sint32"}, -- 0解绑成功, -1失败, -2通行证错误, -3通行证失效, -10002应用ID未注册, -10003应用秘钥错误, -10004秘钥失效, -10005未授权接口调用, -40018CP账号信息不存在
  200. nPID = {2, "uint32"}, -- 用户的ID
  201. }