添加左侧锚点滚动

master
jscyl13849007907 2 years ago
parent 34667f5efc
commit 83c8c25c1d

@ -334,6 +334,8 @@ Page({
} }
], ],
active:0, active:0,
scrollInfoView:'category_0'
}, },
// onPullDownRefresh:function(){ // onPullDownRefresh:function(){
// this.getJobList(); // this.getJobList();
@ -347,9 +349,13 @@ Page({
// }, // },
handleTab(e){ handleTab(e){
console.log('点击tab',e) console.log('点击tab',e)
this.setData({ this.setData({
active:e.currentTarget.dataset.active active:e.currentTarget.dataset.active,// tab切换
}) scrollInfoView:'category_' + e.currentTarget.dataset.active // 右侧锚点滚动
});
console.log(this.data.scrollInfoView)
}, },
goLogin() { goLogin() {
wx.setStorageSync("comeFromPage", "index"); wx.setStorageSync("comeFromPage", "index");

@ -12,8 +12,112 @@
</view> </view>
<!-- 右 --> <!-- 右 -->
<view class="g_flex_1" style='background-color:#fff;'> <view class="g_flex_1" style='background-color:#fff;'>
<scroll-view class="standardList" scroll-x="true" scroll-y="true" style="padding-top: 0;height:100vh"> <scroll-view class="standardList category-obj"
<view> scroll-x="true"
scroll-y="true"
style="padding-top: 0;height:100vh"
scroll-into-view="{{scrollInfoView}}"
scroll-with-animation="true"
>
<view class="category-child category_0" id="category_0">
<view wx:if="{{recordList != null && recordList.length > 0}}" style="padding-top: 0;">
<view class="jcenter bgf br8">
<view class="listcontainer" style="border-top: 1px solid #f3f3f3;">
<view class="jobOne" hover-start-time="50" hover-stay-time="0"
wx:for="{{recordList}}" data-id="{{item.id}}" bindtap="goDetail" wx:key="index"
hover-class="{{item.recruitment == '1' ? 'ahover':''}}"
style="background-color:{{item.recruitment == '1' ? '#fff':'#f5f5f5'}};border-bottom: {{item.recruitment == '1' ? '':'1px solid #ddd'}};">
<view class="p1020 jobIn" hover-class="none">
<view class="display-flex">
<view class="flex-1 vsb">
<view class="display-flex">
<view class="storeName" style="font-size: 14px;">分类1--{{item.jobName || item.aliasName}}</view>
<view class="hourPay" style="font-size: 14px;">{{item.salaryClassifyValue}}</view>
</view>
<view class="v-center mt12 mb12">
<view class="f12 c045 flex-1 display-flex">
<view hover-class="none" hover-stop-propagation="false" style="max-width:220px;">
<view class="overText fl" style="max-width: 150px;">
{{item.district == "" ?'':item.district}}
</view>
<view class="fl ml4" wx:if="{{item.distance != null && item.distance != '' && storeJobListSearchForm.sortTag == 2}}"> {{ ' | ' + item.distanceKm}}</view>
<view class="fl ml4" wx:else>{{' | ' +item.age}}</view>
</view>
<!-- <view class="fr f14s fw400" style="color: var(--color-f40);">{{item.monthlyPay}}</view> -->
</view>
</view>
<view class="display-flex">
<scroll-view scroll-x="{{true}}" catchscroll="scroll" bindtap="stoptap" class="tttg">
<view class="tagsLi" wx:for="{{item.jobSpecialLabelNameArray}}" wx:for-item="item1" wx:key="index">{{item1}}</view>
<view class="tagsLi" wx:if="{{item.jobSpecialLabelNameArray.length <= 0}}">暂无特色</view>
</scroll-view>
<block wx:if="{{item.state == 1 && item.recruitment == 2}}">
<view class="miniBtn disabled" hover-stop-propagation="false">立即报名</view>
</block>
<block wx:else>
<view class="miniBtn" catchtap="recordBill" data-job="{{item}}" hover-class="thover"
hover-stop-propagation="false">立即报名</view>
</block>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="category-child category_1" id="category_1">
<view wx:if="{{recordList != null && recordList.length > 0}}" style="padding-top: 0;">
<view class="jcenter bgf br8">
<view class="listcontainer" style="border-top: 1px solid #f3f3f3;">
<view class="jobOne" hover-start-time="50" hover-stay-time="0"
wx:for="{{recordList}}" data-id="{{item.id}}" bindtap="goDetail" wx:key="index"
hover-class="{{item.recruitment == '1' ? 'ahover':''}}"
style="background-color:{{item.recruitment == '1' ? '#fff':'#f5f5f5'}};border-bottom: {{item.recruitment == '1' ? '':'1px solid #ddd'}};">
<view class="p1020 jobIn" hover-class="none">
<view class="display-flex">
<view class="flex-1 vsb">
<view class="display-flex">
<view class="storeName" style="font-size: 14px;">分类2--{{item.jobName || item.aliasName}}</view>
<view class="hourPay" style="font-size: 14px;">{{item.salaryClassifyValue}}</view>
</view>
<view class="v-center mt12 mb12">
<view class="f12 c045 flex-1 display-flex">
<view hover-class="none" hover-stop-propagation="false" style="max-width:220px;">
<view class="overText fl" style="max-width: 150px;">
{{item.district == "" ?'':item.district}}
</view>
<view class="fl ml4" wx:if="{{item.distance != null && item.distance != '' && storeJobListSearchForm.sortTag == 2}}"> {{ ' | ' + item.distanceKm}}</view>
<view class="fl ml4" wx:else>{{' | ' +item.age}}</view>
</view>
<!-- <view class="fr f14s fw400" style="color: var(--color-f40);">{{item.monthlyPay}}</view> -->
</view>
</view>
<view class="display-flex">
<scroll-view scroll-x="{{true}}" catchscroll="scroll" bindtap="stoptap" class="tttg">
<view class="tagsLi" wx:for="{{item.jobSpecialLabelNameArray}}" wx:for-item="item1" wx:key="index">{{item1}}</view>
<view class="tagsLi" wx:if="{{item.jobSpecialLabelNameArray.length <= 0}}">暂无特色</view>
</scroll-view>
<block wx:if="{{item.state == 1 && item.recruitment == 2}}">
<view class="miniBtn disabled" hover-stop-propagation="false">立即报名</view>
</block>
<block wx:else>
<view class="miniBtn" catchtap="recordBill" data-job="{{item}}" hover-class="thover"
hover-stop-propagation="false">立即报名</view>
</block>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="category-child category_2" id="category_2">
<view wx:if="{{recordList != null && recordList.length > 0}}" style="padding-top: 0;"> <view wx:if="{{recordList != null && recordList.length > 0}}" style="padding-top: 0;">
<view class="jcenter bgf br8"> <view class="jcenter bgf br8">
<view class="listcontainer" style="border-top: 1px solid #f3f3f3;"> <view class="listcontainer" style="border-top: 1px solid #f3f3f3;">
@ -25,7 +129,7 @@
<view class="display-flex"> <view class="display-flex">
<view class="flex-1 vsb"> <view class="flex-1 vsb">
<view class="display-flex"> <view class="display-flex">
<view class="storeName" style="font-size: 14px;">{{item.jobName || item.aliasName}}</view> <view class="storeName" style="font-size: 14px;">分类3--{{item.jobName || item.aliasName}}</view>
<view class="hourPay" style="font-size: 14px;">{{item.salaryClassifyValue}}</view> <view class="hourPay" style="font-size: 14px;">{{item.salaryClassifyValue}}</view>
</view> </view>
<view class="v-center mt12 mb12"> <view class="v-center mt12 mb12">

Loading…
Cancel
Save