Merge branch 'dev-sws' into dev-yxl
commit
e46f04034b
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 文章列表 -->
|
<!-- 文章列表 -->
|
||||||
<view class="article-tabs ou" :class="'article-tabs-' + propKey" :style="style_container">
|
<view class="article-tabs ou" :class="'article-tabs-' + propKey" :style="style_container">
|
||||||
<view class="flex-col ou" :style="style_img_container">
|
<view class="ou" :style="style_img_container">
|
||||||
<componentDiyModulesTabsView :propValue="article_tabs" :propIsTop="top_up == '1'" :propTop="propTop" :propStyle="tabs_style" :propsTabsContainer="tabs_container" :propsTabsImgContainer="tabs_img_container" :propCustomNavHeight="propCustomNavHeight * 2 + 'rpx'" :propTabsBackground="tabs_background" @onTabsTap="tabs_click_event"></componentDiyModulesTabsView>
|
<componentDiyModulesTabsView :propValue="article_tabs" :propIsTop="top_up == '1'" :propTop="propTop" :propStyle="tabs_style" :propsTabsContainer="tabs_container" :propsTabsImgContainer="tabs_img_container" :propCustomNavHeight="propCustomNavHeight * 2 + 'rpx'" :propTabsBackground="tabs_background" @onTabsTap="tabs_click_event"></componentDiyModulesTabsView>
|
||||||
<view :style="article_container">
|
<view :style="article_container">
|
||||||
<view :style="article_img_container">
|
<view :style="article_img_container">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<scroll-view :scroll-y="true" class="ht" @scroll="on_scroll_event" @scrolltolower="on_scroll_lower_event" lower-threshold="60">
|
<scroll-view :scroll-y="true" class="ht" @scroll="on_scroll_event" @scrolltolower="on_scroll_lower_event" lower-threshold="60">
|
||||||
<!-- 头部小程序兼容 -->
|
<!-- 头部小程序兼容 -->
|
||||||
<view class="pr header">
|
<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>
|
||||||
<view :style="content_padding">
|
<view :style="content_padding">
|
||||||
<view class="content flex-col" :style="'padding-top:' + (temp_is_header_top ? temp_header_top : '0')">
|
<view class="content flex-col" :style="'padding-top:' + (temp_is_header_top ? temp_header_top : '0')">
|
||||||
|
|
@ -254,6 +254,7 @@
|
||||||
outer_container_padding: 0,
|
outer_container_padding: 0,
|
||||||
|
|
||||||
// 滚动延迟器
|
// 滚动延迟器
|
||||||
|
head_scroll_top: 0,
|
||||||
scroll_throttle_timeout: null,
|
scroll_throttle_timeout: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -567,10 +568,13 @@
|
||||||
// 页面滚动事件
|
// 页面滚动事件
|
||||||
on_scroll_event(e) {
|
on_scroll_event(e) {
|
||||||
const scroll_num = e.detail.scrollTop;
|
const scroll_num = e.detail.scrollTop;
|
||||||
if ((scroll_num - 20) / (this.sticky_top + 33) <= 1) {
|
if (scroll_num / (this.sticky_top + 33) <= 1) {
|
||||||
// 更新数据的逻辑
|
// 更新数据的逻辑
|
||||||
this.scroll_top = scroll_num;
|
this.head_scroll_top = scroll_num;
|
||||||
|
} else {
|
||||||
|
this.head_scroll_top = this.sticky_top + 100;
|
||||||
}
|
}
|
||||||
|
this.scroll_top = scroll_num;
|
||||||
this.scroll_timer_compute(scroll_num);
|
this.scroll_timer_compute(scroll_num);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="goods-tabs ou" :class="'goods-tabs-' + propKey" :style="style_container">
|
<view class="goods-tabs ou" :class="'goods-tabs-' + propKey" :style="style_container">
|
||||||
<view class="flex-col ou" :style="style_img_container">
|
<view class="ou" :style="style_img_container">
|
||||||
<componentDiyModulesTabsView :propValue="goods_tabs" :propIsTop="top_up == '1'" :propTop="propTop" :propStyle="tabs_style" :propsTabsContainer="tabs_container" :propsTabsImgContainer="tabs_img_container" :propCustomNavHeight="propCustomNavHeight * 2 + 'rpx'" :propTabsBackground="tabs_background" @onTabsTap="tabs_click_event"></componentDiyModulesTabsView>
|
<componentDiyModulesTabsView :propValue="goods_tabs" :propIsTop="top_up == '1'" :propTop="propTop" :propStyle="tabs_style" :propsTabsContainer="tabs_container" :propsTabsImgContainer="tabs_img_container" :propCustomNavHeight="propCustomNavHeight * 2 + 'rpx'" :propTabsBackground="tabs_background" @onTabsTap="tabs_click_event"></componentDiyModulesTabsView>
|
||||||
<view :style="shop_container">
|
<view :style="shop_container">
|
||||||
<view :style="shop_img_container">
|
<view :style="shop_img_container">
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,10 @@
|
||||||
const gradient = { color_list: up_slide_background_color_list, direction: up_slide_background_direction };
|
const gradient = { color_list: up_slide_background_color_list, direction: up_slide_background_direction };
|
||||||
// 背景图
|
// 背景图
|
||||||
const back = { background_img: up_slide_background_img, background_img_style: up_slide_background_img_style };
|
const back = { background_img: up_slide_background_img, background_img_style: up_slide_background_img_style };
|
||||||
const up_slide_opacity = 'opacity:' + ((newVal - 20) / (this.header_top + 33) > 1 ? 1 : ((newVal - 20) / (this.header_top + 33)).toFixed(2)) + ';';
|
const up_slide_opacity = 'opacity:' + ((newVal - 20) / this.header_top > 1 ? 1 : ((newVal - 20) / this.header_top).toFixed(2)) + ';';
|
||||||
this.up_slide_opacity = up_slide_opacity;
|
this.up_slide_opacity = up_slide_opacity;
|
||||||
// 来的logo要比新的隐藏的快,所以要比原来的logo快一点
|
// 来的logo要比新的隐藏的快,所以要比原来的logo快一点
|
||||||
this.up_slide_old_logo_style = 'opacity:' + ((newVal - 5) / (this.header_top + 33) > 1 ? 0 : (1 - (newVal - 5) / (this.header_top + 33)).toFixed(2)) + ';';
|
this.up_slide_old_logo_style = 'opacity:' + ((newVal - 5) / this.header_top > 1 ? 0 : (1 - (newVal - 5) / this.header_top).toFixed(2)) + ';';
|
||||||
// =0是大小误差
|
// =0是大小误差
|
||||||
this.up_slide_style = gradient_computer(gradient) + up_slide_opacity;
|
this.up_slide_style = gradient_computer(gradient) + up_slide_opacity;
|
||||||
this.up_slide_img_style = background_computer(back);
|
this.up_slide_img_style = background_computer(back);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue