user.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Descripttion:
  3. version:
  4. Author: Neo,Huang
  5. Date: 2023-11-15 22:34:35
  6. LastEditors: Neo,Huang
  7. LastEditTime: 2023-11-23 00:10:07
  8. --]]
  9. --[[
  10. Descripttion:玩家
  11. version:
  12. Author: Neo,Huang
  13. Date: 2023-11-15 22:34:35
  14. LastEditors: Neo,Huang
  15. LastEditTime: 2023-11-15 23:19:26
  16. --]]
  17. local skynet = require("skynet")
  18. local code = require "code"
  19. local timeUtil = require("utils.timeUtil")
  20. local util_user = require("utils.util_user")
  21. local payData = require("data.pay")
  22. local root = {}
  23. function root:user_keepalive(role)
  24. return code.OK, {systemTime = timeUtil.now(role.uid)}
  25. end
  26. -- 请求个人信息
  27. function root:user_self_info(role, msg)
  28. return role.user:itf_get_info(role, msg)
  29. end
  30. -- 登录完成后
  31. function root:after_user_self_info(role, msg)
  32. local uid = role.uid
  33. local pack = {
  34. payInfo = payData:pack_pay_info(uid)
  35. }
  36. util_user:user_proto_notify(role.uid, "on_user_system_info", pack)
  37. end
  38. -- 获取验证码
  39. function root:user_get_verify_code(role, msg)
  40. return role.user:itf_get_verify_code(role, msg)
  41. end
  42. -- 更新主播邀请码
  43. function root:user_update_band_share_code(role, msg)
  44. return role.user:itf_update_band_share_code(role, msg)
  45. end
  46. -- 更新自己邀请码
  47. function root:user_update_share_code(role, msg)
  48. return role.user:itf_update_share_code(role, msg)
  49. end
  50. -- 更新steam交易链接
  51. function root:user_update_steam_link(role, msg)
  52. return role.user:itf_update_steam_link(role, msg)
  53. end
  54. -- 更新头像
  55. function root:user_update_icon(role, msg)
  56. return role.user:itf_update_icon(role, msg)
  57. end
  58. -- 更新昵称
  59. function root:user_update_nickname(role, msg)
  60. return role.user:itf_update_nickname(role, msg)
  61. end
  62. -- 更新密码
  63. function root:user_update_password(role, msg)
  64. return role.user:itf_update_password(role, msg)
  65. end
  66. -- 注销
  67. function root:user_cancel_account(role, msg)
  68. return role.user:itf_cancel_account(role, msg)
  69. end
  70. -- 实名认证 - 更新信息
  71. function root:user_identity_update_info(role, msg)
  72. return role.user:itf_identity(role, msg)
  73. end
  74. -- 明细 - 流水
  75. function root:user_item_detail_gold(role, msg)
  76. skynet.send(".srvItemRecord", "lua", "get_item_detail_gold", role.uid, msg.lastTime)
  77. return code.OK
  78. end
  79. -- 明细 - 饰品
  80. function root:user_item_detail_wapon(role, msg)
  81. skynet.send(".srvItemRecord", "lua", "get_item_detail_wapon", role.uid, msg.lastTime)
  82. return code.OK
  83. end
  84. return root