This commit is contained in:
花有清香月有阴
2022-01-07 17:27:06 +08:00
parent defba2d739
commit 01b27fbe9b
2 changed files with 40 additions and 4 deletions

View File

@@ -185,7 +185,7 @@ export default {
if (res.code == 0) { if (res.code == 0) {
uni.$emit('update') uni.$emit('update')
this.$u.toast('发布成功') this.$u.toast('发布成功')
this.flag = true this.flag = publish
setTimeout(() => { setTimeout(() => {
uni.navigateBack({}) uni.navigateBack({})
}, 600) }, 600)

View File

@@ -38,7 +38,9 @@
</div> </div>
<u-icon name="thumb-up" :label="op.suport" :color="op.isSuport ? 'red' : '#ccc'" @click="like(op.id)" /> <u-icon name="thumb-up" :label="op.suport" :color="op.isSuport ? 'red' : '#ccc'" @click="like(op.id)" />
</div> </div>
<div class="content" v-text="op.content" @click="dele" />
<div class="content" v-text="op.content" @click="adddeleShow(op.id)" />
<div class="content color-999" v-text="op.createTime" /> <div class="content color-999" v-text="op.createTime" />
</div> </div>
<AiEmpty v-if="!data.messages.length"></AiEmpty> <AiEmpty v-if="!data.messages.length"></AiEmpty>
@@ -79,6 +81,13 @@
</div> </div>
</u-popup> </u-popup>
<u-popup v-model="deleShow" mode="bottom" class="popupdele">
<div class="dele" @click="modalShow = true">删除</div>
<div @click="deleShow = false">取消</div>
</u-popup>
<u-modal v-model="modalShow" content="确定删除该留言" @confirm="confirmDelete"></u-modal>
<div class="end-btn" hover-class="text-hover" v-if="data.status === '1'" @click="handleComplete">结束公示</div> <div class="end-btn" hover-class="text-hover" v-if="data.status === '1'" @click="handleComplete">结束公示</div>
</div> </div>
</template> </template>
@@ -99,6 +108,9 @@ export default {
flag: false, flag: false,
pageShow: false, pageShow: false,
isAnnouncer: false, isAnnouncer: false,
deleShow: false,
modalShow: false,
deleId: '',
} }
}, },
computed: { computed: {
@@ -191,7 +203,21 @@ export default {
}) })
}, },
dele() {}, adddeleShow(id) {
this.deleId = id
this.deleShow = true
},
confirmDelete() {
this.$http.post(`/app/appvillagediscussmessage/delete?ids=${this.deleId}`).then((res) => {
if (res?.data) {
this.deleShow = false
this.modalShow = false
this.deleId = ''
this.getDetail()
}
})
},
publish() { publish() {
if (this.flag) return if (this.flag) return
@@ -210,7 +236,7 @@ export default {
.then((res) => { .then((res) => {
if (res?.code == 0) { if (res?.code == 0) {
this.$u.toast('留言成功') this.$u.toast('留言成功')
this.flag = true this.flag = false
this.content = '' this.content = ''
this.showBottomInput = false this.showBottomInput = false
this.getDetail() this.getDetail()
@@ -545,6 +571,16 @@ export default {
} }
} }
.popupdele {
::v-deep .u-drawer-content {
text-align: center;
div {
padding: 5px 0;
color: #666;
}
}
}
// ::v-deep .u-drawer { // ::v-deep .u-drawer {
// .u-drawer-content { // .u-drawer-content {
// .u-drawer__scroll-view { // .u-drawer__scroll-view {