村民圈

This commit is contained in:
花有清香月有阴
2022-02-17 18:17:40 +08:00
parent 7f8c3ff490
commit c7aadf184c
4 changed files with 203 additions and 76 deletions

View File

@@ -16,6 +16,7 @@
</div>
<!-- :style="{ class: item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2' }" -->
<div class="status status0">审核中</div>
</div>
</div>
@@ -74,6 +75,15 @@
</div>
</div>
</u-popup>
<u-popup v-model="deleShow" mode="bottom" class="popupdele">
<div class="hint">删除评论</div>
<div class="dele" @click="modalShow = true">删除</div>
<div class="liness"></div>
<div class="cancel" @click="deleShow = false">取消</div>
</u-popup>
<u-modal v-model="modalShow" content="确定删除该留言" :mask-close-able="true" @confirm="confirmDelete"></u-modal>
</div>
</template>
@@ -84,23 +94,35 @@ export default {
props: {},
data() {
return {
id: '',
id: '888',
data: {},
poupShow: false,
content: '',
flag: false,
pageShow: false,
deleShow: false,
modalShow: false,
deleId: '',
}
},
computed: {},
watch: {},
onLoad(o) {
this.$dict.load('atWillReportType').then(() => {
this.id = o.id
// this.id = o.id
this.getDetail()
})
},
onShow() {},
methods: {
getDetail() {
this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.detail = res.data
}
})
},
send() {
if (this.flag) return
if (!this.content) {
@@ -108,25 +130,25 @@ export default {
}
this.$instance
.post(`/app/appvillagediscussmessage/addOrUpdate`, {
.post(`/app/appvillagercirclecomment/addOrUpdate`, {
content: this.content,
avatar: this.user.avatar,
createUserId: this.user.id,
createUserName: this.user.name,
discussId: this.id,
replyUserResidentId: this.user.id,
replyUserName: this.user.name,
id: this.id,
})
.then((res) => {
if (res?.code == 0) {
this.$u.toast('留言成功')
this.flag = false
this.content = ''
this.showBottomInput = false
this.getDetail()
this.poupShow = false
// this.getDetail()
}
})
},
like(id) {
like() {
var id = '88'
this.$instance
.post(`/app/appvillagediscussmessage/suport?id=${id}&userId=${this.user.id}`)
.then((res) => {
@@ -140,6 +162,23 @@ export default {
this.$u.toast(err)
})
},
confirmDelete() {
this.$instance
.post(`/app/appvillagercirclecomment/delete?ids=${this.deleId}`)
.then((res) => {
if (res?.data) {
this.deleShow = false
this.modalShow = false
this.deleId = ''
this.getDetail()
}
})
.catch((e) => {
this.$hideLoading()
this.$u.toast(e)
})
},
},
}
</script>
@@ -188,8 +227,10 @@ export default {
margin-top: 6px;
}
}
.status {
font-size: 28px;
margin-right: 10px;
}
.status0 {
color: #42d784;