2025.2.20 第二版

This commit is contained in:
Teng 2025-02-20 17:21:36 +08:00
parent b081e437b5
commit b3ff6f95a1
10 changed files with 676 additions and 252 deletions

View File

@ -8,21 +8,16 @@
"orientation": "landscape" //
}
}
// {
// "path": "pages/index/indexDark",
// "style": {
// "navigationStyle": "custom",
// "orientation": "landscape" //
// }
},
{
"path": "pages/login/login",
"style": {
"navigationStyle": "custom",
"orientation": "landscape" //
}
// }
// {
// "path": "pages/login/login",
// "style": {
// "navigationBarTitleText": "注册页"
// }
// }
}
],
"globalStyle": {

File diff suppressed because it is too large Load Diff

69
pages/login/login.vue Normal file
View File

@ -0,0 +1,69 @@
<template>
<view class="container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd">
<swiper class="swiper" indicator-dots="true" autoplay="true" interval="3000" duration="500">
<swiper-item>
1
</swiper-item>
<swiper-item>
2
</swiper-item>
<swiper-item>
3
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data() {
return {
startX: 0,
startY: 0,
isDragging: false
};
},
methods: {
//
onTouchStart(e) {
this.startX = e.touches[0].clientX;
this.startY = e.touches[0].clientY;
this.isDragging = false;
},
//
onTouchMove(e) {
const moveX = e.touches[0].clientX - this.startX;
const moveY = e.touches[0].clientY - this.startY;
if (Math.abs(moveX) > Math.abs(moveY)) {
//
this.isDragging = true;
} else {
//
this.isDragging = true;
}
if (this.isDragging) {
e.preventDefault(); //
}
},
//
onTouchEnd() {
this.isDragging = false;
}
}
};
</script>
<style scoped>
.container {
position: relative;
width: 100%;
height: 300px;
}
.swiper {
width: 100%;
height: 100%;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB