Compare commits

...

2 Commits

@ -4,7 +4,7 @@
<!-- 页面初始化的过程中sessionList编译到小程序和h5出现sessionList为undefined的情况即使给了默认值为空数组故在此处进行判断 --> <!-- 页面初始化的过程中sessionList编译到小程序和h5出现sessionList为undefined的情况即使给了默认值为空数组故在此处进行判断 -->
<div class="conversation-list-wrapper " v-if="conversationList && conversationList.length > 0"> <div class="conversation-list-wrapper " v-if="conversationList && conversationList.length > 0">
<!-- 此处的key如果用session.id会在ios上渲染存在问题会出现会话列表显示undefined --> <!-- 此处的key如果用session.id会在ios上渲染存在问题会出现会话列表显示undefined -->
<div v-for="(conversation, index) in conversationList" class="" style="min-height:72px" :key="conversation.renderKey"> <div v-for="(conversation, index) in conversationList" class="ConversationItem" style="min-height:72px" :key="conversation.renderKey">
<ConversationItem :key="conversation.renderKey" :loading="loading" <ConversationItem :key="conversation.renderKey" :loading="loading"
:showMoreActions="currentMoveSessionId === conversation.conversationId" :showMoreActions="currentMoveSessionId === conversation.conversationId"
:conversation="conversation" :conversation="conversation"
@ -354,4 +354,12 @@ onUnmounted(() => {
width: 100%; width: 100%;
height: 72px; height: 72px;
} }
.ConversationItem:first-child{
border-radius: 6px 6px 0 0 ;
overflow: hidden;
}
.ConversationItem:last-child{
border-radius: 0 0 6px 6px;
overflow: hidden;
}
</style> </style>

@ -3,23 +3,33 @@
<g-loading text="加载中..."></g-loading> <g-loading text="加载中..."></g-loading>
</div> </div>
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou" v-if="showPage"> <div class="p-root-detail-user g_w_all g_bg_page g_kuaishou" v-if="showPage">
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar> <view class="background-container g_position_fixed" style="width: 100%; overflow: hidden; z-index: 0">
<view class="scroll-container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd">
<view class="background-container" style="width: 100%; overflow: hidden">
<view <view
class="u-navbar-fixed" class="u-navbar-fixed"
:style="{ :style="{
'background-image': info.supplierAccountCoverUrl ? `url(${info.supplierAccountCoverUrl})` : 'url(https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/mbg.jpg)', 'background-image': info.supplierAccountCoverUrl ? `url(${info.supplierAccountCoverUrl})` : 'url(https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/mbg.jpg)',
'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.2).toFixed(2) + 'vw + ' + moveDistance + 'px)',
'transform-origin': '50% 0%', 'transform-origin': '50% 0%',
transform: `scale(${1 + backgroundScale * 0.008})`, transform: `scale(${1 + backgroundScale * 0.008})`,
}" }"
> >
</view> </view>
</view> </view>
<div class="con-obj" style="background-color: #caf1e0 !important"> <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%',
transform: `scale(${1 + backgroundScale * 0.008})`,
}"
>
</view>
<div class="con-obj g_position_rela" 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="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_flex_row_start">
<view class="g_w_71"> <view class="g_w_71">
@ -107,7 +117,7 @@
</div> </div>
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="g_h_all"> <div class="g_h_all g_bg_f_5">
<div v-if="jobDetailShow || jobDetailShow == 'true'"> <div v-if="jobDetailShow || jobDetailShow == 'true'">
<!-- 正常职位 --> <!-- 正常职位 -->
<div class="m-detail"> <div class="m-detail">
@ -121,7 +131,7 @@
</div> </div>
</div> </div>
</div> </div>
</view> </scroll-view>
<applyFlow ref="applyFlow" @updateInfo="updateInfo" :userInfo="userInfo" :shareAgencyId="uid" :agencyInfo="agencyInfo"></applyFlow> <applyFlow ref="applyFlow" @updateInfo="updateInfo" :userInfo="userInfo" :shareAgencyId="uid" :agencyInfo="agencyInfo"></applyFlow>
</div> </div>
</template> </template>
@ -229,6 +239,7 @@ export default {
refreshing: false, refreshing: false,
mtScroll: 0, mtScroll: 0,
moveDistance: 0,
backgroundScale: 0, // backgroundScale: 0, //
startY: 0, // startY: 0, //
moveY: 0, // moveY: 0, //
@ -327,9 +338,12 @@ export default {
methods: { methods: {
// //
onTouchStart(e) { onTouchStart(e) {
if(this.isTouching){
return false
}
this.isTouching = true;
this.mtScroll = 0; this.mtScroll = 0;
this.backgroundScale = 0; this.backgroundScale = 0;
this.isTouching = true;
if (e.touches && e.touches.length > 0) { if (e.touches && e.touches.length > 0) {
this.startY = e.touches[0].pageY; this.startY = e.touches[0].pageY;
} }
@ -342,9 +356,9 @@ 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 moveDistance = this.moveY - this.startY; const moveDistance = this.moveY - this.startY;
// && moveDistance < 200
// moveDistance > 0 // moveDistance > 0
if (moveDistance > 0 && moveDistance < 200) { if (moveDistance > 0) {
// //
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query query
@ -355,6 +369,8 @@ export default {
// //
if (scrollTop <= 0) { if (scrollTop <= 0) {
// 使 // 使
this.moveDistance = moveDistance;
this.backgroundScale = Math.min(moveDistance * 0.2, 800); // this.backgroundScale = Math.min(moveDistance * 0.2, 800); //
this.mtScroll = Math.min(moveDistance * 0.2, 800); this.mtScroll = Math.min(moveDistance * 0.2, 800);
} }
@ -368,10 +384,13 @@ export default {
// //
onTouchEnd() { onTouchEnd() {
let that = this; let that = this;
that.isTouching = false; that.isTouching = false;
const animationDuration = 300; // (ms) const animationDuration = 300; // (ms)
const frameDuration = 16; // (60fps) const frameDuration = 16; // (60fps)
const totalFrames = Math.ceil(animationDuration / frameDuration); const totalFrames = Math.ceil(animationDuration / frameDuration);
// that.moveDistance = 0;
// that.backgroundScale = 0;
let currentFrame = 0; let currentFrame = 0;
const startScale = that.backgroundScale; const startScale = that.backgroundScale;
const startScroll = that.mtScroll; const startScroll = that.mtScroll;
@ -380,10 +399,12 @@ export default {
const progress = Math.min(currentFrame / totalFrames, 1); const progress = Math.min(currentFrame / totalFrames, 1);
const easeOutQuart = 1 - Math.pow(1 - progress, 4); const easeOutQuart = 1 - Math.pow(1 - progress, 4);
that.backgroundScale = startScale * (1 - easeOutQuart); that.backgroundScale = startScale * (1 - easeOutQuart);
that.moveDistance = startScale * (1 - easeOutQuart);
that.mtScroll = startScroll * (1 - easeOutQuart); that.mtScroll = startScroll * (1 - easeOutQuart);
if (progress < 1) { if (progress < 1) {
setTimeout(animate, frameDuration); setTimeout(animate, frameDuration);
} else { } else {
that.moveDistance = 0;
that.backgroundScale = 0; that.backgroundScale = 0;
that.mtScroll = 0; that.mtScroll = 0;
} }

Loading…
Cancel
Save