diff --git a/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua b/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua index f7096df2cb..107152f774 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua @@ -69,6 +69,7 @@ function this.GetNotice(str) -- value.content="一群人在这里忙碌,嬉闹着搭帐篷建营地这是一个由公司同事私下组织的野营活动,当然,全都是年轻人,因为要背着帐篷等装备登山远足,年长一些的人体力不够原本大家是希望公司组织一次野营的,但公司每年都是组团旅游,有导游开大巴的那种,所以今年,很多同事干脆不跟随公司一起,反而是让几个有户外经验的同事领头自己组织,所以也有了这次登山野营。一群人在这里忙碌,嬉闹着搭帐篷建营地这是一个由公司同事私下组织的野营活动,当然,全都是年轻人,因为要背着帐篷等装备登山远足,年长一些的人体力不够原本大家是希望公司组织一次野营的,但公司每年都是组团旅游,有导游开大巴的那种,所以今年,很多同事干脆不跟随公司一起,反而是让几个有户外经验的同事领头自己组织,所以也有了这次登山野营。" -- LogError("title:"..value.title.." content:"..value.content.." type:"..value.type) -- end + this.TitleText.text=Language[11147] if data.list and #data.list>0 then this.ContentText.gameObject:SetActive(false) table.sort(data.list, function(a, b) @@ -97,9 +98,15 @@ function this.GetNotice(str) elseif value.type==4 then img.gameObject:SetActive(false) end - Util.GetGameObject(prelist[key],"Image/title"):GetComponent("Text").text=value.title + -- 表体 + local title = Util.GetGameObject(prelist[key],"Image/title"):GetComponent("Text") + local titleStr = string.split(value.title,"|") + title.text = titleStr[GetCurLanguage()+1] or titleStr[1] + -- 内容 local content=Util.GetGameObject(prelist[key],"content"):GetComponent("Text") - content.text=value.content + local contentStr = string.split(string.gsub(value.content, "\\n", "\n"),"|") + content.text = contentStr[GetCurLanguage()+1] or contentStr[1] + local down=Util.GetGameObject(prelist[key],"Image/down") local left=Util.GetGameObject(prelist[key],"Image/left") local isOpen=true @@ -107,12 +114,12 @@ function this.GetNotice(str) left:SetActive(not isOpen) content.gameObject:SetActive(isOpen) local btn=Util.GetGameObject(prelist[key],"Image") - Util.AddClick(btn,function() - isOpen=not isOpen - down:SetActive(isOpen) - left:SetActive(not isOpen) - content.gameObject:SetActive(isOpen) - end) + Util.AddClick(btn,function() + isOpen=not isOpen + down:SetActive(isOpen) + left:SetActive(not isOpen) + content.gameObject:SetActive(isOpen) + end) end -- local titleStr = string.split(data.parms.title,"|") -- this.TitleText.text =titleStr[GetCurLanguage()+1] or titleStr[1] @@ -120,7 +127,6 @@ function this.GetNotice(str) -- this.ContentText.text = contentStr[GetCurLanguage()+1] or contentStr[1] else this.ContentText.gameObject:SetActive(true) - this.TitleText.text=Language[11147] this.ContentText.text=Language[11148] end end