Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
hanx committed Mar 20, 2018
1 parent 5dc374a commit e50a0e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/nlpcn/jcoder/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public int getType() {
}

public void setType(int type) {
if (this.id == -1 && type != 1) { //cluster user不让改类型
if (this.id != null && this.id == -1 && type != 1) { //cluster user不让改类型
throw new RuntimeException("cluster user must not modify");
}
this.type = type;
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/modules/user/userManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ var userManager = new Vue({
if(userAddOrEdit.item.type == $(this).attr('value'))$(this).attr("selected", "selected");
});
},
confirm: function () {
userAddOrEdit.item.type = $("#userType").val();
confirm: function () {
userAddOrEdit.item.type = parseInt($("#userType").val());
var param = userAddOrEdit.item;
Jcoder.ajax(vUrl, 'post',param,null).then(function (data) {
JqdeBox.unloading();
Expand Down

0 comments on commit e50a0e7

Please sign in to comment.