Files
8357WMS/HHWMS.Web/Areas/Api/ApiController.cs
2023-08-11 15:17:28 +08:00

20 lines
633 B
C#

using HHWMS.Web.Models;
using Microsoft.AspNetCore.Mvc;
using WalkingTec.Mvvm.Mvc;
namespace HHWMS.Web
{
public abstract class ApiController : BaseApiController
{
protected JsonResult ApiResult(object data = null, string msg = "success")
{
return new JsonResult(new ApiJsonResult<object> { Data = data, Success = true, Status = true, Msg = msg });
}
protected JsonResult ApiResultError(object data = null, string msg = "faield")
{
return new JsonResult(new ApiJsonResult<object> { Data = data, Success = false, Status = false, Msg = msg });
}
}
}