| | |
| | | return m_Current;
|
| | | }
|
| | | }
|
| | | /// <summary>
|
| | | /// 无视错误(访问云端时,此操作将不会弹出错误)
|
| | | /// </summary>
|
| | | public bool IgnoreError = false;
|
| | |
|
| | | /// <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:NOT_DEFINE_MSG!";
|
| | | }
|
| | | }
|
| | | }
|