|
|
@@ -39,7 +39,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
- <div class="home-helper">
|
|
|
+ <div v-if="showPointerHelper" class="home-helper">
|
|
|
<img draggable="false" src="./imgs/icon_gesture@2x.png" />
|
|
|
<span>可通过上下滑动切换地图</span>
|
|
|
</div>
|
|
|
@@ -73,6 +73,7 @@ const store = useStore();
|
|
|
const loading = ref(false);
|
|
|
const isOnline = ref(true);
|
|
|
const dialogText = ref("");
|
|
|
+const showPointerHelper = ref(window.showPointerHelper);
|
|
|
const dialogVisible = ref(false);
|
|
|
const router = useRouter();
|
|
|
const curIndex = ref(0);
|
|
|
@@ -109,6 +110,17 @@ const menuList = computed(() => [
|
|
|
activeIcon: ReservationActiveImg,
|
|
|
async event() {
|
|
|
try {
|
|
|
+ if (window.venueReservationUrl) {
|
|
|
+ router.push({
|
|
|
+ name: "iframe",
|
|
|
+ params: {
|
|
|
+ url: encodeURIComponent(window.venueReservationUrl),
|
|
|
+ showBtn: 0,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
loading.value = true;
|
|
|
const online = await isOnlineFn();
|
|
|
isOnline.value = online;
|
|
|
@@ -128,14 +140,6 @@ const menuList = computed(() => [
|
|
|
} else if (window.venueDebug || !online) {
|
|
|
dialogText.value = !online ? "网络异常" : "预约功能调试中";
|
|
|
dialogVisible.value = true;
|
|
|
- } else if (window.venueReservationUrl) {
|
|
|
- router.push({
|
|
|
- name: "iframe",
|
|
|
- params: {
|
|
|
- url: encodeURIComponent(window.venueReservationUrl),
|
|
|
- showBtn: 0,
|
|
|
- },
|
|
|
- });
|
|
|
} else {
|
|
|
router.push({ name: "venueReservation" });
|
|
|
}
|
|
|
@@ -156,7 +160,7 @@ const onMousedown = (e: MouseEvent) => {
|
|
|
scroll = true;
|
|
|
};
|
|
|
const onMousemove = (e: MouseEvent) => {
|
|
|
- if (!scroll) return;
|
|
|
+ if (!scroll || !window.showPointerHelper) return;
|
|
|
|
|
|
moveY = e.screenY - startY;
|
|
|
|
|
|
@@ -169,6 +173,8 @@ const onMousemove = (e: MouseEvent) => {
|
|
|
translateY.value = _moveY + moveY;
|
|
|
};
|
|
|
const onMouseup = () => {
|
|
|
+ if (!window.showPointerHelper) return;
|
|
|
+
|
|
|
scroll = false;
|
|
|
animation.value = true;
|
|
|
if (curIndex.value === 0) {
|
|
|
@@ -202,7 +208,7 @@ const onTouchstart = (e: TouchEvent) => {
|
|
|
scroll = true;
|
|
|
};
|
|
|
const onTouchmove = (e: TouchEvent) => {
|
|
|
- if (!scroll) return;
|
|
|
+ if (!scroll || !window.showPointerHelper) return;
|
|
|
|
|
|
moveY = e.changedTouches[0].screenY - startY;
|
|
|
|
|
|
@@ -215,6 +221,8 @@ const onTouchmove = (e: TouchEvent) => {
|
|
|
translateY.value = _moveY + moveY;
|
|
|
};
|
|
|
const onTouchend = () => {
|
|
|
+ if (!window.showPointerHelper) return;
|
|
|
+
|
|
|
animation.value = true;
|
|
|
if (curIndex.value === 0) {
|
|
|
if (moveY < -250) {
|