Compare commits

...

3 Commits

  1. 8
      CHANGELOG.md
  2. 4
      package-lock.json
  3. 2
      package.json
  4. 2
      public/static/offline/JSON/getBusStationList.json
  5. 2
      public/static/qm/MainMap_QM.js
  6. 43
      src/components/Bus/Bus.vue
  7. 8
      src/components/PathGroup/PathGroup.vue

8
CHANGELOG.md

@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.0.0-B.11](https://git.1000my.com/project-jiaxinglcpy/jxlcpy_base_daoshi_vue_ts/compare/v1.0.0-B.10...v1.0.0-B.11) (2023-06-16)
### Bug Fixes
* 🧩 修改地图角度和bus位置问题 ([8147a09](https://git.1000my.com/project-jiaxinglcpy/jxlcpy_base_daoshi_vue_ts/commit/8147a09796d9b03675df1de10f03edd47efc004a))
* 修复经过店铺滚动问题 ([952dc9c](https://git.1000my.com/project-jiaxinglcpy/jxlcpy_base_daoshi_vue_ts/commit/952dc9ca57f1f1ef09f0151368d70edb9b031384))
## [1.0.0-B.10](https://git.1000my.com/project-jiaxinglcpy/jxlcpy_base_daoshi_vue_ts/compare/v1.0.0-B.9...v1.0.0-B.10) (2023-06-15)

4
package-lock.json

@ -1,12 +1,12 @@
{
"name": "vue_cli_ts",
"version": "1.0.0-B.10",
"version": "1.0.0-B.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "vue_cli_ts",
"version": "1.0.0-B.10",
"version": "1.0.0-B.11",
"dependencies": {
"@better-scroll/core": "^2.5.0",
"@better-scroll/observe-image": "^2.5.0",

2
package.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "1.0.0-B.10",
"version": "1.0.0-B.11",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

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: '';
}
}
}
}

8
src/components/PathGroup/PathGroup.vue

@ -16,7 +16,7 @@
</div>
<span class="pass-name">{{ yourpos }} </span>
</li>
<li v-for="(item, idx) of pathshop" :key="item.code" class="pass-item" :class="{ last: playIdx === idx }">
<li v-for="(item, idx) of pathshop" :id="item.shopNum" :key="item.code" class="pass-item" :class="{ last: playIdx === idx }">
<div class="lefts">
<img :src="item.isAddPrefix ? item.logoPath : item.logoPath" class="way-icon" alt="" />
</div>
@ -92,12 +92,17 @@ function onPathPlayOver() {
playIdx.value = props.pathshop.length
}
const scroll = ref()
function onPathPlaying(e: any) {
// console.log(e.data) // {"pathArrIn": 0, "pathIndex": 1, "shopNum":"" }
const { shopNum } = e.data
if (shopNum) {
const idx2 = props.pathshop.findIndex((val: any) => val.shopNum === shopNum)
playIdx.value = idx2
if (scroll.value && document.getElementById(shopNum)) {
scroll.value.scrollToElement(document.getElementById(shopNum))
}
}
}
//playIdx
@ -123,6 +128,7 @@ const yourpos = computed(() => {
const lastImage = computed(() => {
return shop.value.logoUrl ?? require('@/assets/images/header/logo.svg')
})
defineExpose({
resetPlayIdx
})

Loading…
Cancel
Save