|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
- <div class="skww-view">
|
|
|
+ <div
|
|
|
+ v-show="canShow"
|
|
|
+ class="skww-view"
|
|
|
+ >
|
|
|
<div
|
|
|
class="swkk-wrap"
|
|
|
/>
|
|
@@ -167,6 +170,8 @@ export default {
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
+ canShow: false,
|
|
|
+
|
|
|
kankan: null,
|
|
|
isLoading: true,
|
|
|
|
|
@@ -226,19 +231,30 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ beforeCreate() {
|
|
|
+ if (!location.href.endsWith('autoReload=true')) {
|
|
|
+ location.href += '&autoReload=true'
|
|
|
+ location.reload()
|
|
|
+ } else {
|
|
|
+ location.href = location.href.substring(0, location.href.length - 16)
|
|
|
+ }
|
|
|
+ },
|
|
|
beforeMount() {
|
|
|
- this.$msgCenter.publish('show-loading')
|
|
|
},
|
|
|
mounted() {
|
|
|
- let floor = this.$route.query.floor
|
|
|
- this.floor = floor
|
|
|
- let sceneCode = ''
|
|
|
- if (floor === "1") sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_1
|
|
|
- else if (floor === "2") sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_2
|
|
|
- console.assert(sceneCode, 'no sceneCode!')
|
|
|
-
|
|
|
- // 不等一秒,就会因为use了小地图而卡死?
|
|
|
setTimeout(() => {
|
|
|
+ this.canShow = true
|
|
|
+
|
|
|
+ this.$msgCenter.publish('show-loading')
|
|
|
+ let floor = this.$route.query.floor
|
|
|
+ this.floor = floor
|
|
|
+ let sceneCode = ''
|
|
|
+ if (floor === "1") sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_1
|
|
|
+ else if (floor === "2") sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_2
|
|
|
+ console.assert(sceneCode, 'no sceneCode!')
|
|
|
+
|
|
|
+ // 不等一秒,就会因为use了小地图而卡死?
|
|
|
+ // setTimeout(() => {
|
|
|
let kankan = new KanKan({
|
|
|
dom: ".swkk-wrap",
|
|
|
num: sceneCode,
|
|
@@ -398,8 +414,8 @@ export default {
|
|
|
})
|
|
|
|
|
|
this.kankan = kankan
|
|
|
- }, 1000)
|
|
|
-
|
|
|
+ // }, 1000)
|
|
|
+ }, 500)
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
this.stopAutoMoving()
|