Skip to content

Commit

Permalink
[U] 登录禁用逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
zxysilent committed Apr 21, 2021
1 parent 1849849 commit cab91d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions control/sysctl/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ func AuthLogin(ctx echo.Context) error {
//model.UserEditLogin(mod, "Ltime", "Ecount")
return ctx.JSON(utils.Fail(`密码错误,剩于登录次数:` + strconv.Itoa(int(3-mod.Ecount))))
}
// if !mod.Role1.IsAtv() {
// return ctx.JSON(utils.Fail(`当前账号已被禁用`))
// }
if mod.Lock {
return ctx.JSON(utils.Fail(`当前账号已被禁用`))
}
auth := hwt.Auth{
Id: mod.Id,
RoleId: mod.RoleId,
Expand Down
2 changes: 1 addition & 1 deletion vue/src/views/user/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {
return h(
"i-switch",
{
props: { value: data.row.lock, size: "large" },
props: { value: !data.row.lock, size: "large" },
on: {
"on-change": function (val) {
admUserEditLock({ id: data.row.id, lock: val }).then((resp) => {
Expand Down

0 comments on commit cab91d5

Please sign in to comment.