Selaa lähdekoodia

reactor:公告数据走接口+上传图片返回更改

liu_w601 3 kuukautta sitten
vanhempi
commit
bf0b698c1a

+ 2 - 2
src/views/announcement-management/index.vue

@@ -297,8 +297,8 @@ export default {
       })
       })
     },
     },
     handleAvatarSuccess(res, file,fileList) {
     handleAvatarSuccess(res, file,fileList) {
-      this.form.images = res.fileUrl
-      this.imageUrl = res.fileUrl
+      this.form.images = res.data.fileUrl
+      this.imageUrl = res.data.fileUrl
       this.fileList = fileList
       this.fileList = fileList
     },
     },
     beforeUpload(file) {
     beforeUpload(file) {

+ 1 - 26
src/views/comprehensive-overview/left.vue

@@ -144,31 +144,7 @@ export default {
     }
     }
   },
   },
   mounted() {
   mounted() {
-    // this.fetchData()
-    this.noticeList = [
-      {
-        id: 1,
-        images: ImgUrl,
-        announcementName: '朝元阁峻临秦岭,羯鼓楼高俯渭河',
-        createTime: '2025-05-04 10:00:00',
-        announcementContent: '朝元阁峻临秦岭,羯鼓楼高俯渭河,朝元阁峻临秦岭,羯鼓楼高俯渭河,朝元阁峻临秦岭,羯鼓楼高俯渭河'
-      },
-      {
-        id: 2,
-        images: ImgUrl2,
-        announcementName: '离亭当日唱离歌,只为柔条傍渭河',
-        createTime: '2025-05-04 10:00:00',
-        announcementContent: '离亭当日唱离歌,只为柔条傍渭河,离亭当日唱离歌,只为柔条傍渭河,离亭当日唱离歌,只为柔条傍渭河'
-      },
-      {
-        id: 3,
-        images: ImgUrl2,
-        announcementName: '离亭当日唱离歌,只为柔条傍渭河',
-        createTime: '2025-05-04 10:00:00',
-        announcementContent: '离亭当日唱离歌,只为柔条傍渭河,离亭当日唱离歌,只为柔条傍渭河,离亭当日唱离歌,只为柔条傍渭河'
-      }
-    ]
-    this.noticeDataList = this.noticeList.splice(1, this.noticeList.length)
+    this.fetchData()
   },
   },
   methods: {
   methods: {
     formatDate(date) {
     formatDate(date) {
@@ -181,7 +157,6 @@ export default {
       })
       })
     },
     },
     toSee(data) {
     toSee(data) {
-      console.info(data)
       this.$globalEventBus.$emit('clickAnnouncePopup', { list: data })
       this.$globalEventBus.$emit('clickAnnouncePopup', { list: data })
     }
     }
   }
   }