diff --git a/controllers/common.go b/controllers/common.go index b068646..18c3160 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -67,7 +67,8 @@ func (self *BaseController) Auth() { if userId > 0 { user, err := models.AdminGetById(userId) - if err == nil && password == libs.Md5([]byte(self.getClientIp()+"|"+user.Password+user.Salt)) { + //if err == nil && password == libs.Md5([]byte(self.getClientIp()+"|"+user.Password+user.Salt)) { + if err == nil && password == libs.Md5([]byte(user.Password+user.Salt)){ self.userId = user.Id self.loginName = user.LoginName self.userName = user.RealName diff --git a/controllers/login.go b/controllers/login.go index c438b42..7ca3ef4 100644 --- a/controllers/login.go +++ b/controllers/login.go @@ -50,7 +50,7 @@ func (self *LoginController) LoginIn() { user.LastIp = self.getClientIp() user.LastLogin = time.Now().Unix() user.Update() - authkey := libs.Md5([]byte(self.getClientIp() + "|" + user.Password + user.Salt)) + authkey := libs.Md5([]byte(user.Password + user.Salt)) self.Ctx.SetCookie("auth", strconv.Itoa(user.Id)+"|"+authkey, 7*86400) self.ajaxMsg("登录成功", MSG_OK) diff --git a/views/task/list.html b/views/task/list.html index 07308c8..b04b105 100644 --- a/views/task/list.html +++ b/views/task/list.html @@ -22,7 +22,7 @@ {{end}} - + @@ -155,7 +155,7 @@ $.post('/task/ajax'+action, {"ids":ids}, function (out) { if (out.status == 0) { layer.msg("操作成功",{icon: 1,shade:0.3,time:1000},function () { - $('#reload').click(); + $('#search').click(); }) } else { layer.msg(out.message)