Browse Source

bug修复

liting2017 6 years ago
parent
commit
435b29e2a0

+ 1 - 1
src/js/newMenu/achievementList.js

@@ -221,7 +221,7 @@ $(function () {
                 $('.totalCount').html(`共${data.data.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
                     firstNo = 1,
-                    thePageNo=pageNo||1;
+                    thePageNo=pageNo||1,
                     endNo = 5;
                 if (thePageNo > 3) {
                     firstNo = thePageNo - 2;

+ 11 - 5
src/js/newMenu/adviserList.js

@@ -45,6 +45,7 @@ $(function () {
         }
     }
     function loadDate(pageNo) {
+        console.log(pageNo)
         $('.loading').show();
         $.ajax({
             method: "get",
@@ -113,7 +114,6 @@ $(function () {
                 $('.totalCount').html(`共${data.data.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
                     firstNo = 1,
-                    thePageNo=pageNo||1,
                     endNo = 5;
                 if (thePageNo > 3) {
                     firstNo = thePageNo - 2;
@@ -136,6 +136,7 @@ $(function () {
                 $('.pagePre').after(pageArr.join(''));
                 $('footer').show();
                 colFun();
+               
             }
         });
     }
@@ -253,25 +254,30 @@ $(function () {
             if($(this).hasClass('active')){
                 $(this).removeClass('active');
                 dataList.sortType='';
-                loadDate(1);
+                thePageNo=1
+                loadDate(thePageNo);
             }else{
                 $('.colNumber').removeClass('active')
                 $(this).addClass('active');
                 dataList.sortType=0;
-                loadDate(1);
+                thePageNo=1;
+                loadDate(thePageNo);
             }
         })
         $('.sort .colNumber').click(function(){
             if($(this).hasClass('active')){
                 $(this).removeClass('active');
                 dataList.sortType='';
-                loadDate(1)
+                thePageNo=1;
+                loadDate(thePageNo);
             }else{
                 $('.relTime').removeClass('active')
                 $(this).addClass('active');
                 dataList.sortType=1;
-                loadDate(1)
+                thePageNo=1;
+                loadDate(thePageNo);
             }
         })
+        
     }
 })

+ 1 - 1
src/js/newMenu/demandList.js

@@ -220,7 +220,7 @@ $(function () {
                 $('.totalCount').html(`共${data.data.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
                     firstNo = 1,
-                    thePageNo=pageNo||1;
+                    thePageNo=pageNo||1,
                     endNo = 5;
                 if (thePageNo > 3) {
                     firstNo = thePageNo - 2;

+ 1 - 1
src/js/newMenu/patentList.js

@@ -240,7 +240,7 @@ $(function () {
                 $('.totalCount').html(`共${data.data.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
                     firstNo = 1,
-                    thePageNo=pageNo||1;
+                    thePageNo=pageNo||1,
                     endNo = 5;
                 if (thePageNo > 3) {
                     firstNo = thePageNo - 2;

+ 2 - 3
src/js/newMenu/publicComment.js

@@ -102,7 +102,6 @@
                  thePageLength = data.data.comments.totalCount ? Math.ceil(data.data.comments.totalCount / pageSize) : 1;
                  $('.totalCount').html(`共${data.data.comments.totalCount}条数据 ${thePageLength}页`)
                  var pageArr = [],
-                     thePageNo=pageNo||1,
                      firstNo = 1,
                      endNo = 5;
                  if (thePageNo > 3) {
@@ -211,8 +210,8 @@
                  msg('评论成功,感谢您的评论。');
                  $('#commentArea').val('');
                  $('.ulStar span').removeClass('glyphicon-star').addClass('glyphicon-star-empty');
-                
-                 loadDate(1);
+                 thePageNo=1;
+                 loadDate(thePageNo);
                 
              })
          })

+ 2 - 2
src/js/newMenu/serviceDetails.js

@@ -180,7 +180,6 @@ $(function () {
                 $('.totalCount').html(`共${data.data.comments.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
                     firstNo = 1,
-                    thePageNo=pageNo||1,
                     endNo = 5;
                 if (thePageNo > 3) {
                     firstNo = thePageNo - 2;
@@ -283,7 +282,8 @@ $(function () {
                 msg('评论成功,感谢您的评论。');
                 $('#commentArea').val('');
                 $('.ulStar span').removeClass('glyphicon-star').addClass('glyphicon-star-empty');
-                loadDate(1);
+                thePageNo=1;
+                loadDate(thePageNo);
             })
         })
     }

+ 1 - 0
src/js/newMenu/serviceList.js

@@ -225,6 +225,7 @@ $(function () {
                 $('.totalCount').html(`共${data.data.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
                     firstNo = 1,
+                    thePageNo=pageNo||1,
                     endNo = 5;
                 if (thePageNo > 3) {
                     firstNo = thePageNo - 2;