| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- local UIBoliShopCtr = class("UIBoliShopCtr", require("UICtrBase"))
- function UIBoliShopCtr:Init(view)
- self.view = view
- end
- function UIBoliShopCtr:SetData(data)
- self.asyncIdx = 0
- if data == nil then return end
- self.data = data
- end
- function UIBoliShopCtr:SetCurEnterType(idx)
- self.enterType = idx
- return self.enterType
- end
- function UIBoliShopCtr:GetCurEnterType()
- return self.enterType
- end
- function UIBoliShopCtr:RefreshGoodsData()
-
- end
- function UIBoliShopCtr:GetGoodsDataLength()
- return self.Goodstab and #self.Goodstab
- end
- function UIBoliShopCtr:GetBoliShopDataByIdx(idx)
- return self.Goodstab and self.Goodstab[idx]
- end
- function UIBoliShopCtr:GetAsyncIdx()
- self.asyncIdx = self.asyncIdx + 1
- return self.asyncIdx
- end
- function UIBoliShopCtr:GetBoliVipLvData()
- if not self.vipLvShowDatas then
- self:RefreshsvipLvShowDatas()
- end
- return self.vipLvShowDatas
- end
- function UIBoliShopCtr:GetBoliVipDataByIdx(idx)
- if not self.vipLvShowDatas then
- self:RefreshsvipLvShowDatas()
- end
- return self.vipLvShowDatas and self.vipLvShowDatas[idx]
- end
- function UIBoliShopCtr:SetDescData(descData)
- self.descData = descData
- end
- function UIBoliShopCtr:GetDescDataByIdx(idx)
- return self.descData and self.descData[idx]
- end
- function UIBoliShopCtr:GetBoliVipLvDataLengths()
- return self.vipLvShowDatas and #self.vipLvShowDatas or 0
- end
- function UIBoliShopCtr:RefreshsvipLvShowDatas()
- local cfgData = ManagerContainer.CfgMgr:GetBoliVipCfg()
- if not cfgData then
- return
- end
- local data = {}
- for k, v in pairs(cfgData) do
- if v.Lv ~= 0 then
- table.insert(data,v)
- end
- end
- table.sort(data,function(a,b)
- return a.Lv < b.Lv
- end)
- self.vipLvShowDatas = data
- end
- function UIBoliShopCtr:GetData()
- return self.data
- end
- function UIBoliShopCtr:OnDispose()
- self.data = nil
- self.view = nil
- end
- return UIBoliShopCtr
|