Browse Source

fix: 🧩 修改地图角度和bus位置问题

pull/12/head
张耀 3 years ago
parent
commit
8147a09796
  1. 2
      public/static/offline/JSON/getBusStationList.json
  2. 2
      public/static/qm/MainMap_QM.js
  3. 43
      src/components/Bus/Bus.vue

2
public/static/offline/JSON/getBusStationList.json

@ -1 +1 @@
{"code":200,"msg":"操作成功","data":{"busStationList":["A站","B站","C站","D站"]}}
{"code":200,"msg":"操作成功","data":{"busStationList":["浦园A站","浦园B站","浦园C站","浦园D站"]}}

2
public/static/qm/MainMap_QM.js

@ -75,7 +75,7 @@ QMUtil = function () {
this.pathStateObj = { isPathState: false, isPathPlay: true, basePath: "", graphPath: "", ftPath: "", dtPath: "", facAllArr: [], forShopArr: {}, elevator: null, straight: null, elevatorDown: null, seldtFacNo: "", seldownftFacNo: "", selupftFacNo: "" };
this.timeObj = { timeS: 0, collTime: -1, pathTime: -1 };
//debug 参数 相机坐标/ 镜头方向
this.guiOptions = { cameraX: -490, cameraY: 500, cameraZ: 22, targatX: 0, targatY: 0, targatZ: 0 }; //this.button = function() {};
this.guiOptions = { cameraX: -508, cameraY: 483, cameraZ: -4, targatX: 0, targatY: 0, targatZ: 0 }; //this.button = function() {};
this.sceneGap = { x: 0, y: 30, z: 40, scale: dir ? 0.15 : 0.085 }; //改变地图位置,大小

43
src/components/Bus/Bus.vue

@ -3,7 +3,7 @@
<img src="@/assets/images/home/bus_tip.svg" alt="" />
<h4>{{ switchLanguage(busTip, 'title') }}</h4>
<div class="bus-to-right">
<img ref="busRefToRight" class="bus" src="@/assets/images/home/busToRight.svg" alt="" />
<div ref="busRefToRight" class="bus"></div>
<img class="line" src="@/assets/images/home/lineToRight.svg" alt="" />
<div class="name-container">
<span v-for="(item, index) in nameList" :key="index" :class="{ active: index === currentIndexToRight }">{{
@ -12,7 +12,7 @@
</div>
</div>
<div class="bus-to-left">
<img ref="busRefToLeft" class="bus" src="@/assets/images/home/busToLeft.svg" alt="" />
<div ref="busRefToLeft" class="bus"></div>
<img class="line" src="@/assets/images/home/lineToLeft.svg" alt="" />
<div class="name-container">
<span v-for="(item, index) in nameList" :key="index" :class="{ active: index === currentIndexToLeft }">{{
@ -90,8 +90,8 @@ function setBusPositionToLeft(val: number) {
}
}
onMounted(() => {
setBusPositionToLeft(0)
setBusPositionToRight(3)
setBusPositionToLeft(1)
setBusPositionToRight(2)
})
</script>
@ -152,12 +152,35 @@ onMounted(() => {
}
.bus {
top: 85px;
background-image: url('@/assets/images/home/busToLeft.svg');
&::after {
position: absolute;
top: -35px;
left: 20px;
z-index: 3;
}
}
}
.bus {
position: absolute;
top: 0;
left: 0;
display: block;
background-image: url('@/assets/images/home/busToRight.svg');
width: 54px;
height: 21px;
&::after {
position: absolute;
top: 37px;
left: 20px;
z-index: 3;
display: block;
width: 22px;
height: 22px;
background: url('@/assets/images/home/point.svg');
content: '';
}
}
.line {
position: absolute;
@ -186,18 +209,6 @@ onMounted(() => {
position: relative;
// font-size: 24px;
// color: rgb(0 0 0 / 90%);
&::after {
position: absolute;
top: -33px;
right: 0;
left: 0;
width: 22px;
height: 22px;
margin: auto;
background: url('@/assets/images/home/point.svg');
content: '';
}
}
}
}

Loading…
Cancel
Save