uu
This commit is contained in:
@@ -41,13 +41,13 @@ function TRPAbout:initFiledsAttr()
|
||||
attr.donotJoinKey = true
|
||||
table.insert(self.baseFiledsAttr, attr)
|
||||
|
||||
attr = {}
|
||||
attr.attrName = "发布评价"
|
||||
attr.id = "assess"
|
||||
attr.attrType = DBCust.FieldType.text
|
||||
attr.ifMust = 0
|
||||
attr.donotJoinKey = true
|
||||
table.insert(self.baseFiledsAttr, attr)
|
||||
-- attr = {}
|
||||
-- attr.attrName = "发布评价"
|
||||
-- attr.id = "assess"
|
||||
-- attr.attrType = DBCust.FieldType.text
|
||||
-- attr.ifMust = 0
|
||||
-- attr.donotJoinKey = true
|
||||
-- table.insert(self.baseFiledsAttr, attr)
|
||||
end
|
||||
|
||||
-- 设置数据
|
||||
@@ -80,13 +80,71 @@ end
|
||||
function TRPAbout:onClickField(el)
|
||||
if el.jsonKey == "upgrade" then
|
||||
-- 更新
|
||||
self:upgrade()
|
||||
elseif el.jsonKey == "serviceAgreement" then
|
||||
-- 显示协议
|
||||
local path =
|
||||
joinStr(
|
||||
CLPathCfg.self.basePath,
|
||||
"/",
|
||||
CLPathCfg.upgradeRes,
|
||||
"/other/txt/",
|
||||
CLPathCfg.self.platform,
|
||||
"/serviceProto",
|
||||
".unity3d"
|
||||
)
|
||||
CLVerManager.self:getNewestRes(
|
||||
path,
|
||||
CLAssetType.assetBundle,
|
||||
function(path, content, orgs)
|
||||
if content then
|
||||
local msg = content.mainAsset and content.mainAsset.text or ""
|
||||
content:Unload(false)
|
||||
getPanelAsy(
|
||||
"PanelSysMsgDetail",
|
||||
onLoadedPanelTT,
|
||||
{PanelTitle = "服务协议", TITLE = "服务协议", CONTENT = msg}
|
||||
)
|
||||
end
|
||||
end,
|
||||
true,
|
||||
nil
|
||||
)
|
||||
elseif el.jsonKey == "assess" then
|
||||
-- 评价(这个做起来麻烦)
|
||||
-- 评价(这个做起来麻烦)
|
||||
end
|
||||
end
|
||||
|
||||
function TRPAbout:upgrade()
|
||||
showHotWheel()
|
||||
local oldVer = __version__
|
||||
local onGetVer = function(content, orgs)
|
||||
hideHotWheel()
|
||||
local map = JSON.DecodeMap(content)
|
||||
local newVer = MapEx.getString(map, "ver")
|
||||
if (tonumber(newVer) > tonumber(oldVer)) then
|
||||
local doUpgradeApp = function()
|
||||
Application.OpenURL(MapEx.getString(map, "url"))
|
||||
end
|
||||
if MapEx.getBool(map, "force") then
|
||||
CLUIUtl.showConfirm(LGet("MsgHadNewVerApp"), true, "更新", doUpgradeApp, "", nil)
|
||||
else
|
||||
CLUIUtl.showConfirm(LGet("MsgHadNewVerApp"), false, "更新", doUpgradeApp, "忽略", nil)
|
||||
end
|
||||
else
|
||||
MyUtl.toastS("当前已经是最新版本 V" .. newVer)
|
||||
end
|
||||
end
|
||||
|
||||
local onGetVerError = function(msg, orgs)
|
||||
hideHotWheel()
|
||||
MyUtl.toastW("更新检查失败")
|
||||
end
|
||||
|
||||
local chlCode = getChlCode()
|
||||
local url = Utl.urlAddTimes(joinStr(CLVerManager.self.baseUrl, "/appVer.", chlCode, ".json"))
|
||||
WWWEx.get(url, CLAssetType.text, onGetVer, onGetVerError, nil, true, 1)
|
||||
end
|
||||
function TRPAbout:onSelectField(go)
|
||||
end
|
||||
|
||||
@@ -98,7 +156,6 @@ end
|
||||
|
||||
-- 刷新
|
||||
function TRPAbout:refresh()
|
||||
uiobjs.TableLua.luaTable.release()
|
||||
end
|
||||
|
||||
-- 关闭页面
|
||||
|
||||
Reference in New Issue
Block a user