From b74095dad4ca39d7cf9b8787d28e8058090be4e2 Mon Sep 17 00:00:00 2001
From: xuhuajiao <13476289682@163.com>
Date: Thu, 21 Aug 2025 14:17:16 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E9=A1=B5=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/map/index.vue | 17 ++++++++++-------
src/views/pageThree/index.vue | 2 +-
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/views/map/index.vue b/src/views/map/index.vue
index 4cd5560..ef00442 100644
--- a/src/views/map/index.vue
+++ b/src/views/map/index.vue
@@ -47,7 +47,7 @@
-
@@ -125,7 +125,8 @@ export default {
timer: null,
position: 0,
speed: 2,
- activatedBaseSetting: {}
+ activatedBaseSetting: {},
+ mapSpaceStyle: null
}
},
computed: {
@@ -144,6 +145,10 @@ export default {
this.getReadRanking(this.activatedBaseSetting)
this.getLendingTotal(this.activatedBaseSetting)
}
+ if (result.map_spacing) {
+ this.mapSpaceStyle = `margin-top: ${result.map_spacing.context}px;`
+ console.log('mapSpaceStyle', this.mapSpaceStyle)
+ }
},
immediate: true
}
@@ -176,8 +181,6 @@ export default {
clearTimeout(this.timeTicket)
clearInterval(this.rankInterval)
clearInterval(this.timer)
- // localStorage.setItem('libIndexItem', this.libIndex)
- // localStorage.setItem('libCurrentItem', this.libCurrent)
localStorage.setItem('countItem', this.count)
this.rankInterval = null
@@ -443,9 +446,9 @@ export default {
})
const mainLib = this.libInfoData.find(lib => lib.branchType === 1) || {}
- const mainLibName = mainLib.name || '总馆'
+ const mainLibName = mainLib.name
- const mainLibCoord = mainLib.mapX && mainLib.mapY
+ // const mainLibCoord = mainLib.mapX && mainLib.mapY
? [Number(mainLib.mapX), Number(mainLib.mapY)] : [0, 0]
var XAData = this.libInfoData.map(item => {
@@ -619,7 +622,7 @@ export default {
top: '6%', // 距离顶部的位置,每层向下一个百分比
left: '11%',
roam: false, // 是否开启平游或缩放
- center: mainLibCoord,
+ // center: mainLibCoord,
z: 6, // 可以看成是css的z-index,数字越大图层越高,我这里设置了5个,然后页面有点卡,根据实际需要来添加,3个其实就能看出效果了
itemStyle: {
areaColor: {
diff --git a/src/views/pageThree/index.vue b/src/views/pageThree/index.vue
index c2e2a17..0258468 100644
--- a/src/views/pageThree/index.vue
+++ b/src/views/pageThree/index.vue
@@ -37,7 +37,7 @@