示例#1
0
 public ApiResultModel(bool success, string erroMsg, string errorUrl = "", JKExceptionType exceptionType = JKExceptionType.Common, string redirectUrl = "")
 {
     Success       = success;
     ErrorMsg      = erroMsg;
     ErrorUrl      = errorUrl;
     ExceptionType = exceptionType;
     RedirectUrl   = redirectUrl;
 }
示例#2
0
 public static ApiResultModel ResultApiError(this Controller left, string errorMsg, string errorUrl = "", JKExceptionType exceptionType = JKExceptionType.Common, string redirectUrl = "")
 {
     return(new ApiResultModel(false, errorMsg, errorUrl, exceptionType, redirectUrl));
 }
示例#3
0
        //public static ApiResultModel Result(this ApiController left, bool success = true, string errorMsg = "", int total = 0, string url = "", object returnData = null, JKExceptionType exceptionType = JKExceptionType.Common, string redirectUrl = "")
        //{
        //    return new ApiResultModel(success, errorMsg, total, url, exceptionType, redirectUrl, returnData);
        //}


        public static ApiResultModel ResultApiSuccess(this Controller left, JKExceptionType exceptionType = JKExceptionType.Common, string redirectUrl = "")
        {
            return(new ApiResultModel(true, "", "", exceptionType, redirectUrl));
        }