支持k8s登录&优化任务列表页操作

This commit is contained in:
georgehao
2020-04-14 04:57:56 +08:00
parent 6afe97330d
commit 78efeef490
3 changed files with 5 additions and 4 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -22,7 +22,7 @@
{{end}}
</select>
</div>
<button class="layui-btn" data-type="reload" id="reload"><i class="fa fa-search"></i>查询</button>
<button class="layui-btn" data-type="reload" id="search"><i class="fa fa-search"></i>查询</button>
</div>
</form>
</div>
@@ -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)