修改bug

This commit is contained in:
Smile-Xin 2024-12-13 17:19:18 +08:00
parent e61ded75b1
commit 0d01d0a3ce
3 changed files with 36 additions and 17 deletions

View File

@ -8,6 +8,7 @@
<meta name="菜单" id="base_meta_title">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<!-- 自定义应用名称 -->
<meta name="application-name" content="菜单">
<!-- 自定义图标 -->

View File

@ -42,6 +42,9 @@ export default {
color: #2c3e50;
width: 100%;
height: 100%;
overflow: hidden;
overscroll-behavior: none;
}
html{
height: 100%;
@ -54,6 +57,7 @@ body {
height: 100%;
width: 100%;
overflow: hidden;
overscroll-behavior: none;
}
</style>

View File

@ -10,7 +10,6 @@
<div class="page1 i1-1">
<img class="itPic" src="../assets/冷萃咖啡.jpg" alt="">
<img class="itPic" src="../assets/冷萃咖啡.jpg" alt="">
</div>
<div class="page1 i1-2">
@ -141,6 +140,18 @@ export default {
let page1 = null
let page2 = null
onMounted(() => {
document.body.addEventListener('touchmove', (e) => {
console.log('touchmove',e)
e.preventDefault()
}, {
passive: false
})
document.body.addEventListener('touchmove', (e) => {
if (e._isScroller) return;
e.preventDefault()
}, {
passive: false
})
page1 = document.getElementsByClassName('page1')
page2 = document.getElementsByClassName('page2')
@ -191,7 +202,7 @@ export default {
activeDiv.classList.remove('parent')
activeDiv.children[0].classList.remove('child')
activeDiv.children[0].classList.add('zIndex10')
activeDiv.classList.add('zIndex10')
// hidden.classList.remove('hidding')
isActived = false
} else {
@ -227,8 +238,8 @@ export default {
nextTick(() => {
$('#page').turn({
autoCenter: true,
height: 2048 / 2, //
width: 2732 / 2, //
height: 1536 / 2, // pro 2048 / 2
width: 2048 / 2, // pro 2732 / 2
display: 'single', /// single/double
elevation: 50,
duration: 1000, //(), 600ms
@ -243,6 +254,7 @@ export default {
turning: function (e, page, view) {
// console.log("turning", e, page, view)
//
isActived = false
document.querySelector('.index').removeEventListener('touchend', touchendHandle)
if (page === 2) {
for (let i = 0; i < page1.length; i++) {
@ -412,21 +424,23 @@ export default {
}
.parent {
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%);
/* width/2 - (width * 0.8 / 2) = width * 0.2*/
top: 10% !important;
left: 10% !important;
/* 683 */
width: 1092px !important;
/* width: 1092px !important; */
/* 512 */
height: 819px !important;
/* height: 819px !important; */
width: 819px !important;
height: 614px !important;
z-index: 100 !important;
}
.child {
/* 0.8 */
width: 1092px !important;
width: 819px !important;
/* 0.8 */
height: 819px !important;
height: 614px !important;
z-index: 100 !important;
opacity: 0.9 !important;
}
@ -451,8 +465,8 @@ export default {
.page1 {
position: absolute;
/* border-style: solid;
border-width: 1px; */
border-style: solid;
border-width: 1px;
z-index: 10;
/* transform: translate(-50%, -50%); */
/* background-color: saddlebrown; */
@ -471,8 +485,8 @@ export default {
.page2 {
position: absolute;
/* border-style: solid;
border-width: 1px; */
border-style: solid;
border-width: 1px;
z-index: 0;
/* transform: translate(-50%, -50%); */
/* background-color: saddlebrown; */