修改bug
This commit is contained in:
parent
e61ded75b1
commit
0d01d0a3ce
@ -8,6 +8,7 @@
|
|||||||
<meta name="菜单" id="base_meta_title">
|
<meta name="菜单" id="base_meta_title">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<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="菜单">
|
<meta name="application-name" content="菜单">
|
||||||
<!-- 自定义图标 -->
|
<!-- 自定义图标 -->
|
||||||
|
@ -42,6 +42,9 @@ export default {
|
|||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
overscroll-behavior: none;
|
||||||
|
|
||||||
}
|
}
|
||||||
html{
|
html{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -54,6 +57,7 @@ body {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
overscroll-behavior: none;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
<div class="page1 i1-1">
|
<div class="page1 i1-1">
|
||||||
<img class="itPic" src="../assets/冷萃咖啡.jpg" alt="">
|
<img class="itPic" src="../assets/冷萃咖啡.jpg" alt="">
|
||||||
<img class="itPic" src="../assets/冷萃咖啡.jpg" alt="">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page1 i1-2">
|
<div class="page1 i1-2">
|
||||||
@ -141,6 +140,18 @@ export default {
|
|||||||
let page1 = null
|
let page1 = null
|
||||||
let page2 = null
|
let page2 = null
|
||||||
onMounted(() => {
|
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')
|
page1 = document.getElementsByClassName('page1')
|
||||||
page2 = document.getElementsByClassName('page2')
|
page2 = document.getElementsByClassName('page2')
|
||||||
|
|
||||||
@ -191,7 +202,7 @@ export default {
|
|||||||
|
|
||||||
activeDiv.classList.remove('parent')
|
activeDiv.classList.remove('parent')
|
||||||
activeDiv.children[0].classList.remove('child')
|
activeDiv.children[0].classList.remove('child')
|
||||||
activeDiv.children[0].classList.add('zIndex10')
|
activeDiv.classList.add('zIndex10')
|
||||||
// hidden.classList.remove('hidding')
|
// hidden.classList.remove('hidding')
|
||||||
isActived = false
|
isActived = false
|
||||||
} else {
|
} else {
|
||||||
@ -206,7 +217,7 @@ export default {
|
|||||||
isActived = true
|
isActived = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
// 点击回到主菜单
|
// 点击回到主菜单
|
||||||
document.querySelector('.hidden').addEventListener('click', () => {
|
document.querySelector('.hidden').addEventListener('click', () => {
|
||||||
@ -227,8 +238,8 @@ export default {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
$('#page').turn({
|
$('#page').turn({
|
||||||
autoCenter: true,
|
autoCenter: true,
|
||||||
height: 2048 / 2, //高度
|
height: 1536 / 2, //高度 pro 2048 / 2
|
||||||
width: 2732 / 2, //宽度
|
width: 2048 / 2, //宽度 pro 2732 / 2
|
||||||
display: 'single', //单页显示/双页显示 single/double
|
display: 'single', //单页显示/双页显示 single/double
|
||||||
elevation: 50,
|
elevation: 50,
|
||||||
duration: 1000, //翻页速度(毫秒), 默认600ms
|
duration: 1000, //翻页速度(毫秒), 默认600ms
|
||||||
@ -243,6 +254,7 @@ export default {
|
|||||||
turning: function (e, page, view) {
|
turning: function (e, page, view) {
|
||||||
// console.log("turning", e, page, view)
|
// console.log("turning", e, page, view)
|
||||||
// 翻页前触发
|
// 翻页前触发
|
||||||
|
isActived = false
|
||||||
document.querySelector('.index').removeEventListener('touchend', touchendHandle)
|
document.querySelector('.index').removeEventListener('touchend', touchendHandle)
|
||||||
if (page === 2) {
|
if (page === 2) {
|
||||||
for (let i = 0; i < page1.length; i++) {
|
for (let i = 0; i < page1.length; i++) {
|
||||||
@ -278,7 +290,7 @@ export default {
|
|||||||
},
|
},
|
||||||
turned: function (e, page) {
|
turned: function (e, page) {
|
||||||
// console.log("turned", e, page)
|
// console.log("turned", e, page)
|
||||||
|
|
||||||
// 翻页后触发
|
// 翻页后触发
|
||||||
},
|
},
|
||||||
start: function (e, pageObj) {
|
start: function (e, pageObj) {
|
||||||
@ -412,21 +424,23 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.parent {
|
.parent {
|
||||||
top: 50% !important;
|
/* width/2 - (width * 0.8 / 2) = width * 0.2*/
|
||||||
left: 50% !important;
|
top: 10% !important;
|
||||||
transform: translate(-50%, -50%);
|
left: 10% !important;
|
||||||
/* 683 */
|
/* 683 */
|
||||||
width: 1092px !important;
|
/* width: 1092px !important; */
|
||||||
/* 512 */
|
/* 512 */
|
||||||
height: 819px !important;
|
/* height: 819px !important; */
|
||||||
|
width: 819px !important;
|
||||||
|
height: 614px !important;
|
||||||
z-index: 100 !important;
|
z-index: 100 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.child {
|
.child {
|
||||||
/* 0.8 */
|
/* 0.8 */
|
||||||
width: 1092px !important;
|
width: 819px !important;
|
||||||
/* 0.8 */
|
/* 0.8 */
|
||||||
height: 819px !important;
|
height: 614px !important;
|
||||||
z-index: 100 !important;
|
z-index: 100 !important;
|
||||||
opacity: 0.9 !important;
|
opacity: 0.9 !important;
|
||||||
}
|
}
|
||||||
@ -451,8 +465,8 @@ export default {
|
|||||||
.page1 {
|
.page1 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
/* border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px; */
|
border-width: 1px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
/* transform: translate(-50%, -50%); */
|
/* transform: translate(-50%, -50%); */
|
||||||
/* background-color: saddlebrown; */
|
/* background-color: saddlebrown; */
|
||||||
@ -471,8 +485,8 @@ export default {
|
|||||||
.page2 {
|
.page2 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
/* border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px; */
|
border-width: 1px;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
/* transform: translate(-50%, -50%); */
|
/* transform: translate(-50%, -50%); */
|
||||||
/* background-color: saddlebrown; */
|
/* background-color: saddlebrown; */
|
||||||
|
Loading…
Reference in New Issue
Block a user