Browse Source

修改2.1接口-2

胡佳骏 1 year ago
parent
commit
52e3649e8f

+ 2 - 2
Assets/COS/QCloudCSharpSDK/COSXML/Transfer/TransferManager.cs

@@ -29,12 +29,12 @@ namespace COSXML.Transfer
 
             if (cosXmlServer == null)
             {
-                throw new ArgumentNullException("CosXmlServer = null");
+              //  throw new ArgumentNullException("CosXmlServer = null");
             }
 
             if (transferConfig == null)
             {
-                throw new ArgumentNullException("TransferConfig = null");
+             //   throw new ArgumentNullException("TransferConfig = null");
             }
 
             this.transferConfig = transferConfig;

+ 1 - 1
Assets/COSScripts/COSDownLoad.cs

@@ -319,7 +319,7 @@ public class COSDownLoad:MonoSingleton<COSDownLoad>
         if (state == TaskState.Completed || state == TaskState.Failed)
             for (int i = 0; i < listDownLoadTask.Count; i++)
             {
-                Debug.Log(listDownLoadTask.Count + "   "+listDownLoadTask[i].State());
+                Debug.Log(listDownLoadTask.Count + "   " + listDownLoadTask[i].State() + "   " + listDownLoadTask[i].localFileName);
                 if (listDownLoadTask[i].State() == TaskState.Completed)
                 {
                     DownloadResManager.Instance.DownLoadCompleted(listDownLoadTask[i].localFileName);

+ 1 - 1
Assets/Scripts/Net/HttpTool.cs

@@ -153,7 +153,7 @@ public class HttpTool : MonoSingleton<HttpTool>
             yield return webRequest.SendWebRequest();
 
             Debug.Log("CallBack==>"+ webRequest.downloadHandler.text);
-            if (webRequest.isHttpError || webRequest.isNetworkError)
+            if (webRequest.isHttpError || webRequest.isNetworkError)//webRequest.result == UnityWebRequest.Result.ProtocolError || webRequest.result == UnityWebRequest.Result.ConnectionError
             {
                 Debug.LogError(url + "\n" + webRequest.error + "\n" + webRequest.downloadHandler.text);
                 string error = webRequest.downloadHandler.text;

+ 11 - 2
Assets/Scripts/UI/GameManager.cs

@@ -649,7 +649,7 @@ public class GameManager : MonoSingleton<GameManager>
         SceneValue = scene;
         if (m_MinMap.Map.sprite == null)
         {
-            GetMinMap(scene );
+            GetMinMap(scene ,null);
         }
         else
         {
@@ -685,11 +685,14 @@ public class GameManager : MonoSingleton<GameManager>
         UIManager.Instance.ShowUI(UINameConfig.LoadingPanel, typeof(LoadingPanel), (int)ELoadState.download);
         DownloadManager.Instance.UpdataData();
     }
+    Action<bool> GetMinMapBack;
     /// <summary>
     /// 获取小地图
     /// </summary>
-    public void GetMinMap( SceneValue scene )
+    public void GetMinMap( SceneValue scene ,Action<bool> getBack)
     {
+        GetMinMapBack = getBack;
+        Debug.Log("Hjj 开始获取地图大小==》");
         DownloadData data1 = new DownloadData();
         string filename = Path.GetFileName(MapPicUrl);
         data1.name = filename;
@@ -759,6 +762,7 @@ public class GameManager : MonoSingleton<GameManager>
 
     private void HandleMsg(Msg msg)
     {
+        Debug.Log("Hjj 获取地图大小==》");
        // MsgHandler.RemoveListener()
        if(msg.Value!=null)
         {
@@ -793,6 +797,11 @@ public class GameManager : MonoSingleton<GameManager>
             {
                 StartCreateScene(SceneValue);
             }
+            GetMinMapBack?.Invoke(true);
+        }else
+        {
+
+            GetMinMapBack?.Invoke(false);
         }
     }
 

+ 6 - 15
Assets/Scripts/UI/LoginPanel.cs

@@ -259,12 +259,6 @@ public class LoginPanel : BaseUI
     /// </summary>
     private void OnClickLogin()
     {
-
-#if UNITY_EDITOR
-     //   m_AccountStr = "1768147286@qq.com";
-        m_AccountStr = "Blue@163.com";
-        //m_PasswordStr = "ghztech@402B";
-#endif
         if (string.IsNullOrWhiteSpace(m_AccountStr))
         {
             //m_AccountError.gameObject.SetActive(true);
@@ -663,7 +657,11 @@ public class LoginPanel : BaseUI
 
         //m_AccountStr = "test_adv@ghz-tech.com";
         //m_PasswordStr = "123456789";
-
+#if UNITY_EDITOR
+        //   m_AccountStr = "1768147286@qq.com";
+        m_AccountStr = "jiajun.hu@ghz-tech.com";
+        m_PasswordStr = "123456Aa";
+#endif
         //m_AccountStr = "2463951@qq.com";
         //m_PasswordStr = "123456Aa";
 
@@ -672,14 +670,7 @@ public class LoginPanel : BaseUI
 
         m_RemenberPwd.isOn = m_IsRemberPwd;
 
-#if UNITY_EDITOR
-        // m_AccountStr = "ghztest2@ghz-tech.com";
-        // m_PasswordStr = "123456Aa";
-        m_AccountStr = "1768147286@qq.com";
-        m_AccountStr = "jiajun.hu@ghz-tech.com";
-        // m_AccountStr = "yhb_adv10@1.com";
-        m_PasswordStr = "123456Aa";
-#endif
+
         if (!string.IsNullOrWhiteSpace(m_AccountStr) && !string.IsNullOrWhiteSpace(m_PasswordStr))
         {
             m_Account.text = m_AccountStr;

+ 9 - 2
Assets/Scripts/UI/SceneChoose.cs

@@ -97,8 +97,15 @@ public class SceneChoose : BaseUI
                     Debug.Log("scene.backgroundImages===>" + mes);
                     Debug.Log("scene.backgroundImages===>"+ scene.backgroundImages.Count);
                     GameManager.Instance.MapPicUrl = scene.backgroundImages[0].base64;
-                    GameManager.Instance.GetMinMap(scene);
-                    GetSNInit();
+                    GameManager.Instance.GetMinMap(scene, (bool back) =>
+                    {
+                        if (back)
+                        {
+                            GetSNInit();
+                        }
+
+                    } );
+
                 }
                 else
                 {