Files
WMS/HHWMS.Web/Areas/Api/ApiController.cs
T
2023-07-25 19:20:18 +08:00

20 lines
637 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, State = true, Status = true, Message = msg });
}
protected JsonResult ApiResultError(object data = null, string msg = "faield")
{
return new JsonResult(new ApiJsonResult<object> { Data = data, State = false, Status = false, Message = msg });
}
}
}