添加:商户端评论审核功能

This commit is contained in:
wuhui_zzw 2023-11-16 15:34:10 +08:00
parent 6ede4db383
commit 6b9bee8acf
2 changed files with 56 additions and 1 deletions

View File

@ -200,6 +200,10 @@ export function reviewLstApi(data) {
export function reviewReplyApi(id) {
return request.get(`store/reply/form/${id}`)
}
// 商品列表 -- 评价审核通过
export function reviewReplyPass(replyId) {
return request.get(`store/reply/examine/${replyId}`)
}
/**
* @description 商品列表 -- 评价回复
*/

View File

@ -4,6 +4,21 @@
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<span class="seachTiele">状态</span>
<el-select
v-model="tableFrom.status"
placeholder="请选择"
class="filter-item selWidth mr20"
@change="getList(1)"
clearable
>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<span class="seachTiele">时间选择</span>
<el-radio-group
v-model="tableFrom.date"
@ -137,9 +152,15 @@
<span v-else @dblclick.stop="tabClick(scope.row)">{{ scope.row['sort'] }}</span>
</template>
</el-table-column>
<el-table-column prop="sort" label="排序" min-width="100">
<template slot-scope="scope">
{{ scope.row['status'] == 1 ? '通过' : '待审核' }}
</template>
</el-table-column>
<el-table-column label="操作" min-width="80" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleReply(scope.row.reply_id)">回复</el-button>
<el-button v-if="scope.row.status != 1" type="text" size="small" @click="toExaminePass(scope.row.reply_id)">通过</el-button>
</template>
</el-table-column>
</el-table>
@ -161,7 +182,7 @@
<script>
import { reviewLstApi, reviewReplyApi, reviewsSort ,destoryApi} from '@/api/product'
import {reviewLstApi, reviewReplyApi, reviewsSort, destoryApi, reviewReplyPass} from '@/api/product'
export default {
data() {
return {
@ -213,6 +234,11 @@ export default {
{ value: 1, label: '已回复' },
{ value: 0, label: '未回复' }
],
statusList: [
{ value: '', label: '全部' },
{ value: 1, label: '已通过' },
{ value: 0, label: '待审核' }
],
orderDatalist: null
}
},
@ -291,6 +317,31 @@ export default {
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList('')
},
//
toExaminePass(id) {
this.$confirm('是否确定审核通过?通过后该评论会在客服端显示!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
reviewReplyPass(id)
.then((res) => {
this.getList()
this.$message.success(res.message)
this.listLoading = false
})
.catch(res => {
this.listLoading = false
this.$message.error(res.message)
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
}
}
}