Files
dvcp_v2_wxcp_app/src/apps/AppVillagersCircle/commentDetail.vue

281 lines
6.8 KiB
Vue
Raw Normal View History

2022-02-15 15:55:09 +08:00
<template>
2022-02-18 14:33:36 +08:00
<div class="commentDetail">
2022-02-15 16:49:49 +08:00
<div class="avatar-info">
<div class="avatar-img">
2022-02-22 19:00:01 +08:00
<img :src="data.villagerCircleInfo.avatarUrl" alt="" v-if="data.villagerCircleInfo && data.villagerCircleInfo.avatarUrl" >
<img src="./img/tx@2x.png" alt="" v-else>
2022-02-15 16:49:49 +08:00
</div>
<div class="avatar-title">
2022-02-18 17:05:32 +08:00
<div class="name" v-if="data.villagerCircleInfo && data.villagerCircleInfo.createUserName">
{{ data.villagerCircleInfo.createUserName }}
2022-02-17 19:45:25 +08:00
</div>
2022-02-15 16:49:49 +08:00
<div class="time">
2022-02-18 17:05:32 +08:00
<span v-if="data.villagerCircleInfo && data.villagerCircleInfo.topic">{{ $dict.getLabel('villagerCircleTopic',data.villagerCircleInfo.topic) }}</span>
2022-02-22 17:48:29 +08:00
<span>|</span>
2022-02-18 17:05:32 +08:00
<span v-if="data.villagerCircleInfo && data.villagerCircleInfo.createTime">{{ data.villagerCircleInfo.createTime }}</span>
2022-02-15 16:49:49 +08:00
</div>
</div>
2022-02-15 16:23:27 +08:00
</div>
2022-02-18 17:05:32 +08:00
<div class="textarea" v-if="data.villagerCircleInfo && data.villagerCircleInfo.content">{{ data.villagerCircleInfo.content }}</div>
<div style="background: #FFFFFF; padding:0 30px; box-sizing: border-box;padding-bottom: 20px;" v-if="data.villagerCircleInfo && data.villagerCircleInfo.pictures">
<img :src="item.url" alt="" v-for="(item, i) in data.villagerCircleInfo.pictures" :key="i" @click="previewImage(data.villagerCircleInfo.pictures, item.url)" class="upLoadPic" />
2022-02-15 18:42:21 +08:00
</div>
2022-02-18 17:05:32 +08:00
<div class="address" v-if="data.villagerCircleInfo && data.villagerCircleInfo.gpsDesc">
2022-02-15 18:56:00 +08:00
<span class="addr-bg">
2022-02-15 18:42:21 +08:00
<img src="./img/address.png" alt="">
2022-02-18 17:05:32 +08:00
<span v-if="data.villagerCircleInfo && data.villagerCircleInfo.gpsDesc">{{ data.villagerCircleInfo.gpsDesc }}</span>
2022-02-15 18:56:00 +08:00
</span>
2022-02-15 18:42:21 +08:00
</div>
2022-02-18 17:05:32 +08:00
<div class="comment" v-if="data.content">
2022-02-15 18:42:21 +08:00
<div class="comment-list">
<div class="title">评论:</div>
<div class="item">
2022-02-18 17:05:32 +08:00
<span class="avatar">{{ data.replyUserName }}</span><span>:</span><span>{{ data.content }}</span>
2022-02-15 18:42:21 +08:00
</div>
</div>
</div>
2022-02-18 17:05:32 +08:00
<!-- 通过 -->
<div class="readOnly" v-if="data.status ==1 ">
<div class="item">
<div>审核结果</div>
<div>通过</div>
</div>
<div class="item">
<div>审核人</div>
<div>{{ data.auditUserName }}</div>
</div>
<div class="item last">
<div>审核时间</div>
<div>{{ data.auditTime }}</div>
</div>
</div>
<!-- 不通过 -->
<div class="readOnly" v-if="data.status ==2">
2022-02-15 18:42:21 +08:00
<div class="item">
<div>审核结果</div>
<div>不通过</div>
</div>
<div class="item nopass">
<div>不通过理由</div>
2022-02-17 21:10:48 +08:00
<div class="textarea">{{ data.auditOpinion }}</div>
2022-02-15 18:42:21 +08:00
</div>
<div class="item">
<div>审核人</div>
2022-02-17 21:10:48 +08:00
<div>{{ data.auditUserName }}</div>
2022-02-15 18:42:21 +08:00
</div>
<div class="item last">
<div>审核时间</div>
2022-02-17 21:10:48 +08:00
<div>{{ data.auditTime }}</div>
2022-02-15 18:42:21 +08:00
</div>
</div>
<div style="height: 56px;"></div>
2022-02-18 10:43:46 +08:00
<div class="btn" v-if="data.status == 0">
2022-02-15 18:42:21 +08:00
<div class="reject" @click="toReject">驳回发布</div>
<div class="agree" @click="agree">同意发布</div>
</div>
2022-02-15 15:55:09 +08:00
</div>
</template>
<script>
export default {
2022-02-18 14:33:36 +08:00
name: 'commentDetail',
2022-02-15 16:23:27 +08:00
data() {
return {
2022-02-15 18:42:21 +08:00
files: [],
2022-02-17 19:45:25 +08:00
status: 0,
id: '',
data: {},
2022-02-18 17:05:32 +08:00
flag: 1
2022-02-15 16:23:27 +08:00
}
},
2022-02-17 19:45:25 +08:00
onLoad(o) {
this.$dict.load('villagerCircleTopic').then(()=>{
this.id = o.id
this.getDetail()
})
},
2022-02-15 18:42:21 +08:00
methods: {
2022-02-17 19:45:25 +08:00
previewImage(images, img) {
uni.previewImage({
urls: images.map(v => v.url),
current: img
})
},
getDetail() {
2022-02-18 17:05:32 +08:00
this.$http.post(`/app/appvillagercirclecomment/queryDetailById?id=${this.id}`).then(res => {
if(res?.data){
2022-02-17 19:45:25 +08:00
this.data = res.data
2022-02-18 17:05:32 +08:00
this.$forceUpdate()
2022-02-17 19:45:25 +08:00
}
})
},
2022-02-15 18:42:21 +08:00
toReject() {
2022-02-18 17:05:32 +08:00
uni.navigateTo({url: `./Reject?id=${this.data.id}&pass=0&flag=1`})
2022-02-15 18:42:21 +08:00
},
2022-02-18 10:43:46 +08:00
agree() {
2022-02-18 17:05:32 +08:00
this.$http.post('/app/appvillagercirclecomment/examine',null, {
2022-02-18 10:43:46 +08:00
params: {
id: this.id,
pass: 1,
}
}).then(() => {
2022-02-22 16:09:31 +08:00
// this.$u.toast('发布成功')
2022-02-18 10:43:46 +08:00
uni.$emit('update')
setTimeout(()=>{
uni.navigateBack()
2022-02-18 17:05:32 +08:00
},600)
2022-02-18 10:43:46 +08:00
})
}
2022-02-15 18:42:21 +08:00
},
onShow() {
2022-02-18 14:33:36 +08:00
document.title = "评论审核"
2022-02-15 18:42:21 +08:00
},
2022-02-15 15:55:09 +08:00
}
</script>
2022-02-15 16:23:27 +08:00
<style lang="scss" scoped>
2022-02-18 14:33:36 +08:00
.commentDetail {
2022-02-15 16:49:49 +08:00
.avatar-info {
display: flex;
2022-02-15 18:42:21 +08:00
padding: 0 32px;
box-sizing: border-box;
background: #FFFFFF;
2022-02-15 16:49:49 +08:00
.avatar-img {
margin-right: 20px;
img {
2022-02-15 18:42:21 +08:00
margin-top: 30px;
2022-02-15 16:49:49 +08:00
width: 88px;
height: 88px;
border-radius: 50%;
}
}
.avatar-title {
2022-02-15 18:42:21 +08:00
padding: 30px 32px;
box-sizing: border-box;
2022-02-15 16:49:49 +08:00
.name {
font-size: 32px;
color: #333333;
font-weight: 600;
margin-bottom: 12px;
}
.time {
font-size: 26px;
color: #999999;
2022-02-22 17:48:29 +08:00
span {
padding: 0 6px;
}
2022-02-15 16:49:49 +08:00
}
}
}
.textarea {
2022-02-15 18:42:21 +08:00
padding: 0 32px;
box-sizing: border-box;
font-size: 32px;
background: #FFFFFF;
2022-02-17 19:45:25 +08:00
padding-bottom: 40px;
2022-02-18 17:29:02 +08:00
color: #333333;
2022-02-15 18:42:21 +08:00
}
.address {
background: #FFFFFF;
padding: 20px 32px;
box-sizing: border-box;
.addr-bg {
2022-02-15 18:56:00 +08:00
display: inline-block;
2022-02-15 18:42:21 +08:00
border-radius: 28px;
padding: 6px 20px;
background: #EFF1F3;
2022-02-15 18:56:00 +08:00
2022-02-15 18:42:21 +08:00
img {
2022-02-15 18:56:00 +08:00
padding-top: 5px;
2022-02-15 18:42:21 +08:00
width: 32px;
height: 32px;
}
2022-02-15 18:56:00 +08:00
span {
vertical-align: top;
}
2022-02-15 18:42:21 +08:00
}
}
.comment {
padding: 0 32px 30px 32px;
box-sizing: border-box;
background: #FFFFFF;
.comment-list {
padding: 20px 30px;
background: #F7F8F9;
border-radius: 16px;
.title {
color: #333333;
font-weight: 600;
}
.item {
font-size: 28px;
2022-02-18 17:29:02 +08:00
padding: 10px 0;
2022-02-15 18:42:21 +08:00
.avatar {
color: #576a91;
}
}
}
2022-02-15 16:49:49 +08:00
}
2022-02-15 18:42:21 +08:00
.readOnly {
font-size: 32px;
.item {
display: flex;
justify-content: space-between;
background: #FFFFFF;
border-bottom: 1px solid #D8DDE6;
padding: 30px 30px;
box-sizing: border-box;
2022-02-15 16:49:49 +08:00
2022-02-15 18:42:21 +08:00
.textarea {
width: 100%;
padding: 30px 0 0 0 ;
2022-02-18 17:29:02 +08:00
color: #333333;
2022-02-17 19:45:25 +08:00
margin-bottom: 20px;
2022-02-15 18:42:21 +08:00
}
}
.nopass {
flex-direction: column;
border-bottom: 1px solid #D8DDE6;
}
.last {
border-bottom: none;
}
}
2022-02-17 19:45:25 +08:00
.upLoadPic {
2022-02-22 17:28:23 +08:00
width: 204px;
height:204px;
2022-02-17 19:45:25 +08:00
margin-right: 8px;
}
.upLoadPic:nth-child(3n) {
margin-right: 0;
}
2022-02-15 18:42:21 +08:00
.btn {
display: flex;
position: fixed;
bottom: 0;
width: 100%;
height: 112px;
line-height: 112px;
.reject {
width: 50%;
color: #FF4466;
background: #FFFFFF;
text-align: center;
}
.agree {
width: 50%;
color: #FFFFFF;
background: #3975C6;
text-align: center;
}
}
2022-02-15 16:23:27 +08:00
}
2022-02-15 15:55:09 +08:00
</style>