From 7ca4d7e50871c558e5927b6b0eeecb2071fdf14c Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 十一月 2020 14:07:47 +0800
Subject: [PATCH] Revert "20201127 合并嘉乐代码"

---
 HDL_ON/DAL/Server/IMessageCommon.cs |   93 ++++++++++------------------------------------
 1 files changed, 21 insertions(+), 72 deletions(-)

diff --git a/HDL_ON/DAL/Server/IMessageCommon.cs b/HDL_ON/DAL/Server/IMessageCommon.cs
index eae567b..cc5f79c 100644
--- a/HDL_ON/DAL/Server/IMessageCommon.cs
+++ b/HDL_ON/DAL/Server/IMessageCommon.cs
@@ -9,7 +9,7 @@
     /// </summary>
     public class IMessageCommon
     {
-
+       
         /// <summary>
         /// 鎺ュ彛绫荤殑杩斿洖淇℃伅
         /// </summary>
@@ -30,12 +30,6 @@
                 return m_Current;
             }
         }
-
-        /// <summary>
-        /// 鏄惁鍦ㄨ幏鍙杢oken
-        /// </summary>
-        public bool isGetingToken;
-
         /// <summary>
         /// 鏃犺閿欒(璁块棶浜戠鏃讹紝姝ゆ搷浣滃皢涓嶄細寮瑰嚭閿欒)
         /// </summary>
@@ -75,7 +69,7 @@
             //楠岃瘉鐮佸彂閫侀绻侊紝璇风◢鍚庡啀璇曪紒
             stateCodeDic["15"] = HDL_ON.StringId.VerificationCodeSentFrequently;
             //浼氳瘽瓒呮椂锛岃鏇存柊token
-            stateCodeDic[StateCode.TOKEN_EXPIRED] = HDL_ON.StringId.NotLogin;
+            stateCodeDic["10001"] = HDL_ON.StringId.NotLogin;
             ////鐧诲綍澶辫触锛岃处鍙锋垨鑰呭瘑鐮侀敊璇�
             stateCodeDic["10008"] = HDL_ON.StringId.LoginFailed_AccountOrPasswordError;
             //璐﹀彿涓嶅瓨鍦�
@@ -237,72 +231,32 @@
         {
             try
             {
-                //濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken
-                if (statuCode == StateCode.TOKEN_EXPIRED)
+                string mes = GetMsgByRequestName(statuCode);
+                if (mes == null) return;
+                if (!string.IsNullOrEmpty(tipStr))
                 {
-                    StartRefreshToken();
+                    mes = tipStr + "\n" + mes;
+                }
+                if (isTipStyle)
+                {
+                    Application.RunOnMainThread(() => {
+                        var tip = new Tip()
+                        {
+                            Text = mes,
+                            CloseTime = closeTime,
+                            Direction = AMPopTipDirection.None
+                        };
+                        tip.Show(MainPage.BaseView);
+                    });
                 }
                 else
                 {
-                    string mes = GetMsgByRequestName(statuCode);
-                    if (mes == null) return;
-                    if (!string.IsNullOrEmpty(tipStr))
-                    {
-                        mes = tipStr + "\n" + mes;
-                    }
-                    if (isTipStyle)
-                    {
-                        Application.RunOnMainThread(() =>
-                        {
-                            var tip = new Tip()
-                            {
-                                Text = mes,
-                                CloseTime = closeTime,
-                                Direction = AMPopTipDirection.None
-                            };
-                            tip.Show(MainPage.BaseView);
-                        });
-                    }
-                    else
-                    {
-                        Application.RunOnMainThread(() =>
-                        {
-                            new Alert("", mes, Language.StringByID(HDL_ON.StringId.Close)).Show();
-                        });
-                    }
+                    Application.RunOnMainThread(() => {
+                        new Alert("", mes, Language.StringByID(HDL_ON.StringId.Close)).Show();
+                    });
                 }
             }
             catch { }
-        }
-
-        /// <summary>
-        /// StartRefreshToken
-        /// </summary>
-        void StartRefreshToken()
-        {
-            if (isGetingToken) return;
-
-            new System.Threading.Thread(() =>
-            {
-                isGetingToken = true;
-
-                try
-                {
-                    var success = new HttpServerRequest().RefreshToken();
-                    if (success) {
-                        Utlis.WriteLine("RefreshToken success");
-                    }
-                }
-                catch
-                {
-                }
-                finally
-                {
-                    isGetingToken = false;
-                }
-            })
-            { IsBackground = true }.Start();
-
         }
     }
 
@@ -319,11 +273,6 @@
         /// 璐﹀彿涓嶅瓨鍦ㄧ殑閿欒鐮�
         /// </summary>
         public const string ACCOUNT_NOT_EXIST = "10010";
-
-        /// <summary>
-        /// 浼氳瘽瓒呮椂锛岃鏇存柊token
-        /// </summary>
-        public const string TOKEN_EXPIRED = "10001";
 
     }
 }

--
Gitblit v1.8.0