| | |
| | | return m_Current;
|
| | | }
|
| | | }
|
| | | /// <summary>
|
| | | /// 无视错误(访问云端时,此操作将不会弹出错误)
|
| | | /// </summary>
|
| | | public bool IgnoreError = false;
|
| | |
|
| | | /// <summary>
|
| | | /// 全部信息
|
| | |
| | | dic["BeRestrict"] = R.MyInternationalizationString.uBeRestrict;
|
| | | //被绑定的子账号不存在,请注册后再试
|
| | | dic["AccountNoExists"] = R.MyInternationalizationString.BindSubAccount_AccountNoExists;
|
| | | //不能添加自己为子账号
|
| | | //不能把自己添加为成员
|
| | | dic["SameAccount"] = R.MyInternationalizationString.BindSubAccount_SameAccount;
|
| | | //不能把主账号添加为成员
|
| | | dic["NoAddMainAccount"] = R.MyInternationalizationString.BindSubAccount_NoAddMainAccount;
|
| | |
|
| | | //升级或降级子账号
|
| | | keys = "ZigbeeUsers/UpSubAccount";
|
| | |
| | | dic = dicMsg[keys];
|
| | | //账号未注册
|
| | | dic["AccountNoExists"] = R.MyInternationalizationString.GetAccountInfo_AccountNoExists;
|
| | | //请求参数错误
|
| | | dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
|
| | | //无效的登录Token
|
| | | dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
|
| | |
|
| | | //获取住宅分页
|
| | | keys = "App/GetHomePager";
|
| | |
| | | dic["Fail"] = R.MyInternationalizationString.uOperationFailed;
|
| | | //账号不存在
|
| | | dic["AccountNoExists"] = R.MyInternationalizationString.uAccountNoExists;
|
| | |
|
| | | //更新用户头相
|
| | | keys = "ZigbeeUsers/UpdateHeadImage";
|
| | | dicMsg[keys] = new Dictionary<string, int>();
|
| | | dic = dicMsg[keys];
|
| | | //请求参数错误
|
| | | dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
|
| | | //无效登录Token
|
| | | dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
|
| | |
|
| | | //更新验证密码
|
| | | keys = "ZigbeeUsers/UpdatEexpandPwd";
|
| | | dicMsg[keys] = new Dictionary<string, int>();
|
| | | dic = dicMsg[keys];
|
| | | //请求参数错误
|
| | | dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
|
| | | //无效登录Token
|
| | | dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
|
| | |
|
| | | //添加意见反馈
|
| | | keys = "App/AddOpinionFeedback";
|
| | | dicMsg[keys] = new Dictionary<string, int>();
|
| | | dic = dicMsg[keys];
|
| | | //请求参数错误
|
| | | dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
|
| | | //无效登录Token
|
| | | dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | /// </summary>
|
| | | /// <param name="requestName">接口</param>
|
| | | /// <param name="statuCode">状态码</param>
|
| | | /// <param name="pra">请求参数</param>
|
| | | /// <returns></returns>
|
| | | public string GetMsgByRequestName(string requestName, string statuCode)
|
| | | public string GetMsgByRequestName(string requestName, string statuCode, object pra)
|
| | | {
|
| | | if (IgnoreError == true)
|
| | | {
|
| | | //无视错误
|
| | | return null;
|
| | | }
|
| | |
|
| | | HdlLogLogic.Current.WriteLog(-1, "接口访问失败:" + UserCenterResourse.NowActionFormID + " " + requestName + " " + statuCode);
|
| | | if (pra != null)
|
| | | {
|
| | | //序列化对象
|
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(pra);
|
| | | HdlLogLogic.Current.WriteLog(-1, "参数:" + requestJson);
|
| | | }
|
| | |
|
| | | if (dicMsg.ContainsKey(requestName) == true && dicMsg[requestName].ContainsKey(statuCode) == true)
|
| | | {
|
| | | //在册的Msg
|
| | | return Language.StringByID(dicMsg[requestName][statuCode]);
|
| | | }
|
| | | string error = "ERROR:NOT_DEFINE_MSG!\r\n";
|
| | | if (requestName.Length > 5)
|
| | | {
|
| | | error += "*" + requestName.Substring(requestName.Length - 5, 5);
|
| | | }
|
| | | error += "(" + statuCode + ")";
|
| | | return error;
|
| | | return "ERROR:" + statuCode;
|
| | | }
|
| | | }
|
| | | }
|