local UIUserLawJP = UIViewClass() function UIUserLawJP:OnOpened(context) self:SetUIMessage(context) end function UIUserLawJP:OnButtonClicked(comp) if comp == self.UICommonPopUp.btn_Close then self:CloseView() end end function UIUserLawJP:SetUIMessage(msg) if msg.type == 1 then --利用规约 UIUtils.SetLabel(self.UICommonPopUp.txt_Title, UIUtils.GetLocalizedTxt(Const_IDS["IDS_JP_LoginAgreement_UseProtocol"])) elseif msg.type == 2 then --隐私协议 UIUtils.SetLabel(self.UICommonPopUp.txt_Title, UIUtils.GetLocalizedTxt(Const_IDS["IDS_JP_LoginAgreement_PrivacyRegulations1"])) elseif msg.type == 3 then --特定商品取引 UIUtils.SetLabel(self.UICommonPopUp.txt_Title, UIUtils.GetLocalizedTxt(Const_IDS["IDS_JP_LoginAgreement_SpecificSupplier"])) elseif msg.type == 4 then --资金决策 UIUtils.SetLabel(self.UICommonPopUp.txt_Title, UIUtils.GetLocalizedTxt(Const_IDS["IDS_JP_LoginAgreement_CapitalDecision"])) end --sdk回调信息的msg里面的换行符为\U000020282,在lua中处理成\n local pattern = string.gsub(msg.callbackMsg,"\xE2\x80\xA8","\n") self.txt_StoryDes.text = pattern end return UIUserLawJP