This commit is contained in:
yanran200730
2022-01-07 15:48:15 +08:00
parent 59d85181d3
commit 0348feab8a

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="Detail"> <div class="Detail" v-if="pageShow">
<div class="detail-top"> <div class="detail-top">
<div flex class="w-100"> <div flex class="w-100">
<div class="avatar" v-text="data.avatar" /> <div class="avatar" v-text="data.avatar" />
@@ -96,6 +96,7 @@ export default {
showBottomInput: false, showBottomInput: false,
content: '', content: '',
flag: false, flag: false,
pageShow: false,
isAnnouncer: false isAnnouncer: false
} }
}, },
@@ -106,9 +107,8 @@ export default {
return this.data.messages?.length || 0 return this.data.messages?.length || 0
}, },
}, },
watch: {},
onLoad(o) { onLoad(o) {
console.log(this.user)
this.id = o.id this.id = o.id
this.getDetail() this.getDetail()
this.$dict.load('discussStatus') this.$dict.load('discussStatus')
@@ -118,6 +118,7 @@ export default {
}, },
methods: { methods: {
getDetail() { getDetail() {
this.$loading()
this.$http.post(`/app/appvillagediscuss/queryDetailById?id=${this.id}`).then((res) => { this.$http.post(`/app/appvillagediscuss/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) { if (res?.data) {
this.data = { this.data = {
@@ -151,7 +152,14 @@ export default {
} }
}) })
} }
this.$hideLoading()
this.pageShow = true
} else {
this.$hideLoading()
} }
}).catch(() => {
this.$hideLoading()
}) })
}, },
@@ -193,6 +201,7 @@ export default {
if (res?.code == 0) { if (res?.code == 0) {
this.$u.toast('留言成功') this.$u.toast('留言成功')
this.flag = true this.flag = true
this.content = ''
this.showBottomInput = false this.showBottomInput = false
this.getDetail() this.getDetail()
} }