From d4973876384be55df64de45db8a511d1e0330872 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 23 六月 2021 17:06:20 +0800
Subject: [PATCH] 房间小图列表
---
HDL_ON/DAL/Server/IMessageCommon.cs | 47 ++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/DAL/Server/IMessageCommon.cs b/HDL_ON/DAL/Server/IMessageCommon.cs
old mode 100755
new mode 100644
index 12b884d..2564a72
--- a/HDL_ON/DAL/Server/IMessageCommon.cs
+++ b/HDL_ON/DAL/Server/IMessageCommon.cs
@@ -64,7 +64,10 @@
stateCodeDic["NETWORK_ERROR"] = StringId.FailedRequestServer;
//鏁版嵁寮傚父
stateCodeDic["DATA_EXCEPTION"] = StringId.DataExceptionPleaseTryAgain;
-
+ //涓庢湇鍔″櫒閫氳澶辫触
+ stateCodeDic[StateCode.NETWORK_ERROR] = StringId.FailedRequestServer;
+ //鏁版嵁寮傚父
+ stateCodeDic[StateCode.DATA_EXCEPTION] = StringId.DataExceptionPleaseTryAgain;
#region 鍩虹鏈嶅姟 鏂伴敊璇爜 2020-12-07
//绯荤粺绻佸繖~璇风◢鍚庡啀璇晘
stateCodeDic["1"] = StringId.SystemIsBusy;
@@ -111,9 +114,8 @@
stateCodeDic["10017"] = StringId.RegistrationFailedPleaseTryAgain;
////绉熸埛涓嶅瓨鍦�
//stateCodeDic["10018"] = StringId.10018;
- //瀵嗙爜杩炵画杈撻敊娆℃暟宸茶揪鍒�10娆�,鐢ㄦ埛宸茶閿佸畾,璇锋鏃�0鐐瑰悗鍐嶇櫥闄�
+ //瀵嗙爜閿欒娆℃暟杩囧锛岃处鍙疯閿佸畾锛�
stateCodeDic["10019"] = StringId.AccountLoginLock;
-
//娌℃湁鏉冮檺
stateCodeDic["10105"] = StringId.PermissionDenied;
//楠岃瘉鐮佸凡缁忓彂閫�
@@ -156,6 +158,15 @@
//*********缃戝叧*********
//缃戝叧涓嶅瓨鍦�
stateCodeDic["10506"] = StringId.GatewayDoesNotExist;
+
+
+ //鎺у埗澶辫触
+ stateCodeDic["14007"] = StringId.ControlFailure;
+ //缃戝叧绂荤嚎
+ stateCodeDic["14005"] = StringId.GatewayOffline;
+ //璁惧绂荤嚎
+ stateCodeDic["14006"] = StringId.DeviceOffline;
+
//*********鍦烘櫙/鑷姩鍖�*********
//鍦烘櫙宸插瓨鍦�
stateCodeDic["14501"] = StringId.SceneAlreadyExists;
@@ -232,7 +243,7 @@
/// <param name="statuCode"></param>
/// <param name="isTipStyle"></param>
/// <param name="tipStr">琛ュ厖鐨勯敊璇彁绀�</param>
- public void ShowErrorInfoAlter(string statuCode, bool isTipStyle = true, int closeTime = 2, string tipStr = "")
+ public void ShowErrorInfoAlter(string statuCode, bool isTipStyle = true, int closeTime = 2, string tipStr = "",bool showAllMsg = true)
{
try
{
@@ -247,7 +258,13 @@
if (mes == null) return;
if (!string.IsNullOrEmpty(tipStr))
{
- mes = tipStr + "\n" + mes;
+ if (showAllMsg)
+ {
+ mes = tipStr + "\n" + mes;
+ }else
+ {
+ mes = tipStr;
+ }
}
if (isTipStyle)
{
@@ -266,7 +283,7 @@
{
Application.RunOnMainThread(() =>
{
- new Alert("", mes, Language.StringByID(StringId.Close)).Show();
+ new Alert("", mes+$" \r\nCode:{statuCode}", Language.StringByID(StringId.Close)).Show();
});
}
}
@@ -288,7 +305,7 @@
try
{
var success = new HttpServerRequest().RefreshToken();
- if (success) {
+ if (success == StateCode.SUCCESS) {
Utlis.WriteLine("RefreshToken success");
}
}
@@ -311,6 +328,16 @@
public class StateCode
{
/// <summary>
+ /// 缃戠粶璇锋眰寮傚父
+ /// APP鑷畾涔夐敊璇爜
+ /// </summary>
+ public const string NETWORK_ERROR = "-1";
+ /// <summary>
+ /// 鏁版嵁瑙f瀽閿欒
+ /// APP鑷畾涔夐敊璇爜
+ /// </summary>
+ public const string DATA_EXCEPTION = "-2";
+ /// <summary>
/// 璇锋眰鎴愬姛鐨勭姸鎬佺爜
/// </summary>
public const string SUCCESS = "0";
@@ -326,6 +353,12 @@
/// 璐﹀彿涓嶅瓨鍦ㄧ殑閿欒鐮�
/// </summary>
public const string ACCOUNT_NOT_EXIST = "10010";
+ /// <summary>
+ /// 鐧诲綍閿佸畾锛屽瘑鐮侀敊璇鏁拌繃澶�
+ /// 瀵嗙爜杈撳叆閿欒瓒呰繃10娆★紝璇�30鍒嗛挓鍚庨噸璇�!
+ /// </summary>
+ public const string AccountLoginLock = "10019";
+
}
--
Gitblit v1.8.0