UIMailCtr.lua 593 B

1234567891011121314151617181920212223242526272829303132
  1. local UIMailCtr = class("UIMailCtr", require("UICtrBase"))
  2. function UIMailCtr:Init(view)
  3. self.view = view
  4. end
  5. function UIMailCtr:SetData(data)
  6. self.asyncIdx = 0
  7. if data == nil then return end
  8. self.data = data
  9. end
  10. function UIMailCtr:GetAsyncIdx()
  11. self.asyncIdx = self.asyncIdx + 1
  12. return self.asyncIdx
  13. end
  14. function UIMailCtr:GetData()
  15. return self.data
  16. end
  17. function UIMailCtr:SendRewardMail(id)
  18. ManagerContainer.NetManager:SendMessage(ProtoMsgId.CS_MAIL_REWARD_REQ, {mail_id_list = {id}})
  19. end
  20. function UIMailCtr:OnDispose()
  21. self.data = nil
  22. self.view = nil
  23. end
  24. return UIMailCtr