25939
This commit is contained in:
@@ -66,6 +66,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: '',
|
id: '',
|
||||||
|
indexDetail: '',
|
||||||
forms: {
|
forms: {
|
||||||
title: '',
|
title: '',
|
||||||
content: '',
|
content: '',
|
||||||
@@ -97,17 +98,18 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
|
this.indexDetail = o.index
|
||||||
this.id = o.id ? o.id : ''
|
this.id = o.id ? o.id : ''
|
||||||
this.$dict.load('realityStatus').then(() => {
|
this.$dict.load('realityStatus').then(() => {
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
this.forms.areaId = this.user.areaId
|
this.forms.areaId = this.user.areaId
|
||||||
|
|
||||||
this.user.phone = this.forms.contactPhone
|
|
||||||
this.user.name = this.forms.contactPerson
|
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
})
|
})
|
||||||
|
if (!this.indexDetail) {
|
||||||
console.log(this.user)
|
this.forms.contactPhone = this.user.phone
|
||||||
|
this.forms.contactPerson = this.user.name
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '发布活动'
|
document.title = '发布活动'
|
||||||
@@ -116,16 +118,18 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
getDetail() {
|
getDetail() {
|
||||||
this.$http.post(`/app/appvillageactivityinfo/queryDetailById?id=${this.id}`).then((res) => {
|
if (this.indexDetail) {
|
||||||
if (res?.data) {
|
this.$http.post(`/app/appvillageactivityinfo/queryDetailById?id=${this.id}`).then((res) => {
|
||||||
this.forms = res.data
|
if (res?.data) {
|
||||||
if (res.data) {
|
this.forms = res.data
|
||||||
if (res.data.url) {
|
if (res.data) {
|
||||||
this.forms.url = JSON.parse(res.data.url || '[]')
|
if (res.data.url) {
|
||||||
|
this.forms.url = JSON.parse(res.data.url || '[]')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
submit() {
|
submit() {
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
<div class="left-btn" :class="'status' + detail.status">{{ $dict.getLabel('villageActivityStatus', detail.status) }}</div>
|
<div class="left-btn" :class="'status' + detail.status">{{ $dict.getLabel('villageActivityStatus', detail.status) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<img :src="detail.avatar" alt="" v-if="detail.avatar" />
|
<img :src="user.avatar" alt="" v-if="user.avatar" />
|
||||||
<img :src="user.avatar" alt="" v-else />
|
|
||||||
<span>{{ detail.contactPerson }}</span>
|
<span>{{ user.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
toAdd() {
|
toAdd() {
|
||||||
uni.navigateTo({ url: `./Add?id=${this.id}` })
|
uni.navigateTo({ url: `./Add?id=${this.id}&index=11` })
|
||||||
},
|
},
|
||||||
|
|
||||||
AddPosts() {
|
AddPosts() {
|
||||||
|
|||||||
Reference in New Issue
Block a user