mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-18 14:50:26 +08:00
实现公用的IP名单
This commit is contained in:
26
web/views/@default/servers/iplists/index.js
Normal file
26
web/views/@default/servers/iplists/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
Tea.context(function () {
|
||||
this.createList = function () {
|
||||
teaweb.popup(Tea.url(".createPopup", {type: this.type}), {
|
||||
callback: function (resp) {
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location = "/servers/iplists?type=" + resp.data.list.type
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteList = function (listId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此IP名单吗?", function () {
|
||||
that.$post(".delete")
|
||||
.params({
|
||||
listId: listId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.success("删除成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user