local UITestingGiftImage = UIViewClass() local ImgPath = ConstAssetPathConfig.ImgPath function UITestingGiftImage:OnOpened(context) self:RegistSystemEvent(EventID.UI_TestingGift_Refresh, self.UpdateInfo) self:UpdateInfo(context) end function UITestingGiftImage:UpdateInfo(data) self.obj_state:SetState(1) if data.IsLocal then UIUtils.SetLocalizationImage(self.img_Activities, data.Image) else UIUtils.SetImageByAssetBundle(self.img_Activities, data.Image) end if not string.isNilOrEmpty(data.Button) then UIUtils.SetActive(self.group_Button["Btn_"..data.Button], true) end end function UITestingGiftImage:OnButtonClicked(comp) if comp == self.group_Button.Btn_QQ then local isSuccess = false if UNITY_IOS and not UNITY_EDITOR then local key = "0cf75fb75da02a81a9912cffad8c56bee804ce7814b10757ecc95fcd1550505b" local groupNum = "854643979" isSuccess = SDKUtil.JoinQQGroup(key,groupNum) elseif UNITY_ANDROID and not UNITY_EDITOR then local key = "21XDRam0gr3hmA-7fqfwwWPBMIFY3nSl" isSuccess = SDKUtil.JoinQQGroup(key) end if isSuccess == false then CTL.Tips.AddTipsMsg(Const_IDS["IDS_QQFailed"]) end elseif comp == self.group_Button.Btn_QS then UIManager.OpenView(Const_UI_Lua.UIEnum.UIQuestionnairePanel) end end return UITestingGiftImage