修改登录模块~支持多用户登录
This commit is contained in:
30
NX.ERP.WebAPi/Controllers/System/SystemController.cs
Normal file
30
NX.ERP.WebAPi/Controllers/System/SystemController.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using NX.ERP.WebAPi.models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
namespace NX.ERP.WebAPi.Controllers.System
|
||||
{
|
||||
|
||||
public class SystemController:ApiController
|
||||
{
|
||||
[HttpPost]
|
||||
[Route("api/System/Login")]
|
||||
public string Login(LoginEntity loginEntity)
|
||||
{
|
||||
var AccID = ConfigurationManager.AppSettings["AccId"];
|
||||
//NX.ERP.U8.U8LoginContext.Instance.PassWord = System.Configuration.ConfigurationManager.AppSettings["Password"];
|
||||
|
||||
//NX.ERP.U8.U8LoginContext.Instance.UserId = System.Configuration.ConfigurationManager.AppSettings["UserId"];
|
||||
|
||||
var Server =ConfigurationManager.AppSettings["Server"];
|
||||
var _login = new NX.ERP.U8.U8LoginContext(Server, AccID);
|
||||
_login.Login(loginEntity.UserId, loginEntity.Password);
|
||||
return _login.loginId;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user