Browse Source

fix: 修改滚动范围

pull/18/head
张耀 3 years ago
parent
commit
abdb165963
  1. 4
      public/static/qm/MainMap_QM.js
  2. 4
      src/components/Map/Map.vue
  3. 24
      src/composables/useLogout.ts

4
public/static/qm/MainMap_QM.js

@ -4446,6 +4446,7 @@ MainMap_QM.prototype = {
clearTimeout(Map_QM.util.timeObj.pathTime); clearTimeout(Map_QM.util.timeObj.pathTime);
if (Map_QM.util.overObj && Map_QM.forShopArr[0]) { if (Map_QM.util.overObj && Map_QM.forShopArr[0]) {
Map_QM.util.pathStateObj.isPathPlay = true; Map_QM.util.pathStateObj.isPathPlay = true;
Map_QM.controls.reset()
Map_QM.clearFloor(); Map_QM.clearFloor();
Map_QM.onFindPathToObj(); Map_QM.onFindPathToObj();
} }
@ -4473,6 +4474,7 @@ MainMap_QM.prototype = {
Map_QM.util.timeObj.pathTime = setTimeout(() => { Map_QM.util.timeObj.pathTime = setTimeout(() => {
clearTimeout(Map_QM.util.timeObj.pathTime); clearTimeout(Map_QM.util.timeObj.pathTime);
if (Map_QM.util.overObj) { if (Map_QM.util.overObj) {
Map_QM.controls.reset()
Map_QM.clearFloor(); Map_QM.clearFloor();
Map_QM.onFindPathModel(Map_QM.util.pathStateObj.ftPath); Map_QM.onFindPathModel(Map_QM.util.pathStateObj.ftPath);
if (callBack) { if (callBack) {
@ -4504,6 +4506,7 @@ MainMap_QM.prototype = {
Map_QM.util.timeObj.pathTime = setTimeout(() => { Map_QM.util.timeObj.pathTime = setTimeout(() => {
clearTimeout(Map_QM.util.timeObj.pathTime); clearTimeout(Map_QM.util.timeObj.pathTime);
if (Map_QM.util.overObj) { if (Map_QM.util.overObj) {
Map_QM.controls.reset()
Map_QM.clearFloor(); Map_QM.clearFloor();
Map_QM.onFindPathModel(Map_QM.util.pathStateObj.dtPath); Map_QM.onFindPathModel(Map_QM.util.pathStateObj.dtPath);
if (callBack) { if (callBack) {
@ -4535,6 +4538,7 @@ MainMap_QM.prototype = {
Map_QM.util.timeObj.pathTime = setTimeout(() => { Map_QM.util.timeObj.pathTime = setTimeout(() => {
clearTimeout(Map_QM.util.timeObj.pathTime); clearTimeout(Map_QM.util.timeObj.pathTime);
if (Map_QM.util.overObj) { if (Map_QM.util.overObj) {
Map_QM.controls.reset()
Map_QM.clearFloor(); Map_QM.clearFloor();
Map_QM.onFindPathModel(Map_QM.util.pathStateObj.graphPath); Map_QM.onFindPathModel(Map_QM.util.pathStateObj.graphPath);
if (callBack) { if (callBack) {

4
src/components/Map/Map.vue

@ -6,7 +6,7 @@
<!-- 地图弹框 --> <!-- 地图弹框 -->
<div id="shopInfo" class="boxShop boxShop2"> <div id="shopInfo" class="boxShop boxShop2">
<div id="shopNum"> <div id="shopNum">
<marquees v-if="nameWidth > 220" :speed="25" :delay="0.8" class="name" :content="switchLanguage(shop, 'shopName')"
<marquees v-if="nameWidth > 190" :speed="25" :delay="0.8" class="name" :content="switchLanguage(shop, 'shopName')"
>{{ switchLanguage(shop, 'shopName') }} >{{ switchLanguage(shop, 'shopName') }}
</marquees> </marquees>
<span v-else ref="nameRef" class="name">{{ switchLanguage(shop, 'shopName') }}</span> <span v-else ref="nameRef" class="name">{{ switchLanguage(shop, 'shopName') }}</span>
@ -76,11 +76,13 @@ watch(shop, () => {
/* stylelint-disable-next-line selector-id-pattern */ /* stylelint-disable-next-line selector-id-pattern */
#shopNum { #shopNum {
overflow: hidden;
width: 220px; width: 220px;
height: 60px; height: 60px;
padding: 25px 18px 0 36px; padding: 25px 18px 0 36px;
font-size: 22px; font-size: 22px;
font-family: 'font_bold'; font-family: 'font_bold';
white-space: nowrap;
color: #fff; color: #fff;
font-weight: 700; font-weight: 700;
.name { .name {

24
src/composables/useLogout.ts

@ -19,18 +19,20 @@ export const useLogout = () => {
//点击商场logo 达到最大次数显示退出框 //点击商场logo 达到最大次数显示退出框
function addTotalClick(e: TouchEvent) { function addTotalClick(e: TouchEvent) {
try { try {
const { clientX, clientY } = e.changedTouches[0]
const _clientX = parseInt(String(clientX), 10)
const _clientY = parseInt(String(clientY), 10)
if (_clientX >= 0 && _clientX <= SAFE_COORDINATES && _clientY >= 0 && _clientY <= SAFE_COORDINATES) {
clickedNumberTotal.value++
}
nextTick(() => {
if (clickedNumberTotal.value >= MAX_NUMBER) {
logout.value = true
resetClickNumber()
if (e.changedTouches.length && e.changedTouches[0].clientX) {
const { clientX, clientY } = e.changedTouches[0]
const _clientX = parseInt(String(clientX), 10)
const _clientY = parseInt(String(clientY), 10)
if (_clientX >= 0 && _clientX <= SAFE_COORDINATES && _clientY >= 0 && _clientY <= SAFE_COORDINATES) {
clickedNumberTotal.value++
} }
})
nextTick(() => {
if (clickedNumberTotal.value >= MAX_NUMBER) {
logout.value = true
resetClickNumber()
}
})
}
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }

Loading…
Cancel
Save