1.diy滚动监听优化

master
sws 2024-12-26 17:07:20 +08:00
parent 096b85b73c
commit f8d5da258c
2 changed files with 7 additions and 5 deletions

View File

@ -7,10 +7,10 @@
data: {
//
//
request_url:'https://d1.shopxo.vip/',
request_url:'https://new.shopxo.vip/',
// publicpublichttps://d1.shopxo.vip/public/
static_url:'https://d1.shopxo.vip/',
static_url:'https://new.shopxo.vip/',
// default
system_type: 'default',

View File

@ -4,7 +4,7 @@
<scroll-view :scroll-y="true" class="ht" @scroll="on_scroll_event" @scrolltolower="on_scroll_lower_event" lower-threshold="60">
<!-- 头部小程序兼容 -->
<view class="pr header">
<componentDiyHeader :propKey="header_data.id" :propValue="header_data.com_data" :propScrollTop="scroll_top" @onImmersionModelCallBack="immersion_model_call_back" @onLocationBack="choice_location_back"></componentDiyHeader>
<componentDiyHeader :propKey="header_data.id" :propValue="header_data.com_data" :propScrollTop="head_scroll_top" @onImmersionModelCallBack="immersion_model_call_back" @onLocationBack="choice_location_back"></componentDiyHeader>
</view>
<view :style="content_padding">
<view class="content flex-col" :style="'padding-top:' + (temp_is_header_top ? temp_header_top : '0')">
@ -254,6 +254,7 @@
outer_container_padding: 0,
//
head_scroll_top: 0,
scroll_throttle_timeout: null,
};
},
@ -569,10 +570,11 @@
const scroll_num = e.detail.scrollTop;
if (scroll_num / (this.sticky_top + 33) <= 1) {
//
this.scroll_top = scroll_num;
this.head_scroll_top = scroll_num;
} else {
this.scroll_top = this.sticky_top + 100;
this.head_scroll_top = this.sticky_top + 100;
}
this.scroll_top = scroll_num;
this.scroll_timer_compute(scroll_num);
},