添加:评论审核功能
This commit is contained in:
parent
7c89cdd8e8
commit
079144e21c
|
|
@ -198,6 +198,10 @@ export function seckillLstFilterApi() {
|
|||
export function replyListApi(data) {
|
||||
return request.get(`store/reply/lst`, data)
|
||||
}
|
||||
// 商品评论 -- 审核
|
||||
export function reviewReplyPass(replyId) {
|
||||
return request.get(`store/reply/examine/${replyId}`)
|
||||
}
|
||||
/**
|
||||
* @description 商品评论 -- 添加
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="评价状态:" class="mr10">
|
||||
<el-select v-model="tableFrom.status" clearable placeholder="请选择" class="selWidth" @change="getList(1)">
|
||||
<el-option label="已通过" value="1" />
|
||||
<el-option label="待审核" value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间选择:" class="mr10" style="width: 100%">
|
||||
<el-radio-group
|
||||
v-model="tableFrom.date"
|
||||
|
|
@ -70,8 +76,8 @@
|
|||
<el-button size="small" type="primary" @click="add">添加自评</el-button>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini" @rowclick.stop="closeEdit" :row-class-name="tableRowClassName">
|
||||
<el-table-column prop="reply_id" label="ID" min-width="50" />
|
||||
<el-table-column label="商品图" min-width="80">
|
||||
<el-table-column prop="reply_id" label="ID" width="50" align="center" />
|
||||
<el-table-column label="商品图" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
|
|
@ -82,10 +88,10 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="store_name" label="商品名称" min-width="200" />
|
||||
<el-table-column prop="nickname" label="用户名称" min-width="90" />
|
||||
<el-table-column prop="product_score" label="产品评分" sortable min-width="100" />
|
||||
<el-table-column prop="sort" label="排序" min-width="180">
|
||||
<el-table-column prop="store_name" label="商品名称" width="200" align="left"/>
|
||||
<el-table-column prop="nickname" label="用户名称" width="90" align="center"/>
|
||||
<el-table-column prop="product_score" label="产品评分" sortable width="100" align="center"/>
|
||||
<el-table-column prop="sort" label="排序" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.index === tabClickIndex">
|
||||
<el-input v-model.number="scope.row['sort']" type="number" maxlength="300" size="mini" @blur="inputBlur(scope)" autofocus/>
|
||||
|
|
@ -108,14 +114,16 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="merchant_reply_content" label="回复内容" min-width="250" />
|
||||
<el-table-column label="评价时间" min-width="150" prop="create_time" />
|
||||
<el-table-column label="操作" min-width="80" fixed="right">
|
||||
<el-table-column label="评价时间" width="150" prop="create_time" align="left"/>
|
||||
<el-table-column prop="sort" label="状态" min-width="180" align="left">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleDelete(scope.row.reply_id, scope.$index)"
|
||||
>删除</el-button>
|
||||
{{ scope.row.status == 1 ? '已通过' : '待审核' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="160" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row.reply_id, scope.$index)">删除</el-button>
|
||||
<el-button type="text" size="small" @click="toExaminePass(scope.row.reply_id)">审核通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -136,7 +144,7 @@
|
|||
|
||||
<script>
|
||||
|
||||
import { replyListApi, replyCreateApi, replyDeleteApi, productSort } from "@/api/product";
|
||||
import { replyListApi, replyCreateApi, replyDeleteApi, productSort, reviewReplyPass } from "@/api/product";
|
||||
import { fromList } from "@/libs/constants.js";
|
||||
export default {
|
||||
name: "StoreComment",
|
||||
|
|
@ -156,6 +164,7 @@ export default {
|
|||
date: "",
|
||||
nickname: "",
|
||||
keyword: "",
|
||||
status: "",
|
||||
},
|
||||
timeVal: [],
|
||||
props: {},
|
||||
|
|
@ -243,6 +252,31 @@ export default {
|
|||
});
|
||||
});
|
||||
},
|
||||
// 审核通过
|
||||
toExaminePass(id) {
|
||||
this.$confirm('是否确定审核通过?通过后该评论会在客服端显示!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
reviewReplyPass(id)
|
||||
.then((res) => {
|
||||
this.getList(1)
|
||||
this.$message.success(res.message)
|
||||
this.listLoading = false
|
||||
})
|
||||
.catch(res => {
|
||||
this.listLoading = false
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue