31 lines
543 B
C#
31 lines
543 B
C#
using BLL.API;
|
|
using Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Http;
|
|
|
|
namespace WebAPI.Controllers
|
|
{
|
|
public class LoginController : ApiController
|
|
{
|
|
|
|
[HttpPost]
|
|
|
|
public Model.ResponeData login([FromBody]UserItem user)
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
return APILoginServices.login(user.Code, user.PassWord );
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
}
|
|
}
|
|
} |