add
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
---@type IDBasePanel
|
||||
local TRBasePanel = require("ui.panel.TRBasePanel")
|
||||
---@class TRPSysMsgDetail:TRBasePanel 邮件列表
|
||||
local TRPSysMsgDetail = class("TRPSysMsgDetail", TRBasePanel)
|
||||
|
||||
local uiobjs = {}
|
||||
-- 初始化,只会调用一次
|
||||
function TRPSysMsgDetail:init(csObj)
|
||||
TRPSysMsgDetail.super.init(self, csObj)
|
||||
|
||||
self:setEventDelegate()
|
||||
self.uiobjs = {}
|
||||
---@type UIScrollView
|
||||
self.uiobjs.scrollView = getCC(self.transform, "PanelContent", "UIScrollView")
|
||||
MyUtl.setContentView(self.uiobjs.scrollView, 132 + 100 + 56 + 25 + 30 + 45, 0)
|
||||
self.uiobjs.LabelContent = getCC(self.uiobjs.scrollView.transform, "LabelContent", "UILabel")
|
||||
self.uiobjs.LabelTitle = getCC(self.transform, "LabelTitle", "UILabel")
|
||||
self.uiobjs.LabelTime = getCC(self.transform, "LabelTime", "UILabel")
|
||||
end
|
||||
|
||||
-- 设置数据
|
||||
---@param paras _ParamTRPSysMsgDetail
|
||||
function TRPSysMsgDetail:setData(paras)
|
||||
---@type _DBMessage
|
||||
self.mdata = paras
|
||||
end
|
||||
|
||||
-- 显示,在c#中。show为调用refresh,show和refresh的区别在于,当页面已经显示了的情况,当页面再次出现在最上层时,只会调用refresh
|
||||
function TRPSysMsgDetail:show()
|
||||
self.uiobjs.LabelContent.text = joinStr(" ", self.mdata.CONTENT)
|
||||
self.uiobjs.LabelTime.text = DateEx.formatByMs(tonumber(self.mdata.CREATETIME) * 1000)
|
||||
self.uiobjs.LabelTitle.text = self.mdata.TITLE
|
||||
self.uiobjs.scrollView:ResetPosition()
|
||||
end
|
||||
|
||||
-- 刷新
|
||||
function TRPSysMsgDetail:refresh()
|
||||
end
|
||||
|
||||
-- 关闭页面
|
||||
function TRPSysMsgDetail:hide()
|
||||
end
|
||||
|
||||
-- 网络请求的回调;cmd:指命,succ:成功失败,msg:消息;paras:服务器下行数据
|
||||
function TRPSysMsgDetail:procNetwork(cmd, succ, msg, paras)
|
||||
if (succ == NetSuccess) then
|
||||
--[[
|
||||
if cmd == xx then
|
||||
end
|
||||
]]
|
||||
end
|
||||
end
|
||||
|
||||
function TRPSysMsgDetail:setEventDelegate()
|
||||
self.EventDelegate = {}
|
||||
end
|
||||
-- 处理ui上的事件,例如点击等
|
||||
function TRPSysMsgDetail:uiEventDelegate(go)
|
||||
local func = self.EventDelegate[go.name]
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end
|
||||
|
||||
-- 当顶层页面发生变化时回调
|
||||
function TRPSysMsgDetail:onTopPanelChange(topPanel)
|
||||
end
|
||||
|
||||
--------------------------------------------
|
||||
return TRPSysMsgDetail
|
||||
Reference in New Issue
Block a user