From 716d1b3b705e7d37e6edebd7f60b7613ab5aee87 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 20 十一月 2020 18:46:22 +0800 Subject: [PATCH] 1120-3 --- HDL_ON/DAL/Server/IMessageCommon.cs | 49 +++++++++++++++++++++++++++++++------------------ 1 files changed, 31 insertions(+), 18 deletions(-) diff --git a/HDL_ON/DAL/Server/IMessageCommon.cs b/HDL_ON/DAL/Server/IMessageCommon.cs index 9239d02..401eb3a 100644 --- a/HDL_ON/DAL/Server/IMessageCommon.cs +++ b/HDL_ON/DAL/Server/IMessageCommon.cs @@ -35,10 +35,10 @@ /// </summary> public bool IgnoreError = false; - /// <summary> - /// 鍏ㄩ儴淇℃伅 - /// </summary> - private Dictionary<string, Dictionary<string, int>> dicMsg = null; + ///// <summary> + ///// 鍏ㄩ儴淇℃伅 + ///// </summary> + //private Dictionary<string, Dictionary<string, int>> dicMsg = null; /// <summary> /// 閫氱敤閿欒鐮� @@ -51,7 +51,7 @@ /// </summary> public void InitAllMsg() { - dicMsg = new Dictionary<string, Dictionary<string, int>>(); + //dicMsg = new Dictionary<string, Dictionary<string, int>>(); #region 鍏遍�氶敊璇爜 stateCodeDic = new Dictionary<string, int>(); //涓庢湇鍔″櫒閫氳澶辫触 @@ -62,15 +62,21 @@ #region 鍩虹鏈嶅姟 鏂伴敊璇爜 //绯荤粺缁存姢涓瓇璇风◢鍚庡啀璇晘 stateCodeDic["2"] = HDL_ON.StringId.SystemMaintenance; + //绛惧悕閿欒 + stateCodeDic["4"] = HDL_ON.StringId.SignatureError; //楠岃瘉鐮佹牎楠屽け璐� stateCodeDic["14"] = HDL_ON.StringId.VerificationCodeWrong; - ////浼氳瘽瓒呮椂锛岃鏇存柊token - //stateCodeDic["10001"] = HDL_ON.StringId.uOperationFailed; + //楠岃瘉鐮佸彂閫侀绻侊紝璇风◢鍚庡啀璇曪紒 + stateCodeDic["15"] = HDL_ON.StringId.VerificationCodeSentFrequently; + //浼氳瘽瓒呮椂锛岃鏇存柊token + stateCodeDic["10001"] = HDL_ON.StringId.NotLogin; ////鐧诲綍澶辫触锛岃处鍙锋垨鑰呭瘑鐮侀敊璇� stateCodeDic["10008"] = HDL_ON.StringId.LoginFailed_AccountOrPasswordError; //璐﹀彿涓嶅瓨鍦� stateCodeDic[StateCode.ACCOUNT_NOT_EXIST] = HDL_ON.StringId.AccountNotExist; - //#endregion + //璐﹀彿宸插瓨鍦� + stateCodeDic["10012"] = HDL_ON.StringId.AccountExist; + #endregion ////return; //#region 2020-09-18 鏂板鎺ラ敊璇爜 @@ -178,7 +184,6 @@ #endregion - #endregion } @@ -189,7 +194,7 @@ /// <param name="revertObj">浜戠杩斿洖鐨勬暟鎹�</param> /// <param name="pra">璇锋眰鍙傛暟</param> /// <returns></returns> - public string GetMsgByRequestName(string requestName, string statuCode) + public string GetMsgByRequestName(string statuCode) { if (IgnoreError == true) { @@ -203,11 +208,11 @@ return Language.StringByID(stateCodeDic[statuCode]); } - if (dicMsg.ContainsKey(requestName) == true && dicMsg[requestName].ContainsKey(statuCode) == true) - { - //鍦ㄥ唽鐨凪sg - return Language.StringByID(dicMsg[requestName][statuCode]); - } + //if (dicMsg.ContainsKey(requestName) == true && dicMsg[requestName].ContainsKey(statuCode) == true) + //{ + // //鍦ㄥ唽鐨凪sg + // return Language.StringByID(dicMsg[requestName][statuCode]); + //} return Language.StringByID(HDL_ON.StringId.FailedRequestServer) + "\n(" + statuCode + ")"; } @@ -220,11 +225,11 @@ /// <param name="statuCode"></param> /// <param name="isTipStyle"></param> /// <param name="tipStr">琛ュ厖鐨勯敊璇彁绀�</param> - public void ShowErrorInfoAlter(string requestName, string statuCode, bool isTipStyle = false, string tipStr = "") + public void ShowErrorInfoAlter(string statuCode, bool isTipStyle = true, int closeTime = 2, string tipStr = "") { try { - string mes = GetMsgByRequestName(requestName, statuCode); + string mes = GetMsgByRequestName(statuCode); if (mes == null) return; if (!string.IsNullOrEmpty(tipStr)) { @@ -232,7 +237,15 @@ } if (isTipStyle) { - //MainPage.AddTip(mes); + Application.RunOnMainThread(() => { + var tip = new Tip() + { + Text = mes, + CloseTime = closeTime, + Direction = AMPopTipDirection.None + }; + tip.Show(MainPage.BaseView); + }); } else { -- Gitblit v1.8.0