This commit is contained in:
2020-07-20 22:20:21 +08:00
parent 3429ffd1b1
commit 7dc1332dba
39 changed files with 3116 additions and 759 deletions

View File

@@ -18,7 +18,7 @@ end
-- 注意c#侧不会在调用show时调用refresh
function _cell.show(go, data)
mData = data
uiobjs.widget.height = mData.height or 40
uiobjs.widget.height = mData.attr.height or 40
end
-- 取得数据

View File

@@ -66,6 +66,11 @@ function _cell.show(go, data)
attr = mData.attr
attr.ifMust = attr.ifMust or 0
if uiobjs.spriteBg then
uiobjs.spriteBg.height = mData.attr.height or 160
end
NGUITools.AddWidgetCollider(csSelf.gameObject, false)
local jsonKey
if attr.donotJoinKey then
jsonKey = attr.id

View File

@@ -0,0 +1,78 @@
-- xx单元
local _cell = {}
---@type Coolape.CLCellLua
local csSelf = nil
local transform = nil
---@type _DBCust
local mData = nil
local uiobjs = {}
-- 初始化,只调用一次
function _cell.init(csObj)
csSelf = csObj
transform = csSelf.transform
-- uiobjs.LabelCompanyName = getCC(transform, "LabelCompanyName", "UILabel")
-- uiobjs.LabelTime = getCC(transform, "LabelTime", "UILabel")
---@type UIPopupList
uiobjs.LabelStatus = getCC(transform, "LabelStatus", "UIPopupList")
-- uiobjs.LabelCustName = getCC(transform, "LabelCustName", "UILabel")
-- uiobjs.SpriteStatus = getCC(transform, "SpriteStatus", "UISprite")
uiobjs.LabelServerNo = getCC(transform, "LabelServerNo", "UILabel")
---@type CLUIFormRoot
uiobjs.formRoot = csSelf:GetComponent("CLUIFormRoot")
uiobjs.SpriteStatus = getChild(transform, "SpriteStatus")
uiobjs.SpriteHeadIcon = getCC(transform, "SpriteHeadBg/SpriteHeadIcon", "UITexture")
end
-- 显示,
-- 注意c#侧不会在调用show时调用refresh
function _cell.show(go, data)
mData = data
mData._phoneNo = MyUtl.hidePhone(mData.phoneNo)
mData.lastFollowUpTime = isNilOrEmpty(mData.lastFollowUpTime) and "" or mData.lastFollowUpTime
local optionInfor = DBCust.getFilter4Popup(DBCust.FilterGroup.dealFlagList)
uiobjs.LabelStatus:refreshItems(optionInfor.options, optionInfor.values)
uiobjs.formRoot:setValue(mData)
if tostring(mData.dealFlag) == "0" then
SetActive(uiobjs.SpriteStatus.gameObject, true)
else
SetActive(uiobjs.SpriteStatus.gameObject, false)
end
_cell.setHeadIcon()
end
function _cell.setHeadIcon()
---@type _DBUser
local user = DBUser.getUserById(mData.serviceNo)
if user then
uiobjs.LabelServerNo.text = user.loginName
DBUser.getIcon(
mData.serviceNo,
function(texture)
if texture and texture.name == user.imageUrl then
uiobjs.SpriteHeadIcon.mainTexture = texture
end
end
)
end
end
-- 取得数据
function _cell.getData()
return mData
end
function _cell.uiEventDelegate(go)
local goName = go.name
if goName == "ButtonFollow" then
getPanelAsy("PanelNewFollow", onLoadedPanelTT, mData)
elseif goName == "ButtonTask" then
getPanelAsy("PanelNewFollowTask", onLoadedPanelTT, mData)
elseif goName == "ButtonContact" then
MyUtl.callCust(mData)
end
end
--------------------------------------------
return _cell

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b1fa44cf428b641e7a576b154c7dacac
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: