|
@@ -238,9 +238,18 @@ export default {
|
|
|
beforeCreate() {
|
|
|
},
|
|
|
beforeMount() {
|
|
|
+ console.log('sdfsdfsdf', this.$route.query)
|
|
|
+ if (this.$route.query.isMuted === 'false') {
|
|
|
+ this.setIsMuted(false)
|
|
|
+ let newHref = location.href.substring(0, location.href.length - 14)
|
|
|
+ location.href = newHref
|
|
|
+ } else if (this.$route.query.isMuted === 'true') {
|
|
|
+ this.setIsMuted(true)
|
|
|
+ let newHref = location.href.substring(0, location.href.length - 13)
|
|
|
+ location.href = newHref
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- // setTimeout(() => {
|
|
|
this.$msgCenter.publish('show-loading')
|
|
|
let floor = this.$route.query.floor
|
|
|
this.floor = floor
|
|
@@ -249,8 +258,6 @@ export default {
|
|
|
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,
|
|
@@ -421,8 +428,6 @@ export default {
|
|
|
|
|
|
kankan.render()
|
|
|
this.kankan = kankan
|
|
|
- // }, 1000)
|
|
|
- // }, 500)
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
this.stopAutoMoving()
|
|
@@ -431,10 +436,10 @@ export default {
|
|
|
...globalMapMutations([
|
|
|
'mustMute',
|
|
|
'cancelMustMute',
|
|
|
+ 'setIsMuted',
|
|
|
]),
|
|
|
- // 切换楼层
|
|
|
changeFloor(val) {
|
|
|
- let newHref = location.href.substring(0, location.href.length - 1) + val
|
|
|
+ let newHref = location.href.substring(0, location.href.length - 1) + val + `&isMuted=${this.isMuted}`
|
|
|
location.href = newHref
|
|
|
location.reload()
|
|
|
},
|