From 8d48ab2145d2a2e2c635a66c65f45f9a3ebe67c8 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期日, 30 九月 2018 17:36:17 +0800
Subject: [PATCH] 3335 ios打包添加appstore审核期限,在这个期限内,不访问后台

---
 Core/GameEngine/Model/ConfigManager.cs |    5 +++++
 System/Login/GameNotice.cs             |   49 +++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 44 insertions(+), 10 deletions(-)

diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index 80587f5..29a4dcb 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -27,6 +27,11 @@
         SnxxzGame.Instance.AddApplicationOutAction(OnApplicationOut);
     }
 
+    public void LoadPriorBundleConfig()
+    {
+        StartSyncTask<PriorBundleConfig>(AssetPath.Resource);
+    }
+
     public void PreLoadConfigs()
     {
         StartSyncTask<PriorBundleConfig>(AssetPath.Resource);
diff --git a/System/Login/GameNotice.cs b/System/Login/GameNotice.cs
index 64fe063..1f7dd8d 100644
--- a/System/Login/GameNotice.cs
+++ b/System/Login/GameNotice.cs
@@ -9,11 +9,18 @@
     public static void OpenGameNotice()
     {
 #if !UNITY_EDITOR
-        var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
-        if (!string.IsNullOrEmpty(url) && !noticeShowed)
+        try
         {
-            SDKUtility.Instance.OpenUrl(url);
-            noticeShowed = true;
+            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+            if (!string.IsNullOrEmpty(url) && !noticeShowed)
+            {
+                SDKUtility.Instance.OpenUrl(url);
+                noticeShowed = true;
+            }
+        }
+        catch (System.Exception ex)
+        {
+            noticeShowed = true;
         }
 #endif
     }
@@ -21,8 +28,22 @@
     public static bool HasNotice()
     {
 #if !UNITY_EDITOR
-        var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
-        return !string.IsNullOrEmpty(url);
+        try
+        {
+            if (VersionUtility.Instance.versionInfo!=null )
+            {
+                var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+                return !string.IsNullOrEmpty(url);
+            }
+            else
+            {
+                return false;
+            }
+        }
+        catch (System.Exception ex)
+        {
+            return false;
+        }
 #else
         return false;
 #endif
@@ -31,11 +52,19 @@
     public static void OpenGameNoticeForce()
     {
 #if !UNITY_EDITOR
-        var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
-        if (!string.IsNullOrEmpty(url) )
+       try
         {
-            SDKUtility.Instance.OpenUrl(url);
-        }
+            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+            if (!string.IsNullOrEmpty(url))
+            {
+                SDKUtility.Instance.OpenUrl(url);
+            }
+        }
+       catch (System.Exception ex)
+       {
+            Debug.Log(ex);
+       }
+
 #endif
     }
 

--
Gitblit v1.8.0