Files
WMS/HHWMS.Web/Areas/Api/ApiController.cs
T

20 lines
646 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 = "操作成功!")
{
return new JsonResult(new ApiJsonResult<object> { Data = data, Success = true, Status = true, Msg = msg });
}
protected JsonResult ApiResultError(object data = null, string msg = "操作失败!")
{
return new JsonResult(new ApiJsonResult<object> { Data = data, Success = false, Status = false, Msg = msg });
}
}
}