Try to refine the panic things.

This commit is contained in:
zicla
2018-11-30 17:37:52 +08:00
parent 6485e3b48e
commit b55a993b35
10 changed files with 84 additions and 90 deletions

View File

@ -62,9 +62,9 @@ func (this *UserController) Login(writer http.ResponseWriter, request *http.Requ
}
}
//登录成功设置Cookie。有效期7天。
//登录成功设置Cookie。有效期30天。
expiration := time.Now()
expiration = expiration.AddDate(0, 0, 7)
expiration = expiration.AddDate(0, 0, 30)
//持久化用户的session.
session := &Session{