1178232204@qq.com hace 3 años
padre
commit
57a73fa7a1
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      src/js/cdss.js

+ 4 - 4
src/js/cdss.js

@@ -689,12 +689,12 @@ function renderDiagList(list, showNum) {
     for (var i = 0; i < list.length; i++) {
       const item = list[i];
       str +=
-        `<div class='box ${i > showNum ? `box-1` : ''}' data-index="${i}">
+        `<div class='box ${i >= showNum ? `box-1` : ''}' data-index="${i}">
           <p class='box-p goDetail' data-name="${item.name}" data-index="${i}">${item.name}<img class="box-img" src=${down} /></p>
           <div class="moduleCenter"></div>
         </div>`
     }
-    str += `${list.length > showNum ? `<p class="toogle">加载更多<img src=${more}/></p>` : ''} </div>`
+    str += `${list.length >= showNum ? `<p class="toogle">加载更多<img src=${more}/></p>` : ''} </div>`
 
     $('.moduleItem.maydiagnose').append(str)
     $('.moduleItem.maydiagnose').css("display", "block")
@@ -740,12 +740,12 @@ function renderAffListList(list, showNum) {
     for (var i = 0; i < list.length; i++) {
       const item = list[i];
       str +=
-        `<div class='box ${i > showNum ? `box-1` : ''}' data-index="${i}">
+        `<div class='box ${i >= showNum ? `box-1` : ''}' data-index="${i}">
           <p class='box-p goDetail' data-name="${item.name}" data-index="${i}"><span class='box-title'>${item.name}</span><img class="box-img" src=${down} /></p>
           <div class="moduleCenter"></div>
         </div>`
     }
-    str += `${list.length > showNum ? `<p class="toogle">加载更多<img src=${more}/></p>` : ''} </div>`
+    str += `${list.length >= showNum ? `<p class="toogle">加载更多<img src=${more}/></p>` : ''} </div>`
 
     $('.moduleItem.hasdiagnose').append(str)
     $('.moduleItem.hasdiagnose').css("display", "block")