mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-15 21:20:25 +08:00
31 lines
681 B
JavaScript
31 lines
681 B
JavaScript
Tea.context(function () {
|
|
this.createKey = function () {
|
|
teaweb.popup(Tea.url(".createPopup?domainId=" + this.domain.id), {
|
|
height: "24em",
|
|
callback: function () {
|
|
teaweb.successRefresh("保存成功")
|
|
}
|
|
})
|
|
}
|
|
|
|
this.updateKey = function (keyId) {
|
|
teaweb.popup(Tea.url(".updatePopup?keyId=" + keyId), {
|
|
height: "27em",
|
|
callback: function () {
|
|
teaweb.successRefresh("保存成功")
|
|
}
|
|
})
|
|
}
|
|
|
|
this.deleteKey = function (keyId) {
|
|
teaweb.confirm("确定要删除这个密钥吗?", function () {
|
|
this.$post(".delete")
|
|
.params({
|
|
keyId: keyId
|
|
})
|
|
.success(function () {
|
|
teaweb.successRefresh("删除成功")
|
|
})
|
|
})
|
|
}
|
|
}) |