删除公告,消息撤回优化

This commit is contained in:
2022-02-24 10:56:16 +08:00
parent 8b7a259c00
commit e72d6b3a91
8 changed files with 87 additions and 80 deletions

View File

@@ -1,23 +1,14 @@
<template>
<view class="create">
<view class="create-title">公告内容</view>
<<<<<<< HEAD
<block v-if="type !== 'cheack'">
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
</block>
<block v-if="type === 'cheack'">
<view class="content-a"> {{content}} </view>
=======
<block v-if="type === 'check'">
<view class="content"> {{content}} </view>
</block>
<block v-else>
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
>>>>>>> 32e3e0ef3040a5320c18aa4803fc5bf1476deb06
</block>
<block v-else>
<u--textarea v-model="content" count height="240" maxlength="240" placeholder="请输入公告内容" />
<u-button type="primary" text="发布" :disabled="disabled" @click="onCreate" color="#34CE98" />
</block>
</view>
</template>
@@ -41,17 +32,12 @@
type: '' // cheack ' 查看详情'
}
},
onLoad(e) {
<<<<<<< HEAD
console.log(e,'e,,,,,')
=======
console.log('E', e);
>>>>>>> 32e3e0ef3040a5320c18aa4803fc5bf1476deb06
onLoad(e) {
this.targetId = e.targetId
if (e.type) {
this.type = e.type
uni.setNavigationBarTitle({
title:' 公告内容'
this.type = e.type
uni.setNavigationBarTitle({
title: ' 公告内容'
})
}
if (e.aId) {
@@ -62,11 +48,17 @@
getGroupAnnouncement(this.targetId, this.aId).then(res => {
this.content = res.content
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
mask: true
})
if (err.status_code == 404) {
this.$nextTick(() => {
uni.navigateBack()
})
} else {
uni.showToast({
title: err.message,
icon: 'none',
mask: true
})
}
})
}
},