public JsonResult SignInAjax(SignInDto model) { if (ModelState.IsValid) { //获取服务实例 IUserService service = ServiceLocator.Instance.GetService<IUserService>(); service.AuthVerify(model.Account, model.Password); //ToDo get user info create user data for cookie ... string userData = JsonConvert.SerializeObject(new { Account = model.Account, Password = model.Password }); User.SignIn(model.Account, model.Remember, userData); } else { throw new Exception("验证登录数据失败!"); } return Json(new { status = true, urlReferrer = "/manage" }, "json", Encoding.UTF8, JsonRequestBehavior.DenyGet); }
public JsonResult SignInAjax(SignInDto model) { return Json("Index"); }