local TestingGift_Controller = {} local private = {} function TestingGift_Controller.OnSDKCall(funcName, id) private.activityID = id if funcName == "FB" then SDKUtil.SetSDKSuccessCall(private.OnSDKCallback) SDKUtil.AttentionFbFanPage() elseif funcName == "Reviews" then SDKUtil.SetSDKSuccessCall(private.OnSDKCallback) SDKUtil.OpenStoreScore() elseif funcName == "Bind" then SDKUtil.SetSDKSuccessCall(private.OnSDKCallback) SDKUtil.BindAccount("") end end function private.OnSDKCallback() MDL.TestingGift.HWActivityRewardReq(private.activityID) end function TestingGift_Controller.HasEntry() if MDL.Unlock.IsUnlock(MDL.Unlock.FunctionType.TestWelfare) then for i, v in DataSheetManager.Welfare:GetEnumerator() do if TestingGift_Controller.CheckTabShow(v) then return true end end return false else return false end end --页签是否显示 --0通用 1国服 2海外 function TestingGift_Controller.CheckTabShow(data) local id = data.ID if id == MDL.TestingGift.ActivityID.Questionnaire and not MDL.Unlock.IsUnlock(MDL.Unlock.FunctionType.Questionnaire) then return false end if id == MDL.TestingGift.ActivityID.FaceBookFan and not MDL.Unlock.GetDebugSwitchState(MDL.Unlock.DebugSwitchType.FaceBookFan) then return false end if id == MDL.TestingGift.ActivityID.StoreScore and not MDL.Unlock.GetDebugSwitchState(MDL.Unlock.DebugSwitchType.StoreScore) then return false end if id == MDL.TestingGift.ActivityID.BindAccount and not MDL.Unlock.GetDebugSwitchState(MDL.Unlock.DebugSwitchType.BindAccount) then return false end local region = data.Region if region == 0 then return true end if region == 1 and not GameAppInfo.IsOverseaPackage() then return true end if region == 2 and (GameAppInfo.IsOverseaPackage() or GameAppInfo.IsJapanesePackage() or GameAppInfo.IsVietnamPackage()) then return true end return false end return TestingGift_Controller