update :translate base cotroller

This commit is contained in:
Mohammad Foroughi
2022-10-31 13:29:07 +03:30
parent 2b5fd5cab8
commit d6f8c9d95a
3 changed files with 3 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ type BaseController struct {
func (a *BaseController) checkLogin(c *gin.Context) {
if !session.IsLogin(c) {
if isAjax(c) {
pureJsonMsg(c, false, "登录时效已过,请重新登录")
pureJsonMsg(c, false, I18n(c , "pages.login.loginAgain"))
} else {
c.Redirect(http.StatusTemporaryRedirect, c.GetString("base_path"))
}