Skip to content

Commit be8fe7c

Browse files
committed
1、开发访客记录删除功能;
1 parent 42dd081 commit be8fe7c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/components/index.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<el-table-column prop="time" label="访问时间"></el-table-column>
99
<el-table-column fixed="right" label="操作" width="130">
1010
<template slot-scope="scope">
11-
<el-button type="text" size="small">删除</el-button>
11+
<el-button type="text" size="small" @click="Delete(scope.row._id)">删除</el-button>
1212
</template>
1313
</el-table-column>
1414
</el-table>
@@ -34,7 +34,21 @@ export default {
3434
That.blogVisitList = data;
3535
}
3636
});
37-
}
37+
},
38+
Delete:function (Id) {
39+
var That = this;
40+
41+
That.SQAjax({
42+
Url:'/api/visitDelete/backend',
43+
RequestData:{
44+
_id:Id
45+
},
46+
Success:function (data) {
47+
That.$message('删除成功');
48+
That.getBlogVisitList();
49+
}
50+
});
51+
},
3852
},
3953
mounted:function () {
4054
this.getBlogVisitList();

0 commit comments

Comments
 (0)