using System; using System.Collections.Generic; using System.Text; namespace Nirvana.Common { public class ResultInfo { public int code { get; set; } public string message { get; set; } public object data { get; set; } public ResultInfo() { } public ResultInfo(int codes,string msg,object datas=null) { this.code = codes; this.message = msg; this.data = datas; } } public class ResultState { /// /// 失败 1 /// public static readonly int FAIL = 1; /// /// 成功 0 /// public static readonly int SUCCESS = 0; /// /// 微信获取不到用户信息 /// public static readonly int WXUNAUTHORITY = 2; /// /// 登录成功 /// public static readonly int LOGINSUCCESS = 3; /// /// 今日还未测测量 /// public static readonly int NORESULT = 4; /// /// 未找到 /// public static readonly int REDIRECT = 404; /// /// 系统异常 /// public static readonly int SYSTEMERROR = 500; /// /// 没有访问权限 /// public static readonly int NOAUTH = 40001; /// /// TOKEN验证未通过 /// public static readonly int TOKEN = -100; /// /// 请求禁用资源请求 /// public static readonly int DISAblEDRESOURCE = 100001; /// /// 无资源 /// public static readonly int NORESOURCE = 100002; } public class ApiResultState { /// /// 系统繁忙 /// public static readonly int SYSTEMBUSY = -1; /// /// 成功 0 /// public static readonly int SUCCESS = 0; /// /// 参数有误 /// public static readonly int PARAMERROR = 40000; /// /// appid无效 /// public static readonly int NONAPPID = 40001; /// /// IP不合法 /// public static readonly int IPNOALLOW = 40003; /// /// 缺少appid参数 /// public static readonly int NOAPPID = 41001; /// /// 无可用数据 /// public static readonly int NODATA = 50001; } public class ResultInfoV1 { public string state { get; set; } public string message { get; set; } public object data { get; set; } } public enum ResultStateV1 { //失败 FAIL = 1, //成功 SUCCESS = 0, //100段资源相关 //请求禁用资源请求 DISAblEDRESOURCE = 100001, } }