优化IPBox交互

This commit is contained in:
刘祥超
2021-08-15 15:44:24 +08:00
parent 7f04f1ed62
commit ee61feb581
2 changed files with 13 additions and 10 deletions

View File

@@ -27,7 +27,7 @@
{{ipList.name}} {{ipList.name}}
</div> </div>
&nbsp; &nbsp; &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> </td>
</tr> </tr>
<tr v-if="publicBlackIPLists.length > 0 && blackListsVisible"> <tr v-if="publicBlackIPLists.length > 0 && blackListsVisible">

View File

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