mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-27 13:40:25 +08:00
36 lines
738 B
JavaScript
36 lines
738 B
JavaScript
Tea.context(function () {
|
|
this.createUser = function () {
|
|
teaweb.popup(Tea.url(".createPopup"), {
|
|
height: "27em",
|
|
width: "44em",
|
|
callback: function () {
|
|
teaweb.success("创建成功", function () {
|
|
teaweb.reload()
|
|
})
|
|
}
|
|
})
|
|
}
|
|
|
|
this.updateUser = function (userId) {
|
|
teaweb.popup("/servers/certs/acme/users/updatePopup?userId=" + userId, {
|
|
height: "27em",
|
|
width: "44em",
|
|
callback: function () {
|
|
teaweb.success("保存成功", function () {
|
|
teaweb.reload()
|
|
})
|
|
}
|
|
})
|
|
}
|
|
|
|
this.deleteUser = function (userId) {
|
|
let that = this
|
|
teaweb.confirm("确定要删除此用户吗?", function () {
|
|
that.$post(".delete")
|
|
.params({
|
|
userId: userId
|
|
})
|
|
.refresh()
|
|
})
|
|
}
|
|
}) |