This commit is contained in:
2020-07-24 22:12:55 +08:00
parent 3f114a6fca
commit 67a1f974bf
117 changed files with 14258 additions and 2325 deletions

View File

@@ -13,6 +13,7 @@ function TRPSetting:init(csObj)
uiobjs.scrollview = getCC(self.transform, "PanelContent", "UIScrollView")
self:setEventDelegate()
uiobjs.LabelPhone = getCC(uiobjs.scrollview.transform, "Table/ButtonPhone/LabelPhone", "UILabel")
end
-- 设置数据
@@ -24,6 +25,7 @@ end
-- 显示,在c#中。show为调用refresh,show和refresh的区别在于,当页面已经显示了的情况,当页面再次出现在最上层时,只会调用refresh
function TRPSetting:show()
uiobjs.scrollview:ResetPosition()
uiobjs.LabelPhone.text = Prefs.getUserName() or "未绑定"
end
-- 刷新
@@ -46,22 +48,33 @@ end
function TRPSetting:setEventDelegate()
self.EventDelegate = {
ButtonPersonInfor=function()
ButtonPersonInfor = function()
getPanelAsy("PanelMyInfor", onLoadedPanelTT)
end,
ButtonPassword = function()
getPanelAsy("PanelResetPasswordStep1", onLoadedPanelTT, {phone = Prefs.getUserName(), isModify = true})
end,
ButtonPhone = function()
if isNilOrEmpty(Prefs.getUserName()) then
getPanelAsy(
"PanelResetPasswordStep1",
onLoadedPanelTT,
{phone = Prefs.getUserName(), isBindPhone = true}
)
else
getPanelAsy("PanelBindPhone", onLoadedPanelTT, {phoneNo = Prefs.getUserName()})
end
end,
ButtonLogout = function()
MyUtl.confirm(
"确定要退出当前账号?",
function()
Prefs.setCurrGroup(Prefs.getUserName(), "")
Prefs.setUserPsd("")
hideTopPanel(self.csSelf)
hideTopPanel()
hideTopPanel()
getPanelAsy("PanelLogin", onLoadedPanel)
function()
Prefs.setCurrGroup(Prefs.getUserName(), "")
Prefs.setUserPsd("")
hideTopPanel(self.csSelf)
hideTopPanel()
hideTopPanel()
getPanelAsy("PanelLogin", onLoadedPanel)
end,
"退出账号"
)