Просмотр исходного кода

修改通知编辑刷新问题

zizhong.wang лет назад: 4
Родитель
Сommit
0de5ce2c5f

+ 8 - 5
src/views/notification/changShang.vue

@@ -158,9 +158,11 @@ export default {
       if(typeof (config.area) === 'string'){
         config.area =  (config.area).split(',');
       }
+      let copyParam = JSON.stringify(config)
+      localStorage.setItem('nowPageEdit',copyParam)
       this.$router.push({
         path: "/changShang/editPage",
-        query: config,
+     //   query: config,
       });
     },
     getDataList: function () {
@@ -202,15 +204,16 @@ export default {
     },
     /* 发布公告 */
     announce: function () {
-      this.$router.push({
-        path: "/changShang/editPage",
-        query: {
+      let copyParam = JSON.stringify({
           title:'',
           content:``,
           id:'',
           files:[],
           area:['全区']
-        },
+        })
+      localStorage.setItem('nowPageEdit',copyParam)
+      this.$router.push({
+        path: "/changShang/editPage",
       });
     },
   },

+ 1 - 1
src/views/notification/editPage/editPage.vue

@@ -272,7 +272,7 @@ export default {
   },
   mounted() {
     this.getDataList();
-    this.contentParam = this.$route.query;
+    this.contentParam = JSON.parse(localStorage.getItem('nowPageEdit'));
     this.noticeId = this.contentParam.id;
     if (this.contentParam.files) {
       this.editFileLength = this.contentParam.files.length;