优化IPBox交互

This commit is contained in:
GoEdgeLab
2021-08-15 15:44:24 +08:00
parent 537c3da8c3
commit 3072107bca
2 changed files with 13 additions and 10 deletions

View File

@@ -27,7 +27,7 @@
{{ipList.name}}
</div>
&nbsp; &nbsp;
<a href="" @click.prevent="showBlackLists"><i class="icon angle" :class="{up: blackListsVisible, down: !blackListsVisible}"></i>加黑名单</a>
<a href="" @click.prevent="showBlackLists"><i class="icon angle" :class="{up: blackListsVisible, down: !blackListsVisible}"></i>入到黑名单</a>
</td>
</tr>
<tr v-if="publicBlackIPLists.length > 0 && blackListsVisible">

View File

@@ -17,14 +17,17 @@ Tea.context(function () {
}
this.addBlackIP = function (list) {
this.$post(".addIP")
.params({
listId: list.id,
ip: this.ip
})
.success(function () {
this.ipLists.push(list)
this.blackListsVisible = false
})
let that = this
teaweb.confirm("确定要将此IP添加到此黑名单吗", function () {
that.$post(".addIP")
.params({
listId: list.id,
ip: that.ip
})
.success(function () {
that.ipLists.push(list)
that.blackListsVisible = false
})
})
}
})