panhui 5 лет назад
Родитель
Сommit
427a8a38d4
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      src/main/map/src/views/Home.vue

+ 4 - 2
src/main/map/src/views/Home.vue

@@ -85,8 +85,10 @@ export default {
         },
     },
     mounted() {
-        this.orderInfo = JSON.parse(localStorage.getItem('orderInfo'));
-        if (this.orderInfo) {
+        this.orderInfo = localStorage.getItem('orderInfo')
+            ? JSON.parse(localStorage.getItem('orderInfo'))
+            : {};
+        if (this.orderInfo.id) {
             this.$nextTick(() => {
                 setTimeout(() => {
                     this.initMap();