|
@@ -75,6 +75,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="current-page">
|
|
|
+ {{ currentAnchorIdx }}
|
|
|
+ </div>
|
|
|
<BtnBack
|
|
|
@click="router.go(-1)"
|
|
|
/>
|
|
@@ -145,10 +148,15 @@ const { width: windowWidth, height: windowHeight } = useWindowSize()
|
|
|
const maxTranslateLength = computed(() => {
|
|
|
return windowHeight.value * windowWidthDesign / windowHeightDesign
|
|
|
})
|
|
|
-const { haveSwipedThisTime, translateLength } = useSmoothSwipe({
|
|
|
+const { haveSwipedThisTime, translateLength, currentAnchorIdx } = useSmoothSwipe({
|
|
|
scrollTargetRef: scrollTarget,
|
|
|
maxTranslateLength,
|
|
|
viewportWidth: windowWidth,
|
|
|
+ anchorPosList: [
|
|
|
+ maxTranslateLength.value * 216 / windowWidthDesign - windowWidth.value / 2,
|
|
|
+ maxTranslateLength.value * 967 / windowWidthDesign - windowWidth.value / 2,
|
|
|
+ maxTranslateLength.value - windowWidth.value
|
|
|
+ ]
|
|
|
})
|
|
|
|
|
|
const tempBgInitialLeft = 0
|
|
@@ -226,7 +234,7 @@ const handletouchstart = (event) => {
|
|
|
const touchMove = (event) => {
|
|
|
let currentX = event.changedTouches[0].pageX
|
|
|
let tX = currentX - fingerPosXWhenTouchStart.value
|
|
|
- if (tX < -15 && isAtBorderWhenTouchStart.value) {
|
|
|
+ if (tX < -1 && isAtBorderWhenTouchStart.value) {
|
|
|
router.push({
|
|
|
name: 'Game',
|
|
|
})
|
|
@@ -313,6 +321,12 @@ const touchMove = (event) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ >.current-page {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ bottom: 0;
|
|
|
+ }
|
|
|
>.operation-tip{
|
|
|
position: absolute;
|
|
|
right: calc(44 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|