mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	优化IPBox交互
This commit is contained in:
		@@ -27,7 +27,7 @@
 | 
			
		||||
                {{ipList.name}}
 | 
			
		||||
            </div>
 | 
			
		||||
               
 | 
			
		||||
            <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">
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
				})
 | 
			
		||||
		})
 | 
			
		||||
	}
 | 
			
		||||
})
 | 
			
		||||
		Reference in New Issue
	
	Block a user