public ActionResult Reset(string account, string password) { var result = new ResultInfoModel { IsSuccess = false }; try { var accontInfo = HomeBusiness.RestAccount(account, password, this.LoginUser); var login = HomeBusiness.Login(account, password); //写入cookie string key = CommonHelper.Md5(CookieKey.COOKIE_KEY_USERINFO); string data = JsonHelper.Serializer <UserLoginInfo>(login); CookieHelper.SetCookie( key, CommonHelper.DesEncrypt(data, CookieKey.COOKIE_KEY_ENCRYPT), DateTime.Now.AddDays(1).Date, ServerInfo.GetTopDomain); result.IsSuccess = accontInfo.IsSuccess; result.Message = accontInfo.Message; } catch (Exception ex) { result.Message = ex.Message; } return(Json(result)); }