合并冲突

pull/30/head
taoshihan1991 4 years ago
commit cf48486b02

@ -40,6 +40,9 @@ func DelIpblack(c *gin.Context) {
} }
func GetIpblacks(c *gin.Context) { func GetIpblacks(c *gin.Context) {
page,_:=strconv.Atoi(c.Query("page")) page,_:=strconv.Atoi(c.Query("page"))
if page==0{
page=1
}
count:=models.CountIps(nil,nil) count:=models.CountIps(nil,nil)
list:=models.FindIps(nil,nil,uint(page),config.VisitorPageSize) list:=models.FindIps(nil,nil,uint(page),config.VisitorPageSize)
c.JSON(200, gin.H{ c.JSON(200, gin.H{

@ -70,6 +70,7 @@
roleDialog:false, roleDialog:false,
noticeList:[], noticeList:[],
welcomeDialog:false, welcomeDialog:false,
ipblackList:[],
welcomeForm: { welcomeForm: {
content: "", content: "",
}, },
@ -194,6 +195,11 @@
_this.noticeList=result; _this.noticeList=result;
}); });
} }
if(ACTION=="setting_ipblack"){
this.sendAjax("/ipblacks_all","get",{},function(result){
_this.ipblackList=result.list;
});
}
}, },
sendAjax(url,method,params,callback){ sendAjax(url,method,params,callback){
let _this=this; let _this=this;

@ -0,0 +1,35 @@
{{template "header" }}
<div id="app" style="width:100%">
<template>
<el-container v-loading.fullscreen.lock="fullscreenLoading">
{{template "setting_left" .}}
<el-main class="mainMain">
<el-table
:data="ipblackList"
border
style="width: 100%">
<el-table-column
prop="ip"
label="黑IP">
</el-table-column>
<el-table-column
prop="create_at"
label="添加时间">
</el-table-column>
<el-table-column
prop="id"
label="操作">
<template slot-scope="scope">
<el-button @click="" type="danger" size="small" plain>删除</el-button>
</template>
</el-table-column>
</el-table>
</el-main>
</el-container>
</template>
</div>
</body>
{{template "setting_bottom" .}}
Loading…
Cancel
Save