upgrade
This commit is contained in:
@@ -42,6 +42,15 @@ function _cell.show(go, data)
|
||||
else
|
||||
uiobjs.LabelTime.text = ""
|
||||
end
|
||||
elseif mData.type == DBMessage.MsgType.Timeout then
|
||||
---@type _DBMessage
|
||||
local newestMsg = DBMessage.getNewestMessage(mData.type)
|
||||
uiobjs.LabelNewest.text = newestMsg and newestMsg.content or ""
|
||||
if newestMsg then
|
||||
uiobjs.LabelTime.text = newestMsg.createTime
|
||||
else
|
||||
uiobjs.LabelTime.text = ""
|
||||
end
|
||||
elseif mData.type == DBMessage.MsgType.Task then
|
||||
---@type _DBTaskCust
|
||||
-- local newestMsg = DBMessage.getNewestMessage(mData.type)
|
||||
|
||||
@@ -47,7 +47,7 @@ function _cell.show(go, data)
|
||||
mData.gap = math.abs(mData.gap)
|
||||
|
||||
uiobjs.SpritePersent.fillAmount = mData.finishPersent / 100
|
||||
|
||||
mData.finishPersent = string.format("%.2f", mData.finishPersent)
|
||||
uiobjs.formRoot:setValue(mData)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -24,14 +24,18 @@ function _cell.show(go, data)
|
||||
mData = data
|
||||
uiobjs.LabelStatus.text = mData.READFLAG == DBMessage.ReadFlag.unread and "未读" or "已读"
|
||||
SetActive(uiobjs.SpriteReddot.gameObject, mData.READFLAG == DBMessage.ReadFlag.unread)
|
||||
uiobjs.LabelTitle.text = mData.TITLE
|
||||
local time = mData.CREATETIME
|
||||
uiobjs.LabelTitle.text = mData.TITLE or mData.title
|
||||
local time = mData.CREATETIME or mData.createTime
|
||||
if time then
|
||||
uiobjs.LabelTime.text = DateEx.formatByMs(time * 1000)
|
||||
if(type(time) == "string") then
|
||||
uiobjs.LabelTime.text = time
|
||||
else
|
||||
uiobjs.LabelTime.text = DateEx.formatByMs(time * 1000)
|
||||
end
|
||||
else
|
||||
uiobjs.LabelTime.text = ""
|
||||
end
|
||||
uiobjs.LabelContent.text = mData.CONTENT
|
||||
uiobjs.LabelContent.text = mData.CONTENT or mData.content
|
||||
end
|
||||
|
||||
-- 取得数据
|
||||
|
||||
Reference in New Issue
Block a user