2021-06-23 13:12:33 +08:00
|
|
|
|
Tea.context(function () {
|
|
|
|
|
|
this.createList = function () {
|
|
|
|
|
|
teaweb.popup(Tea.url(".createPopup", {type: this.type}), {
|
2021-11-17 16:14:37 +08:00
|
|
|
|
height: "24em",
|
2021-06-23 13:12:33 +08:00
|
|
|
|
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()
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|