|
|
|
|
@ -3,25 +3,14 @@
|
|
|
|
|
<g-loading text="加载中..."></g-loading>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou" v-if="showPage">
|
|
|
|
|
<view class="background-container g_position_fixed" style="width: 100%; overflow: hidden; z-index: 0">
|
|
|
|
|
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar>
|
|
|
|
|
<view class="scroll-container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd">
|
|
|
|
|
<view class="background-container" style="width: 100%; overflow: hidden">
|
|
|
|
|
<view
|
|
|
|
|
class="u-navbar-fixed"
|
|
|
|
|
:style="{
|
|
|
|
|
'background-image': info.supplierAccountCoverUrl ? `url(${info.supplierAccountCoverUrl})` : 'url(https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/mbg.jpg)',
|
|
|
|
|
'background-size': '100% 100%',
|
|
|
|
|
width: 'calc(100vw + ' + backgroundScale + 'px)',
|
|
|
|
|
height: 'calc(' + (100 / 1.2).toFixed(2) + 'vw + ' + moveDistance + 'px)',
|
|
|
|
|
'transform-origin': '50% 0%',
|
|
|
|
|
transform: `scale(${1 + backgroundScale * 0.008})`,
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar>
|
|
|
|
|
<scroll-view :refresher-enabled="true" class="scroll-container" scroll-y style="height: 100vh" refresher-default-style="none" @touchstart="onTouchStart" @touchmove="onTouchMove" :refresher-threshold="0" :refresher-triggered="isTrigger" @refresherrefresh="refreshJobList" @touchend="onTouchEnd" @scroll="checkScroll" @scrolltolower="reachBottom">
|
|
|
|
|
<view
|
|
|
|
|
class="u-navbar-fixed"
|
|
|
|
|
:style="{
|
|
|
|
|
width: 'calc(100vw + ' + backgroundScale + 'px)',
|
|
|
|
|
height: 'calc(' + (100 / 1.78).toFixed(2) + 'vw + ' + backgroundScale + 'px)',
|
|
|
|
|
'transform-origin': '50% 0%',
|
|
|
|
|
@ -29,7 +18,8 @@
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
<div class="con-obj g_position_rela" style="background-color: #caf1e0 !important">
|
|
|
|
|
</view>
|
|
|
|
|
<div class="con-obj" style="background-color: #caf1e0 !important">
|
|
|
|
|
<view class="m-info g_p_20 g_pt_12 g_pb_8 g_bg_f g_position_rela" hover-class="none" style="margin-top: 0; border-radius: 8px 8px 0 0; width: calc(100% - 40px)">
|
|
|
|
|
<view class="g_flex_row_start">
|
|
|
|
|
<view class="g_w_71">
|
|
|
|
|
@ -117,7 +107,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 基本信息 -->
|
|
|
|
|
<div class="g_h_all g_bg_f_5">
|
|
|
|
|
<div class="g_h_all">
|
|
|
|
|
<div v-if="jobDetailShow || jobDetailShow == 'true'">
|
|
|
|
|
<!-- 正常职位 -->
|
|
|
|
|
<div class="m-detail">
|
|
|
|
|
@ -131,7 +121,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
</view>
|
|
|
|
|
<applyFlow ref="applyFlow" @updateInfo="updateInfo" :userInfo="userInfo" :shareAgencyId="uid" :agencyInfo="agencyInfo"></applyFlow>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -239,7 +229,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
refreshing: false,
|
|
|
|
|
mtScroll: 0,
|
|
|
|
|
moveDistance: 0,
|
|
|
|
|
backgroundScale: 0, // 背景缩放比例
|
|
|
|
|
startY: 0, // 触摸起始位置
|
|
|
|
|
moveY: 0, // 触摸移动位置
|
|
|
|
|
@ -338,12 +327,9 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
// 触摸开始事件
|
|
|
|
|
onTouchStart(e) {
|
|
|
|
|
if(this.isTouching){
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
this.isTouching = true;
|
|
|
|
|
this.mtScroll = 0;
|
|
|
|
|
this.backgroundScale = 0;
|
|
|
|
|
this.isTouching = true;
|
|
|
|
|
if (e.touches && e.touches.length > 0) {
|
|
|
|
|
this.startY = e.touches[0].pageY;
|
|
|
|
|
}
|
|
|
|
|
@ -356,9 +342,9 @@ export default {
|
|
|
|
|
if (e.touches && e.touches.length > 0) {
|
|
|
|
|
this.moveY = e.touches[0].pageY;
|
|
|
|
|
const moveDistance = this.moveY - this.startY;
|
|
|
|
|
// && moveDistance < 200
|
|
|
|
|
|
|
|
|
|
// 只有向下移动(moveDistance > 0)且移动距离合理时才触发下拉效果
|
|
|
|
|
if (moveDistance > 0) {
|
|
|
|
|
if (moveDistance > 0 && moveDistance < 200) {
|
|
|
|
|
// 限制最大下拉距离
|
|
|
|
|
const query = uni.createSelectorQuery().in(this);
|
|
|
|
|
query
|
|
|
|
|
@ -369,8 +355,6 @@ export default {
|
|
|
|
|
// 只有在滚动到顶部且向下拉动时才执行缩放
|
|
|
|
|
if (scrollTop <= 0) {
|
|
|
|
|
// 根据移动距离计算缩放值,使效果更自然
|
|
|
|
|
this.moveDistance = moveDistance;
|
|
|
|
|
|
|
|
|
|
this.backgroundScale = Math.min(moveDistance * 0.2, 800); // 限制最大缩放值
|
|
|
|
|
this.mtScroll = Math.min(moveDistance * 0.2, 800);
|
|
|
|
|
}
|
|
|
|
|
@ -384,13 +368,10 @@ export default {
|
|
|
|
|
// 触摸结束事件
|
|
|
|
|
onTouchEnd() {
|
|
|
|
|
let that = this;
|
|
|
|
|
|
|
|
|
|
that.isTouching = false;
|
|
|
|
|
const animationDuration = 300; // 动画持续时间(ms)
|
|
|
|
|
const frameDuration = 16; // 每帧间隔(约60fps)
|
|
|
|
|
const totalFrames = Math.ceil(animationDuration / frameDuration);
|
|
|
|
|
// that.moveDistance = 0;
|
|
|
|
|
// that.backgroundScale = 0;
|
|
|
|
|
let currentFrame = 0;
|
|
|
|
|
const startScale = that.backgroundScale;
|
|
|
|
|
const startScroll = that.mtScroll;
|
|
|
|
|
@ -399,12 +380,10 @@ export default {
|
|
|
|
|
const progress = Math.min(currentFrame / totalFrames, 1);
|
|
|
|
|
const easeOutQuart = 1 - Math.pow(1 - progress, 4);
|
|
|
|
|
that.backgroundScale = startScale * (1 - easeOutQuart);
|
|
|
|
|
that.moveDistance = startScale * (1 - easeOutQuart);
|
|
|
|
|
that.mtScroll = startScroll * (1 - easeOutQuart);
|
|
|
|
|
if (progress < 1) {
|
|
|
|
|
setTimeout(animate, frameDuration);
|
|
|
|
|
} else {
|
|
|
|
|
that.moveDistance = 0;
|
|
|
|
|
that.backgroundScale = 0;
|
|
|
|
|
that.mtScroll = 0;
|
|
|
|
|
}
|
|
|
|
|
|