DailyRechargeRecordItem = DailyRechargeRecordItem or BaseClass(BaseItem)
|
|
local DailyRechargeRecordItem = DailyRechargeRecordItem
|
|
|
|
DailyRechargeRecordItem.Width = 929
|
|
DailyRechargeRecordItem.Height = 50
|
|
|
|
function DailyRechargeRecordItem:__init()
|
|
self.base_file = "dailyRecharge"
|
|
self.layout_file = "DailyRechargeRecordItem"
|
|
self.model = RechargeActivityModel:getInstance()
|
|
|
|
self:Load()
|
|
end
|
|
|
|
function DailyRechargeRecordItem:Load_callback()
|
|
self.nodes = {
|
|
"lb_time:tmp","lb_des:tmp",
|
|
}
|
|
self:GetChildren(self.nodes)
|
|
|
|
if self.need_refreshData then
|
|
self:UpdateView()
|
|
end
|
|
self.lb_time_tmp.text = ""
|
|
end
|
|
|
|
function DailyRechargeRecordItem:UpdateView( )
|
|
if self.data.is_empty then
|
|
self.lb_des_tmp.text = ""
|
|
else
|
|
local role_name = self.data.name
|
|
local goods_id = self.data.goods_type_id
|
|
local num = self.data.goods_num
|
|
-------------------------
|
|
local show_data = {}
|
|
show_data.module_id = 331
|
|
show_data.tip = false
|
|
show_data.id = self.data.get_type == 0 and 3 or 4
|
|
show_data.content = string.format( "%s,%s,%s", role_name,goods_id,num )
|
|
local desc = ChuanWenManager:getInstance():GetChuanWen(show_data)
|
|
-------------------------
|
|
--去除多余标签
|
|
desc = string.gsub( desc, "<a@marble></a>", "" )
|
|
desc = PackageSpecialTab(desc)
|
|
desc = string.gsub( desc, "</a>", "" )
|
|
local index_end = 0
|
|
local index_start = string.find(desc, "<a@goods@", index_end )
|
|
if index_start then
|
|
index_end = string.find(desc, ">", index_start )
|
|
if index_end then
|
|
local temp_str = string.sub(desc, index_start, index_end)
|
|
desc = string.gsub( desc, temp_str, "" )
|
|
end
|
|
end
|
|
-------------------------
|
|
self.lb_des_tmp.text = desc
|
|
end
|
|
end
|
|
|
|
function DailyRechargeRecordItem:SetData( index,data )
|
|
self.index = index
|
|
self.data = data
|
|
if self.is_loaded then
|
|
self.need_refreshData = false
|
|
self:UpdateView()
|
|
else
|
|
self.need_refreshData = true
|
|
end
|
|
end
|
|
|
|
function DailyRechargeRecordItem:__delete( )
|
|
|
|
end
|