panhui 5 年 前
コミット
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() {
     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(() => {
             this.$nextTick(() => {
                 setTimeout(() => {
                 setTimeout(() => {
                     this.initMap();
                     this.initMap();