|
@@ -41,8 +41,10 @@
|
|
|
<el-table-column prop="content" label="评论内容"/>
|
|
|
<el-table-column prop="stock_name" label="股票名称"/>
|
|
|
<el-table-column prop="ctime" label="评论时间" width="160"/>
|
|
|
- <el-table-column prop="date" label="操作" fixed="right" width="220">
|
|
|
+ <el-table-column prop="date" label="操作" fixed="right" width="240">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button v-if="scope.row.istop==0" @click="top(scope.row)" size="mini" type="primary">置顶</el-button>
|
|
|
+ <el-button v-else @click="top(scope.row)" size="mini" type="primary">取消置顶</el-button>
|
|
|
<el-button @click="edit(scope.row.id)" size="mini" type="warning">编辑</el-button>
|
|
|
<el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
|
|
|
</template>
|
|
@@ -277,6 +279,12 @@ export default {
|
|
|
this.open = true
|
|
|
})
|
|
|
},
|
|
|
+ top(row){
|
|
|
+ this.$api.commentsTop({id:row.id}).then(res=>{
|
|
|
+ row.istop = 1-row.istop
|
|
|
+ this.getData()
|
|
|
+ })
|
|
|
+ },
|
|
|
editComment(id){
|
|
|
this.title = "顽主点评"
|
|
|
this.$api.getRecordInfo({id:id}).then(res=>{
|