cyl/master-0804
wangxia 4 months ago
commit 5fd9661686

@ -1,20 +1,21 @@
<template> <template>
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou" style="position: fixed; top: 0; left: 0; "> <div class="p-root-detail-user g_w_all g_bg_page g_kuaishou">
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar> <u-navbar backIconColor="#333"
<scroll-view :borderBottom="false"
class="scroll-container" :immersive="true"
:scroll-y="true" :customBack="goHome"
:refresher-enabled="false" :background="background"
:refresher-triggered="false" :backIconName="fromShare ? 'home' : 'arrow-left'"
@touchstart="onTouchStart" ></u-navbar>
<!-- @touchstart="onTouchStart"
@touchmove="onTouchMove" @touchmove="onTouchMove"
@touchend="onTouchEnd" @touchend="onTouchEnd" -->
<view
class="scroll-container"
> >
<view class="background-container" <view class="background-container"
style="width: 100%;overflow: hidden;" style="width: 100%;overflow: hidden;"
>
<view class="background-container"
style="width: 100%;overflow: hidden;"
> >
<view class="u-navbar-fixed" <view class="u-navbar-fixed"
:style="{ :style="{
@ -22,12 +23,11 @@
'background-size': '100% 100%', 'background-size': '100% 100%',
'width':'calc(100vw + ' + backgroundScale + 'px)', 'width':'calc(100vw + ' + backgroundScale + 'px)',
'height': 'calc(' + (100/1.78).toFixed(2) + 'vw + ' + backgroundScale + 'px)', 'height': 'calc(' + (100/1.78).toFixed(2) + 'vw + ' + backgroundScale + 'px)',
'zoom': (1 + backgroundScale * 0.005) 'zoom': (1 + backgroundScale * 0.018)
}" }"
> >
</view> </view>
</view> </view>
</view>
<div class="con-obj" style="background-color: #caf1e0 !important" <div class="con-obj" style="background-color: #caf1e0 !important"
> >
<view class="m-info g_p_20 g_pt_12 g_pb_0 g_bg_f g_position_rela" hover-class="none" style="margin-top: 0; border-radius: 8px 8px 0 0"> <view class="m-info g_p_20 g_pt_12 g_pb_0 g_bg_f g_position_rela" hover-class="none" style="margin-top: 0; border-radius: 8px 8px 0 0">
@ -122,7 +122,7 @@
</div> </div>
</div> </div>
</div> </div>
</scroll-view> </view>
<!-- 发布职位确认框 --> <!-- 发布职位确认框 -->
<u-modal v-model="submitConfirm" width="90%" negativeTop="150" confirmText="发布职位" :showTitle="false" :confirmStyle="{ color: '#576b95', 'font-weight': 600 }" :cancelStyle="{ color: '#000', 'font-weight': 600 }" :showConfirmButton="false"> <u-modal v-model="submitConfirm" width="90%" negativeTop="150" confirmText="发布职位" :showTitle="false" :confirmStyle="{ color: '#576b95', 'font-weight': 600 }" :cancelStyle="{ color: '#000', 'font-weight': 600 }" :showConfirmButton="false">
<div class="g_fs_17 g_text_c"> <div class="g_fs_17 g_text_c">
@ -338,17 +338,25 @@ export default {
if (e.touches && e.touches.length > 0) { if (e.touches && e.touches.length > 0) {
this.moveY = e.touches[0].pageY; this.moveY = e.touches[0].pageY;
const query = uni.createSelectorQuery().in(this); const moveDistance = this.moveY - this.startY;
query.select('.scroll-container').boundingClientRect(data => {
if (data) { // moveDistance > 0
const scrollTop = data.scrollTop || 0; if (moveDistance > 0) {
if (scrollTop <= 0 && this.moveY > this.startY) { const query = uni.createSelectorQuery().in(this);
const pullDistance = this.moveY - this.startY; query.select('.scroll-container').boundingClientRect(data => {
this.backgroundScale++; if (data) {
this.mtScroll++; const scrollTop = data.scrollTop || 0;
//
if (scrollTop <= 0) {
// 使
// divisor80
const scaleValue = Math.min(moveDistance / 40, 5); //
this.backgroundScale = scaleValue;
this.mtScroll = scaleValue;
}
} }
} }).exec();
}).exec(); }
} }
}, },
@ -377,6 +385,16 @@ export default {
}; };
animate(); animate();
}, },
onScrollToLower() {
let that = this;
if (!that.isLogin) {
return false;
}
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
that.getDefault("concat");
}
},
goHome() { goHome() {
if (this.fromShare) { if (this.fromShare) {

Loading…
Cancel
Save