CrabtreeOn,印度客户定制APP,迁移2.0平台版本
JLChen
2021-03-29 383e792a45268d220cb0e2bf1e9823ba451c428f
Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs
@@ -482,27 +482,7 @@
        }
        void ShowDelHomeErrorInfo (string stateCodeStr)
        {
            string mes = "";
            if (stateCodeStr == "NoLogin") {
                mes = ErrorCode.NoLogin;
            } else if (stateCodeStr == "CurrentHomeExixtsGatewayBind") {
                mes = ErrorCode.CurrentHomeExixtsGatewayBind;
            } else if (stateCodeStr == ErrorCode.NetworkError) {
                mes = ErrorCode.NetworkError;
            } else {
                //RequestServerFailed
                //mes = ErrorCode.AddFailed;
                mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
            }
            if (!string.IsNullOrEmpty (mes)) {
                Application.RunOnMainThread (() => {
                    new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                });
            }
        }
        /// <summary>
        /// 启动本地模式
@@ -838,63 +818,8 @@
        }
        void ShowAddHomeErrorInfo (string stateCodeStr) {
            string mes = "";
            if (stateCodeStr == "NoLogin") {
                mes = ErrorCode.NoLogin;
            } else if (stateCodeStr == "Exist") {
                mes = ErrorCode.NameExist;
            } else if (stateCodeStr == ErrorCode.NetworkError) {
                mes = ErrorCode.NetworkError;
            } else {
                //RequestServerFailed
                //mes = ErrorCode.AddFailed;
                mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
            }
            if (!string.IsNullOrEmpty (mes)) {
                Application.RunOnMainThread (() => {
                    new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                });
            }
        }
        /// <summary>
        /// 响应状态码:
        //(1)Success 则 [调用此接口操作成功], ResponseData则为null
        //(2)ParameterOrEmpty,则响应字段中 [ErrorInfo] 为错误信息, ResponseData则为null
        //(3)NoLogin,则响应字段中 [ErrorInfo] 为错误信息为 [无效登录Token!]
        //(5)NoRecord,,则响应字段中 [ErrorInfo] 为错误信息为 [未到相关记录, 请确认您提交参数是否正确]
        //(6)Exist,则响应字段中 [ErrorInfo] 为错误信息为 [当前提交的的住宅:XXXX,名称已存在!]
        //(7)NoPermission,则响应字段中 [ErrorInfo] 为错误信息为 [您并不具有此分享者此住宅的权限!]
        //(8)InsufficientAuthority,则响应字段中 [ErrorInfo] 为错误信息为 [您并不具有此分享者此住宅的完全控制权限!]
        //(9)HomeIdAndTokenNoConsistent,则响应字段中 [ErrorInfo] 为错误信息为 [您当前Token与你当前控制的HomeId不一致!]
        //(10)NoPermission,则响应字段中 [ErrorInfo] 为错误信息为 [XXX]
        /// </summary>
        /// <param name="stateCodeStr"></param>
        void ShowEditHomeErrorInfo (string stateCodeStr)
        {
            string mes = "";
            if (stateCodeStr == "NoLogin") {
                mes = ErrorCode.NoLogin;
            } else if (stateCodeStr == "Exist") {
                mes = ErrorCode.NameExist;
            } else if (stateCodeStr == "HomeIdAndTokenNoConsistent") {
                mes = ErrorCode.HomeIdAndTokenNoConsistent;
            } else if (stateCodeStr == ErrorCode.NetworkError) {
                mes = ErrorCode.NetworkError;
            } else {
                //RequestServerFailed
                //mes = ErrorCode.AddFailed;
                mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
            }
            if (!string.IsNullOrEmpty (mes)) {
                Application.RunOnMainThread (() => {
                    new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                });
            }
        }
    }
}