liting2017 hace 6 años
padre
commit
32aaab0d01
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  1. 6 4
      src/js/newMenu/serviceDetails.js

+ 6 - 4
src/js/newMenu/serviceDetails.js

@@ -159,11 +159,13 @@ $(function () {
                 $('.numberBars').html(data.data.totalCommentCount>10?'10+':data.data.totalCommentCount)
                 $('.numberBars').html(data.data.totalCommentCount>10?'10+':data.data.totalCommentCount)
                 $('.evaluateList>ul').empty();
                 $('.evaluateList>ul').empty();
                 $('.evaluateList>ul').append(theArrs.join(''));
                 $('.evaluateList>ul').append(theArrs.join(''));
-                $('.pagination_box').css('display', 'block');
-                if (data.data.comments.list.length === 0) {
-                    $('.evaluateList ul').html("<div class='list_none'>暂无评论</div>");
+                
+                if (!(data.data.comments.list.length)) {
+                    $('.evaluateList>ul').html("<div class='list_none'>暂无评论</div>");
                     $('.pagination_box').css('display', 'none')
                     $('.pagination_box').css('display', 'none')
-                };
+                }else{
+                    $('.pagination_box').css('display', 'block');
+                }
                 thePageLength = data.data.comments.totalCount ? Math.ceil(data.data.comments.totalCount / pageSize) : 1;
                 thePageLength = data.data.comments.totalCount ? Math.ceil(data.data.comments.totalCount / pageSize) : 1;
                 $('.totalCount').html(`共${data.data.comments.totalCount}条数据 ${thePageLength}页`)
                 $('.totalCount').html(`共${data.data.comments.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
                 var pageArr = [],