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

@@ -38,7 +38,9 @@
</div>
<u-icon name="thumb-up" :label="op.suport" :color="op.isSuport ? 'red' : '#ccc'" @click="like(op.id)" />
</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>
<AiEmpty v-if="!data.messages.length"></AiEmpty>
@@ -79,6 +81,13 @@
</div>
</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>
</template>
@@ -99,6 +108,9 @@ export default {
flag: false,
pageShow: false,
isAnnouncer: false,
deleShow: false,
modalShow: false,
deleId: '',
}
},
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() {
if (this.flag) return
@@ -210,7 +236,7 @@ export default {
.then((res) => {
if (res?.code == 0) {
this.$u.toast('留言成功')
this.flag = true
this.flag = false
this.content = ''
this.showBottomInput = false
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 {
// .u-drawer-content {
// .u-drawer__scroll-view {