This commit is contained in:
2020-08-06 22:56:33 +08:00
parent d8127ddae2
commit 113faa50ce
50 changed files with 1480 additions and 855 deletions

View File

@@ -11,7 +11,7 @@ function TRPNewFollowTask:init(csObj)
TRPNewFollowTask.super.init(self, csObj)
self:initFiledsAttr()
self:setEventDelegate()
MyUtl.setContentView(getChild(self.transform, "PanelContent"), MyUtl.defaultTopHeight, 0)
MyUtl.setContentView(getChild(self.transform, "PanelContent"), MyUtl.defaultTopHeight, 190)
---@type UIScrollView
uiobjs.scrollView = getCC(self.transform, "PanelContent", "UIScrollView")
uiobjs.scrollView.dampenStrength = MyUtl.dampenStrength
@@ -24,6 +24,7 @@ function TRPNewFollowTask:init(csObj)
uiobjs.DetailRootTabel = uiobjs.DetailRoot:GetComponent("UITable")
uiobjs.ButtonSave = getChild(self.transform, "Top/ButtonSave")
uiobjs.ButtonCustDetail = getChild(self.transform, "ButtonCustDetail")
end
function TRPNewFollowTask:initFiledsAttr()
@@ -94,9 +95,20 @@ function TRPNewFollowTask:onShowFrame(cs)
end
end
-- 显示在c#中。show为调用refreshshow和refresh的区别在于当页面已经显示了的情况当页面再次出现在最上层时只会调用refresh
function TRPNewFollowTask:show()
if self.isNewFollow then
SetActive(uiobjs.ButtonCustDetail.gameObject, false)
else
---@type Coolape.CLPanelLua
local panel = CLPanelManager.getPanel("PanelCustDetail")
if panel and panel.gameObject.activeInHierarchy then
SetActive(uiobjs.ButtonCustDetail.gameObject, false)
else
SetActive(uiobjs.ButtonCustDetail.gameObject, true)
end
end
self:refreshContent()
SetActive(uiobjs.ButtonSave.gameObject, self.isNewFollow)
@@ -244,6 +256,25 @@ function TRPNewFollowTask:setEventDelegate()
end
end
)
end,
ButtonCustDetail = function()
showHotWheel()
NetProto.send.get_customerById(
self.mdata.custId,
function(content)
hideHotWheel()
if content.success then
local cust = content.result
if cust then
getPanelAsy(
"PanelCustDetailSimple",
onLoadedPanelTT,
{cust = cust, isShowButtonGet = false}
)
end
end
end
)
end
}
end