diff --git a/src/apps/AppUniMsg/Add.vue b/src/apps/AppUniMsg/Add.vue index 168530a6..d16b6b62 100644 --- a/src/apps/AppUniMsg/Add.vue +++ b/src/apps/AppUniMsg/Add.vue @@ -58,14 +58,16 @@ export default { mounted() {}, methods: { getDetail() { - this.$http.post(`/app/appmininotice/queryDetailById?id=${this.id}`).then((res) => { - if (res?.data) { - this.forms = res.data - if (res.data.images) { - this.forms.images = JSON.parse(res.data.images || '[]') + if (this.id) { + this.$http.post(`/app/appmininotice/queryDetailById?id=${this.id}`).then((res) => { + if (res?.data) { + this.forms = res.data + if (res.data.images) { + this.forms.images = JSON.parse(res.data.images || '[]') + } } - } - }) + }) + } }, submit() { @@ -113,11 +115,14 @@ export default {