diff --git a/pages/index/index.vue b/pages/index/index.vue
index fc41918e..8cd7fd71 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -9,7 +9,7 @@
-
+
@@ -451,24 +451,26 @@
},
// 页面滚动监听
- onPageScroll(e) {
- var top = e.scrollTop > 35 ? 35 : e.scrollTop;
- var num = top*7;
- var base = 230;
- // #ifdef MP-ALIPAY
- base = 235
- // #endif
- // #ifdef H5 || APP
- var len = (this.right_icon_list || []).length;
- base = (len <= 0) ? 0 : 66*len;
- // #endif
- // 开启哀悼插件的时候不需要浮动导航并且搜索框也不需要缩短、开启站点灰度会导致浮动失效
- if((this.plugins_mourning_data || 0) != 1) {
- var val = (num > base) ? base : num;
- this.setData({
- search_style: 'width: calc(100% - '+val+'rpx);',
- search_is_fixed: (top >= 35) ? 1 : 0,
- });
+ onPageScroll(e) {
+ if(this.common_app_is_header_nav_fixed == 1 && this.common_app_is_enable_search == 1) {
+ var top = e.scrollTop > 35 ? 35 : e.scrollTop;
+ var num = top*7;
+ var base = 230;
+ // #ifdef MP-ALIPAY
+ base = 235
+ // #endif
+ // #ifdef H5 || APP
+ var len = (this.right_icon_list || []).length;
+ base = (len <= 0) ? 0 : 66*len;
+ // #endif
+ // 开启哀悼插件的时候不需要浮动导航并且搜索框也不需要缩短、开启站点灰度会导致浮动失效
+ if((this.plugins_mourning_data || 0) != 1) {
+ var val = (num > base) ? base : num;
+ this.setData({
+ search_style: 'width: calc(100% - '+val+'rpx);',
+ search_is_fixed: (top >= 35) ? 1 : 0,
+ });
+ }
}
},