Skip to content

Commit

Permalink
交互优化
Browse files Browse the repository at this point in the history
管理后台修改信息和密码时,点击按钮之后按钮禁用,后台返回结果之后按钮应该解除禁用。
  • Loading branch information
xuxinkai-cn authored Oct 4, 2020
1 parent fbf25d8 commit 3160323
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/resources/static/admin/dist/js/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ $(function () {
url: "/admin/profile/name",
data: params,
success: function (r) {
$("#updateUserNameButton").attr("disabled",false);
console.log(r);
if (r == 'success') {
alert('修改成功');
Expand All @@ -20,7 +21,10 @@ $(function () {
}
}
});
}else{
$("#updateUserNameButton").attr("disabled",false);
}

});
//修改密码
$('#updatePasswordButton').click(function () {
Expand All @@ -34,6 +38,7 @@ $(function () {
url: "/admin/profile/password",
data: params,
success: function (r) {
$("#updatePasswordButton").attr("disabled",false);
console.log(r);
if (r == 'success') {
alert('修改成功');
Expand All @@ -43,7 +48,10 @@ $(function () {
}
}
});
}else {
$("#updatePasswordButton").attr("disabled",false);
}

});
})

Expand Down

0 comments on commit 3160323

Please sign in to comment.