UIRuneShopExploreCtr.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. local UIRuneShopExploreCtr = class("UIRuneShopExploreCtr", require("UICtrBase"))
  2. function UIRuneShopExploreCtr:Init(view)
  3. self.view = view
  4. end
  5. function UIRuneShopExploreCtr:SetData(data)
  6. self.asyncIdx = 0
  7. if data == nil then return end
  8. self.data = data
  9. end
  10. function UIRuneShopExploreCtr:GetAsyncIdx()
  11. self.asyncIdx = self.asyncIdx + 1
  12. return self.asyncIdx
  13. end
  14. function UIRuneShopExploreCtr:GetData()
  15. return self.data
  16. end
  17. function UIRuneShopExploreCtr:OnDispose()
  18. self.data = nil
  19. self.view = nil
  20. self.curRewardsData = nil
  21. end
  22. function UIRuneShopExploreCtr:InitData()
  23. self:RefreshCurRewardsData()
  24. end
  25. function UIRuneShopExploreCtr:RefreshCurRewardsData()
  26. ManagerContainer.DataMgr.RuneShopDataMgr:RefreshRewardData()
  27. self.curRewardsData = ManagerContainer.DataMgr.RuneShopDataMgr:GetRewardsData()
  28. end
  29. function UIRuneShopExploreCtr:GetRewardsRemainTime()
  30. return self.curRewardsData and self.curRewardsData:RefreshRewaradsRemainTime() or nil
  31. end
  32. --战令悬赏数据
  33. function UIRuneShopExploreCtr:GetShowRewardsDataByIdx(idx)
  34. return self.curRewardsData and self.curRewardsData:GetGoodsDataByIdx(idx) or nil
  35. end
  36. function UIRuneShopExploreCtr:GetShowRewardsData()
  37. return self.curRewardsData:GetShowRewardsData()
  38. end
  39. function UIRuneShopExploreCtr:GetRewardsBaseData()
  40. return ManagerContainer.DataMgr.RuneShopDataMgr:GetRewardsData() --self.curRewardsData
  41. end
  42. function UIRuneShopExploreCtr:GetShowReardsNearMinCashReward(min)
  43. return self.curRewardsData and self.curRewardsData:GetShowReardsNearMinCashReward(min) or nil
  44. end
  45. function UIRuneShopExploreCtr:GetShowReardsNearMaxCashReward(max)
  46. return self.curRewardsData and self.curRewardsData:GetShowReardsNearMaxCashReward(max) or nil
  47. end
  48. function UIRuneShopExploreCtr:GetCurVipLv()
  49. return ManagerContainer.DataMgr.UserData:GetVipLv()
  50. end
  51. function UIRuneShopExploreCtr:GetOwnResCountByItemId(cfgId)
  52. return CommonUtil.GetOwnResCountByItemId(cfgId)
  53. end
  54. return UIRuneShopExploreCtr