IPBox增加地域、ISP、添加到黑名单等功能

This commit is contained in:
GoEdgeLab
2021-08-15 15:42:05 +08:00
parent 806a6bf8a7
commit 537c3da8c3
11 changed files with 192 additions and 11 deletions

View File

@@ -0,0 +1,30 @@
Tea.context(function () {
this.blackListsVisible = false
this.allPublicBlackIPLists = this.publicBlackIPLists.$copy()
this.showBlackLists = function () {
let that = this
this.publicBlackIPLists = this.allPublicBlackIPLists.filter(function (allList) {
let found = true
that.ipLists.forEach(function (list) {
if (allList.id == list.id) {
found = false
}
})
return found
})
this.blackListsVisible = !this.blackListsVisible
}
this.addBlackIP = function (list) {
this.$post(".addIP")
.params({
listId: list.id,
ip: this.ip
})
.success(function () {
this.ipLists.push(list)
this.blackListsVisible = false
})
}
})