This commit is contained in:
changjinpeng
2022-03-07 14:35:53 +08:00
parent 95da904177
commit 0beac6ae5c
2 changed files with 16 additions and 10 deletions

View File

@@ -20,8 +20,7 @@
<div class="line"></div> <div class="line"></div>
<u-form-item label="发布地区" prop="areaId" required :border-bottom="false" right-icon="arrow-right" class="addresss"> <u-form-item label="发布地区" prop="areaId" required :border-bottom="false" right-icon="arrow-right" class="addresss">
<AiAreaPicker v-model="forms.areaId" :areaId="user.areaId" @select="areaSelect" style="color: #333"> <AiAreaPicker v-model="forms.areaId" :areaId="user.areaId" @select="areaSelect" style="color: #333"> </AiAreaPicker>
</AiAreaPicker>
</u-form-item> </u-form-item>
<div class="line"></div> <div class="line"></div>
@@ -94,7 +93,7 @@ export default {
second: false, second: false,
timestamp: true, timestamp: true,
}, },
isShow: false isShow: false,
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
@@ -196,7 +195,11 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.flag = false this.flag = false
this.$u.toast('发布成功') this.$u.toast('发布成功')
if (!this.indexDetail) {
uni.$emit('updateList') uni.$emit('updateList')
} else {
uni.$emit('updateGetDetail')
}
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 600) }, 600)

View File

@@ -143,13 +143,16 @@ export default {
this.$dict.load(['villageActivityStatus']).then(() => { this.$dict.load(['villageActivityStatus']).then(() => {
this.getDetail() this.getDetail()
}) })
uni.$on('refresh', () => {
this.getListInit()
})
}, },
onShow() { onShow() {
document.title = '活动详情' document.title = '活动详情'
uni.$on('refresh', () => {
this.getListInit()
})
uni.$on('updateGetDetail', () => {
this.getDetail()
})
}, },
methods: { methods: {
getDetail() { getDetail() {