Exemplo n.º 1
0
        public static string Error(OperateResCodeEnum resCodeEnum, string ERR = "")
        {
            APIResultBase result = new APIResultBase();

            result.code = resCodeEnum.GetHashCode();
            result.msg  = string.IsNullOrWhiteSpace(ERR) ? resCodeEnum.ToString() : ERR;
            return(JsonConvert.SerializeObject(result));
        }
Exemplo n.º 2
0
        public static string VerifyFail()
        {
            APIResultBase result = new APIResultBase();

            result.code = OperateResCodeEnum.内部错误.GetHashCode();
            result.msg  = OperateResCodeEnum.内部错误.ToString();
            return(JsonConvert.SerializeObject(result));
        }