diff --git a/components/diy/diy.vue b/components/diy/diy.vue
index 1e3a8493..5b08aef2 100644
--- a/components/diy/diy.vue
+++ b/components/diy/diy.vue
@@ -545,7 +545,7 @@
// 判断顶部导航是否置顶
// #ifdef H5 || MP-TOUTIAO
if (!this.is_header_top) {
- if (e.detail.scrollTop >= this.sticky_top + 33 + (is_search_alone_row ? 0 : 33 + data_alone_row_space)) {
+ if (e.detail.scrollTop >= this.sticky_top + 33 + (this.is_search_alone_row ? 0 : 33 + this.data_alone_row_space)) {
this.setData({
temp_sticky_top: 0,
temp_header_top: 0,
diff --git a/components/diy/header.vue b/components/diy/header.vue
index 67005b6a..3e6ca3d7 100644
--- a/components/diy/header.vue
+++ b/components/diy/header.vue
@@ -25,7 +25,15 @@
-
+
+
+
+
+
+
+
+
+
{{ form.content.title }}
@@ -49,9 +57,12 @@
-
+
+
+
+
@@ -62,9 +73,12 @@
-
+
+
+
+
@@ -96,6 +110,7 @@
import componentDiySearch from '@/components/diy/search';
import imageEmpty from '@/components/diy/modules/image-empty';
import componentChoiceLocation from '@/components/choice-location/choice-location';
+ import componentBadge from '@/components/badge/badge';
import { isEmpty, background_computer, gradient_computer } from '@/common/js/common/common.js';
// 状态栏高度
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
@@ -122,6 +137,7 @@
componentDiySearch,
imageEmpty,
componentChoiceLocation,
+ componentBadge
},
data() {
return {
@@ -156,6 +172,8 @@
// #endif
// 判断是否是沉浸模式
is_immersion_model: false,
+ up_slide_opacity: '',
+ up_slide_old_logo_style: '',
up_slide_style: '',
up_slide_img_style: '',
// 当前页面是否在底部菜单中
@@ -169,19 +187,22 @@
watch: {
// 监听滚动距离
propScrollTop(newVal) {
- const { up_slide_background_color_list, up_slide_background_direction, up_slide_background_img, up_slide_background_img_style } = this.propValue.style || {};
- // 渐变
- 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 up_slide_opacity = 'opacity:' + ((newVal - 20) / (this.header_top + 33) > 1 ? 1 : ((newVal - 20) / (this.header_top + 33)).toFixed(2)) + ';'
- this.setData({
- up_slide_opacity: up_slide_opacity,
- up_slide_old_logo_style: 'opacity:' + ((newVal - 5) / (this.header_top + 33) > 1 ? 1 : ((newVal - 5) / (this.header_top + 33)).toFixed(2)) + ';',
- // 20是大小误差
- up_slide_style: gradient_computer(gradient) + up_slide_opacity,
- up_slide_img_style: background_computer(back),
- });
+ const { up_slide_background_color_list, up_slide_background_direction, up_slide_background_img, up_slide_background_img_style, up_slide_display } = this.propValue.style || {};
+ if (up_slide_display == '1') {
+ // 渐变
+ 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 up_slide_opacity = 'opacity:' + ((newVal - 20) / (this.header_top + 33) > 1 ? 1 : ((newVal - 20) / (this.header_top + 33)).toFixed(2)) + ';';
+ this.setData({
+ up_slide_opacity: up_slide_opacity,
+ // 原来的logo要比新的隐藏的快,所以要比原来的logo快一点
+ up_slide_old_logo_style: 'opacity:' + ((newVal - 5) / (this.header_top + 33) > 1 ? 0 : (1 - (newVal - 5) / (this.header_top + 33)).toFixed(2)) + ';',
+ // 20是大小误差
+ up_slide_style: gradient_computer(gradient) + up_slide_opacity,
+ up_slide_img_style: background_computer(back),
+ });
+ }
},
propKey(val) {
if ((this.propValue || null) !== null) {
@@ -291,7 +312,7 @@
.model-head {
.model-head-content {
height: 66rpx;
- overflow: hidden;
+ // overflow: hidden;
top: -1rpx;
/* #ifdef H5 || MP-TOUTIAO */
top: 4rpx;
@@ -326,4 +347,8 @@
.up_slide_bg {
z-index: -1;
}
+ .badge-style {
+ top: -20rpx;
+ right: 5rpx;
+ }