|
|
|
|
@ -1,8 +1,35 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou">
|
|
|
|
|
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou" style="position: fixed; top: 0; left: 0; ">
|
|
|
|
|
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar>
|
|
|
|
|
<view class="u-navbar-fixed" style="background-color: #caf1e0 !important; height: 160px"></view>
|
|
|
|
|
<div class style="background-color: #caf1e0 !important">
|
|
|
|
|
<scroll-view
|
|
|
|
|
class="scroll-container"
|
|
|
|
|
:scroll-y="true"
|
|
|
|
|
:refresher-enabled="false"
|
|
|
|
|
:refresher-triggered="false"
|
|
|
|
|
@touchstart="onTouchStart"
|
|
|
|
|
@touchmove="onTouchMove"
|
|
|
|
|
@touchend="onTouchEnd"
|
|
|
|
|
>
|
|
|
|
|
<view class="background-container"
|
|
|
|
|
style="width: 100%;overflow: hidden;"
|
|
|
|
|
>
|
|
|
|
|
<view class="background-container"
|
|
|
|
|
style="width: 100%;overflow: hidden;"
|
|
|
|
|
>
|
|
|
|
|
<view class="u-navbar-fixed"
|
|
|
|
|
:style="{
|
|
|
|
|
'background-image': '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.78).toFixed(2) + 'vw + ' + backgroundScale + 'px)',
|
|
|
|
|
'zoom': (1 + backgroundScale * 0.005)
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<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="g_flex_row_start">
|
|
|
|
|
<view class="g_w_71">
|
|
|
|
|
@ -95,6 +122,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</scroll-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">
|
|
|
|
|
<div class="g_fs_17 g_text_c">
|
|
|
|
|
@ -131,6 +159,9 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
numSlot: [],
|
|
|
|
|
fromShare: false,
|
|
|
|
|
background:{
|
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
|
},
|
|
|
|
|
navColor: "rgb(255,255,255,0)",
|
|
|
|
|
isLogin: null,
|
|
|
|
|
isShowMore: true,
|
|
|
|
|
@ -205,6 +236,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
disabled: false,
|
|
|
|
|
inviteUserId: 0,
|
|
|
|
|
|
|
|
|
|
refreshing: false,
|
|
|
|
|
mtScroll:0,
|
|
|
|
|
backgroundScale: 0, // 背景缩放比例
|
|
|
|
|
startY: 0, // 触摸起始位置
|
|
|
|
|
moveY: 0, // 触摸移动位置
|
|
|
|
|
isTouching: false, // 是否正在触摸
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onPageScroll(e) {
|
|
|
|
|
@ -284,6 +322,47 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 触摸开始事件
|
|
|
|
|
onTouchStart(e) {
|
|
|
|
|
this.mtScroll = 0;
|
|
|
|
|
this.backgroundScale = 0;
|
|
|
|
|
this.isTouching = true;
|
|
|
|
|
if (e.touches && e.touches.length > 0) {
|
|
|
|
|
this.startY = e.touches[0].pageY;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 触摸移动事件
|
|
|
|
|
onTouchMove(e) {
|
|
|
|
|
if (!this.isTouching) return;
|
|
|
|
|
|
|
|
|
|
if (e.touches && e.touches.length > 0) {
|
|
|
|
|
this.moveY = e.touches[0].pageY;
|
|
|
|
|
const query = uni.createSelectorQuery().in(this);
|
|
|
|
|
query.select('.scroll-container').boundingClientRect(data => {
|
|
|
|
|
if (data) {
|
|
|
|
|
const scrollTop = data.scrollTop || 0;
|
|
|
|
|
if (scrollTop <= 0 && this.moveY > this.startY) {
|
|
|
|
|
const pullDistance = this.moveY - this.startY;
|
|
|
|
|
this.backgroundScale++;
|
|
|
|
|
this.mtScroll++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).exec();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 触摸结束事件
|
|
|
|
|
onTouchEnd() {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.isTouching = false;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// 恢复原始大小
|
|
|
|
|
that.backgroundScale = 0;
|
|
|
|
|
that.mtScroll = 0
|
|
|
|
|
}, 100);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
goHome() {
|
|
|
|
|
if (this.fromShare) {
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
@ -730,4 +809,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.scroll-area {
|
|
|
|
|
height: 100vh;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|