Browse Source

h5搜索左右滑动bug

luyanan 7 years ago
parent
commit
8efbb04397
2 changed files with 26 additions and 7 deletions
  1. 2 2
      css/share.css
  2. 24 5
      js/search_h5.js

+ 2 - 2
css/share.css

6
.logoA{width:24%; height: auto;position: absolute;left:50%;margin-left:-12%;top:6%;z-index: 2}
6
.logoA{width:24%; height: auto;position: absolute;left:50%;margin-left:-12%;top:6%;z-index: 2}
7
.bannerA img{display:block;margin-top:10%;}
7
.bannerA img{display:block;margin-top:10%;}
8
.search-wrap{position: absolute;bottom: 16px;height: 40px;padding: 0 10px;width: 96%;left:50%;margin-left: -48%;
8
.search-wrap{position: absolute;bottom: 16px;height: 40px;padding: 0 10px;width: 96%;left:50%;margin-left: -48%;
9
    background: rgba(255, 255, 255, .95);border-radius: 5px;overflow: hidden;}
9
    background: rgba(255, 255, 255, 1);border-radius: 5px;overflow: hidden;}
10
.search-wrap .search-icon{margin: 10px 4px;}
10
.search-wrap .search-icon{margin: 10px 4px;}
11
.search-wrap .search-input{position: absolute;left:0;top:0;width:100%;padding:0 10px 0 40px;font-size:14px;background:none;height:40px;line-height:40px;border:none}
11
.search-wrap .search-input{position: absolute;left:0;top:0;width:100%;padding:0 10px 0 40px;font-size:14px;background:none;height:40px;line-height:24px;border:none}
12
12
13
.iconfontnew{display: inline-block;width: 18px;height: 18px;*margin-right: .3em;line-height: 18px;vertical-align: text-top;
13
.iconfontnew{display: inline-block;width: 18px;height: 18px;*margin-right: .3em;line-height: 18px;vertical-align: text-top;
14
  background-position: center center; background-repeat: no-repeat;background-size: cover;}
14
  background-position: center center; background-repeat: no-repeat;background-size: cover;}

+ 24 - 5
js/search_h5.js

106
                	}
106
                	}
107
                	tabToFun(item)
107
                	tabToFun(item)
108
                }, 300);
108
                }, 300);
109
            }
110
            if(mySwiper.translate >= 50) {
111
                setTimeout(function() {
112
                    //刷新操作
113
                    mySwiper.update(); // 重新计算高度;
114
                }, 1000);
115
            }else if(mySwiper.translate >= 0 && mySwiper.translate < 50){
116

109
            }
117
            }
110
            return false;
118
            return false;
111
		}
119
		}
130
				$("#sele").addClass("displayNone");
138
				$("#sele").addClass("displayNone");
131
				$("#searB").removeClass("searchboxNewT");
139
				$("#searB").removeClass("searchboxNewT");
132
			}
140
			}
141
			
133
		}
142
		}
134
	});
143
	});
135
	var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
144
	var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
736
			})
745
			})
737
		},
746
		},
738
		clearToFun=function(sortN){
747
		clearToFun=function(sortN){
739
			$(objSort[sortN].conbox).html("");
748
			//$(objSort[sortN].conbox).html("");
740
			$('.w').css('transform', 'translate3d(0px, 0px, 0px)')
749
			$('.w').css('transform', 'translate3d(0px, 0px, 0px)')
741
			$('.swiper-container2 .swiper-slide-active').css('height','auto').siblings('.swiper-slide').css('height','0px');
750
			$('.swiper-container2 .swiper-slide-active').css('height','auto').siblings('.swiper-slide').css('height','0px');
742
			mySwiper.update();
751
			mySwiper.update();
778
			
787
			
779
			if(item==1 && tabLoad){
788
			if(item==1 && tabLoad){
780
				expertBox();
789
				expertBox();
790
				$(".loadtip").html('上拉加载更多');
791
				mySwiper.update(); 
781
			}else if(item==2 && tabLoad){
792
			}else if(item==2 && tabLoad){
782
				resourceListVal();
793
				resourceListVal();
794
				$(".loadtip").html('上拉加载更多');
795
				mySwiper.update(); 
783
			}else if(item==3 && tabLoad){
796
			}else if(item==3 && tabLoad){
784
				articalListVal();
797
				articalListVal();
798
				$(".loadtip").html('上拉加载更多');
799
				mySwiper.update();
785
			}else if(item==4 && tabLoad){
800
			}else if(item==4 && tabLoad){
786
				patentListVal();
801
				patentListVal();
802
				$(".loadtip").html('上拉加载更多');
803
				mySwiper.update();
787
			}else if(item==5 && tabLoad){
804
			}else if(item==5 && tabLoad){
788
				paperListVal();
805
				paperListVal();
806
				$(".loadtip").html('上拉加载更多');
807
				mySwiper.update();
789
			}else if(item==6 && tabLoad){
808
			}else if(item==6 && tabLoad){
790
				companyListVal();
809
				companyListVal();
810
				$(".loadtip").html('上拉加载更多');
811
				mySwiper.update();
791
			}else if(item==7 && tabLoad){
812
			}else if(item==7 && tabLoad){
792
				serviceListVal();
813
				serviceListVal();
793
			}
794
			if(tabLoad){
795
				$(".loadtip").html('上拉加载更多...');
796
				mySwiper.update(); // 重新计算高度;
814
				$(".loadtip").html('上拉加载更多');
815
				mySwiper.update();
797
			}
816
			}
798
		},
817
		},
799
		bindComEvent=function(){
818
		bindComEvent=function(){