浏览代码

个人和企业浏览页面中翻页bug

luyanan 7 年之前
父节点
当前提交
809859e561
共有 2 个文件被更改,包括 15 次插入8 次删除
  1. 4 2
      js/cmpInforShow.js
  2. 11 6
      js/userInforShow.js

+ 4 - 2
js/cmpInforShow.js

227
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + data.data.data[i].resourceName + '</p><p class="h2Font ellipsisSty">应用用途:' + data.data.data[i].supportedServices + '</p></div>';
227
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + data.data.data[i].resourceName + '</p><p class="h2Font ellipsisSty">应用用途:' + data.data.data[i].supportedServices + '</p></div>';
228
							strAdd += '</a></li>';
228
							strAdd += '</a></li>';
229
229
230
							if(i == 0) {
230
							if(isbind==true && i==0){
231
								$("#showResource").html("");
231
								$("#showResource").append(strAdd);
232
								$("#showResource").append(strAdd);
232
							}
233
							}
233
							$("#proResource").append(strAdd);
234
							$("#proResource").append(strAdd);
292
							var $strAdd = $(strAdd);
293
							var $strAdd = $(strAdd);
293
							$("#proArticel").append($strAdd);
294
							$("#proArticel").append($strAdd);
294
							commentnum(data.data.data[i].articleId, $strAdd) //文章评论数
295
							commentnum(data.data.data[i].articleId, $strAdd) //文章评论数
295
							if(i == 0) {
296
							if(isbind==true && i==0){
297
								$("#showArticle").html("");
296
								$("#showArticle").append(strAdd);
298
								$("#showArticle").append(strAdd);
297
								commentnum(data.data.data[0].articleId, $strAdd)
299
								commentnum(data.data.data[0].articleId, $strAdd)
298
							}
300
							}

+ 11 - 6
js/userInforShow.js

671
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].resourceName +'</p><p class="h2Font ellipsisSty">应用用途:'+ dataStr[i].supportedServices+'</p></div>';				
671
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].resourceName +'</p><p class="h2Font ellipsisSty">应用用途:'+ dataStr[i].supportedServices+'</p></div>';				
672
							strAdd += '</a></li>';
672
							strAdd += '</a></li>';
673
							
673
							
674
							if(i==0){
674
							if(isbind==true && i==0){
675
								$("#showResource").html("");
675
								$("#showResource").append(strAdd);
676
								$("#showResource").append(strAdd);
676
							}
677
							}
678
							
677
							$("#proResource").append(strAdd);
679
							$("#proResource").append(strAdd);
678
						}
680
						}
679
						//分页
681
						//分页
737
							var $strAdd = $(strAdd);
739
							var $strAdd = $(strAdd);
738
							$("#proArticel").append( $strAdd);
740
							$("#proArticel").append( $strAdd);
739
							commentnum(dataStr[i].articleId, $strAdd) //文章评论数
741
							commentnum(dataStr[i].articleId, $strAdd) //文章评论数
740
							if(i==0){
742
							if(isbind==true && i==0){
743
								$("#showArticle").html("");
741
								$("#showArticle").append(strAdd);
744
								$("#showArticle").append(strAdd);
742
								commentnum(dataStr[0].articleId, $strAdd)
745
								commentnum(dataStr[0].articleId, $strAdd)
743
							}
746
							}
802
							
805
							
803
							var $strAdd = $(strAdd);
806
							var $strAdd = $(strAdd);
804
							$("#proPatent").append( $strAdd);
807
							$("#proPatent").append( $strAdd);
805
							if(i==0){
808
							if(isbind==true && i==0){
809
								$("#showPatent").html("");
806
								$("#showPatent").append(strAdd);
810
								$("#showPatent").append(strAdd);
807
							}
811
							}
808
						}
812
						}
813
								current: data.data.pageNo,
817
								current: data.data.pageNo,
814
								backFn: function(p) {
818
								backFn: function(p) {
815
									$("#proPatent").html("");
819
									$("#proPatent").html("");
816
									getArticle(10, p,false);
820
									getPatent(10, p,false);
817
									document.body.scrollTop = document.documentElement.scrollTop = 0;
821
									document.body.scrollTop = document.documentElement.scrollTop = 0;
818
								}
822
								}
819
							});
823
							});
871
							
875
							
872
							var $strAdd = $(strAdd);
876
							var $strAdd = $(strAdd);
873
							$("#proPaper").append( $strAdd);
877
							$("#proPaper").append( $strAdd);
874
							if(i==0){
878
							if(isbind==true && i==0){
879
								$("#showPaper").html();
875
								$("#showPaper").append(strAdd);
880
								$("#showPaper").append(strAdd);
876
							}
881
							}
877
						}
882
						}
882
								current: data.data.pageNo,
887
								current: data.data.pageNo,
883
								backFn: function(p) {
888
								backFn: function(p) {
884
									$("#proPaper").html("");
889
									$("#proPaper").html("");
885
									getArticle(10, p,false);
890
									getPaper(10, p,false);
886
									document.body.scrollTop = document.documentElement.scrollTop = 0;
891
									document.body.scrollTop = document.documentElement.scrollTop = 0;
887
								}
892
								}
888
							});
893
							});