Browse Source

MapView页面,ios多次切换楼层,崩溃时,退出到APP首页

yunxing 3 years ago
parent
commit
71e6f801b1
2 changed files with 11 additions and 3 deletions
  1. 3 3
      package.json
  2. 8 0
      src/views/overview/MapView.vue

+ 3 - 3
package.json

@@ -19,10 +19,10 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.27",
-    "@saga-web/big": "1.0.119",
+    "@saga-web/big": "1.0.120",
     "@saga-web/draw": "2.1.110",
-    "@saga-web/feng-map": "1.0.51",
-    "@saga-web/graph": "2.1.133",
+    "@saga-web/feng-map": "1.0.52",
+    "@saga-web/graph": "2.1.136",
     "axios": "^0.20.0",
     "compression-webpack-plugin": "^5.0.2",
     "core-js": "^3.6.5",

+ 8 - 0
src/views/overview/MapView.vue

@@ -586,6 +586,14 @@ export default {
   watch: {
     '$route.params.floor': {
       handler(floor) {
+        // IOS崩溃时,会重新走逻辑,无floor参数, 执行退出页面
+        if (!floor) {
+            console.error('IOS崩溃,无floor')
+            window.webkit && webkit.messageHandlers.cordova_iab.postMessage(
+                JSON.stringify({method: 'close',})
+            )
+            return
+        }  
         this.$nextTick(() => {
           this.floorid = floor.FloorId;
           this.floorName = floor.FloorName;