|
@@ -2,9 +2,9 @@
|
|
|
<div
|
|
<div
|
|
|
class="rice-door"
|
|
class="rice-door"
|
|
|
:style="{ right: right, bottom: bottom }"
|
|
:style="{ right: right, bottom: bottom }"
|
|
|
- @touchstart="onTouchStart"
|
|
|
|
|
- @touchmove="onTouchMove"
|
|
|
|
|
- @touchend="onTouchend"
|
|
|
|
|
|
|
+ @touchstart.stop="onTouchStart"
|
|
|
|
|
+ @touchmove.stop="onTouchMove"
|
|
|
|
|
+ @touchend.stop="onTouchend"
|
|
|
v-if="showRice"
|
|
v-if="showRice"
|
|
|
>
|
|
>
|
|
|
<img src="@assets/rice-door.png" @click.stop="$router.push('/rice')" alt="" />
|
|
<img src="@assets/rice-door.png" @click.stop="$router.push('/rice')" alt="" />
|
|
@@ -20,12 +20,20 @@ const {
|
|
|
}
|
|
}
|
|
|
} = getCurrentInstance();
|
|
} = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
+const pageScrollYoffset = ref(0);
|
|
|
|
|
+
|
|
|
function onTouchStart(e) {
|
|
function onTouchStart(e) {
|
|
|
global.emitter.emit('startRefreash', false);
|
|
global.emitter.emit('startRefreash', false);
|
|
|
|
|
+ document.getElementById('scroll-wrapper').className =
|
|
|
|
|
+ document.getElementById('scroll-wrapper').className + ' van-overflow-hidden';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function onTouchend(e) {
|
|
function onTouchend(e) {
|
|
|
global.emitter.emit('startRefreash', true);
|
|
global.emitter.emit('startRefreash', true);
|
|
|
|
|
+ document.getElementById('scroll-wrapper').className = document
|
|
|
|
|
+ .getElementById('scroll-wrapper')
|
|
|
|
|
+ .className.replace(/ van-overflow-hidden/, '');
|
|
|
|
|
+ // document.body.className = '';
|
|
|
}
|
|
}
|
|
|
const pageX = ref(0);
|
|
const pageX = ref(0);
|
|
|
const pageY = ref(0);
|
|
const pageY = ref(0);
|
|
@@ -46,12 +54,12 @@ const right = computed(() => {
|
|
|
const bottom = computed(() => {
|
|
const bottom = computed(() => {
|
|
|
let _safeBootom = Number(safeBootom.value.replace(/px/, '') || 0);
|
|
let _safeBootom = Number(safeBootom.value.replace(/px/, '') || 0);
|
|
|
if (pageY.value) {
|
|
if (pageY.value) {
|
|
|
- if (window.innerHeight - pageY.value < _safeBootom + 90) {
|
|
|
|
|
- return _safeBootom + 90 + 'px';
|
|
|
|
|
- }
|
|
|
|
|
if (pageY.value < 50) {
|
|
if (pageY.value < 50) {
|
|
|
return window.innerHeight - 40;
|
|
return window.innerHeight - 40;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (window.innerHeight - pageY.value < _safeBootom + 90) {
|
|
|
|
|
+ return _safeBootom + 90 + 'px';
|
|
|
|
|
+ }
|
|
|
return window.innerHeight - pageY.value + 'px';
|
|
return window.innerHeight - pageY.value + 'px';
|
|
|
} else {
|
|
} else {
|
|
|
return _safeBootom + 190 + 'px';
|
|
return _safeBootom + 190 + 'px';
|