From ee61feb581612d37613e2241ed58b86bc937c01b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 15 Aug 2021 15:44:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96IPBox=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/views/@default/servers/ipbox/index.html | 2 +- web/views/@default/servers/ipbox/index.js | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/web/views/@default/servers/ipbox/index.html b/web/views/@default/servers/ipbox/index.html index 009a27c1..c7358fa3 100644 --- a/web/views/@default/servers/ipbox/index.html +++ b/web/views/@default/servers/ipbox/index.html @@ -27,7 +27,7 @@ {{ipList.name}}     - 添加黑名单 + 加入到黑名单 diff --git a/web/views/@default/servers/ipbox/index.js b/web/views/@default/servers/ipbox/index.js index 1ed34fb9..df1603b4 100644 --- a/web/views/@default/servers/ipbox/index.js +++ b/web/views/@default/servers/ipbox/index.js @@ -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 + }) + }) } }) \ No newline at end of file