mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-12-21 19:09:47 +08:00
change easyui to bootstrap
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.App.DTO;
|
||||
using OpenAuth.Infrastructure.Repository;
|
||||
|
||||
namespace OpenAuth.Web.Controllers
|
||||
{
|
||||
@@ -16,5 +20,21 @@ namespace OpenAuth.Web.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Login()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ContentResult Login(string username, string password)
|
||||
{
|
||||
var request = new LoginRequest {UserName = username, Password = password};
|
||||
var loginApp = new LoginApp(new UserRepository());
|
||||
var response = loginApp.Login(request);
|
||||
if(response.Success)
|
||||
Response.Redirect("Home/Index");
|
||||
return Content(response.Message);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user