wangchuanjin 7 éve
szülő
commit
c4a21e1fd6

+ 25 - 10
src/web/staticres/js/common.js

@@ -185,9 +185,9 @@ function getScrollWidth() {
   	return noScroll-scroll;
 }
 //表头固定
-var TableHeadFixed = function(className,isminus,flag){
+var TableHeadFixed = function(className,isminus,flag,pageName){
 	if(typeof(className) == "undefined"){
-		className = "tabContainer-2"
+		className = "tabContainer-2";
 	}
 	if(typeof(isminus) == "undefined"){
 		isminus = true;
@@ -200,10 +200,23 @@ var TableHeadFixed = function(className,isminus,flag){
 		cHeight = 500;
 	}
 	var thisFlag = false;
+	var prevSelectType = null;
 	$(window).scroll(function(event){
 		if(!$("#right-table").hasClass("active") && flag){
 			return;
 		}
+		//超级搜索页面增加处理逻辑
+		if(pageName == "supsearch"){
+			if(prevSelectType != selectType){
+				thisFlag = false;
+			}
+			prevSelectType = selectType;
+			if(selectType == "all"){
+				className = "tabContainer"
+			}else{
+				className = "tabContainer-2";
+			}
+		}
 		var tableHeight = $("."+className).outerHeight();
 		if(tableHeight <= cHeight){
 			return;
@@ -211,27 +224,29 @@ var TableHeadFixed = function(className,isminus,flag){
 		var offsetTop = $("."+className).offset().top;
 		var scrollTop = $(this).scrollTop();
 		var oTop = offsetTop;
+		var ooTop = offsetTop;
 		if(isminus){
 			oTop+=20;
+			ooTop-=20;
 		}
 		if(scrollTop >= oTop){
-			if(offsetTop + tableHeight - scrollTop <= cHeight){
+			if(ooTop + tableHeight - scrollTop -20 <= cHeight){
 				if(!thisFlag){
-					$(".lucene-table").addClass("tababsolute");
-					$(".lucene-table>table:first").css("top",scrollTop);
+					$("."+className+" .lucene-table").addClass("tababsolute");
+					$("."+className+" .lucene-table>table:first").css("top",scrollTop);
 				}
 				thisFlag = true;
 			}else{
 				if(thisFlag){
-					$(".lucene-table").removeClass("tababsolute");
-					$(".lucene-table>table:first").css("top",0);
+					$("."+className+" .lucene-table").removeClass("tababsolute");
+					$("."+className+" .lucene-table>table:first").css("top",0);
 				}
 				thisFlag = false;
 			}
-			$(".lucene-table").addClass("tabfixed");
+			$("."+className+" .lucene-table").addClass("tabfixed");
 		}else{
-			$(".lucene-table").removeClass("tabfixed tababsolute");
-			$(".lucene-table>table:first").css("top",0);
+			$("."+className+" .lucene-table").removeClass("tabfixed tababsolute");
+			$("."+className+" .lucene-table>table:first").css("top",0);
 			thisFlag = false;
 		}
 	});

+ 6 - 8
src/web/templates/pc/supsearch.html

@@ -816,13 +816,11 @@ $(function(){
 							</tr>
 						</thead>
 					</table>
-					<div>
-						<table>
-							<tbody>
-								
-							</tbody>
-						</table>
-					</div>
+					<table>
+						<tbody>
+							
+						</tbody>
+					</table>
 				</div>
 			</div>
 			<!--tab切换内容-->
@@ -890,7 +888,7 @@ $(function(){
 {{include "/common/baiducc.html"}}
 <script type="text/javascript">
 $(function(){
-	new TableHeadFixed();
+	new TableHeadFixed("",true,true,"supsearch");
 	new JyWebScoket.qrToLab();
 	haslogin({{.T.logid}},keys);
 	//点击超级搜索按钮

+ 17 - 0
src/web/templates/weixin/follow/set.html

@@ -14,8 +14,14 @@
 <script src="/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
 <script src="/js/jy.js?v={{Msg "seo" "version"}}"></script>
 <script>
+	var hasReload = false;
 	if(sessionStorage){
 		sessionStorage.followAddVersion="1";
+		if(!hasReload && sessionStorage.followSetReload == "1"){
+			hasReload = true;
+			sessionStorage.removeItem("followSetReload");
+			window.location.reload(true);
+		}
 	}
 	initShare({{.T.signature}},{{.T.openid}},"","jy_extend");
 </script>
@@ -39,6 +45,8 @@ var hasNoFollowPopup = null;
 $(function(){
 	$(window).bind("pageshow", function(event){
 		if(event.originalEvent.persisted){
+			sessionStorage.followSetPageshowReload = "1";
+			hasReload = true;
 			window.location.reload(true);
 		}
     });
@@ -97,6 +105,9 @@ $(function(){
 		easyPopup.hide();
 		$.post("/follow/ajaxReq",{reqType:"cancel",id:_id},function(r){
 			if(r.status == "y"){
+				if(sessionStorage){
+					sessionStorage.followSetReload = "1";
+				}
 				EasyAlert.show("已取消<br>关注");
 				pageJump();
 			}else{
@@ -508,6 +519,9 @@ function followSave(flag){
 	$.post("/follow/fwsave",{projectname:projectname,id:nfid,remind:remind,bidopentime:l_bidopentime,remindtime:l_remindtime},function(r){	
 		if(r.status == "y"){
 			if(flag == 1){
+				if(sessionStorage){
+					sessionStorage.followSetReload = "1";
+				}
 				_id = r.followId;
 				hasNoFollowPopup.hide();
 				EasyAlert.show("已关注!");
@@ -515,6 +529,9 @@ function followSave(flag){
 				$("#followsure").hide();
 				$("#followcancel").show();
 			}else if(flag == 2){
+				if(sessionStorage){
+					sessionStorage.followSetReload = "1";
+				}
 				EasyAlert.show('已关注"'+projectname+'"项目');
 				setTimeout(function(){
 					window.location.href = "/follow/list";

+ 6 - 0
src/web/templates/weixin/wxinfocontent.html

@@ -1050,6 +1050,9 @@ $(function(){
 		if(followFlag){
 			$.post("/follow/ajaxReq",{reqType:"cancel",id:followId},function(r){
 				if(r.status == "y"){
+					if(sessionStorage){
+						sessionStorage.followSetReload = "1";
+					}
 					EasyAlert.show("已取消<br>关注");
 					followFlag = false;
 					jumpFlag = false;
@@ -1061,6 +1064,9 @@ $(function(){
 		}else{
 			$.post("/follow/ajaxReq",{reqType:"follow",id:id,title:title,url:url,bidopentime:bidopentime,comeintime:comeintime,type:type,projectname:projectname,projectcode:projectcode,publishtime:publishtime,toptype:toptype,subtype:subtype,area:area},function(r){
 				if(r.status == "y"){
+					if(sessionStorage){
+						sessionStorage.followSetReload = "1";
+					}
 					followId = r.followId;
 					EasyAlert.show("已关注,可从“我-<br>关注的项目”查看<br>或设置提醒日期",{"text-align":"left"});
 					followFlag = true;