From e71c65b0cdd6df305194713bf7c661a18fd179c6 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 28 Feb 2022 16:02:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/search.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/home/search.js b/public/home/search.js index f0e481fdd..7caebbffc 100644 --- a/public/home/search.js +++ b/public/home/search.js @@ -55,6 +55,7 @@ var OnlySearchLabel=false; var startIndex =1; var endIndex = 5; var totalPage = 1; +var totalNum = 0; function initPageInfo(){ currentPage = 1; @@ -142,6 +143,7 @@ function displayResult(tableName,page,jsonResult,onlyReturnNum,keyword){ } if(!onlyReturnNum){ totalPage =Math.ceil(jsonResult.Total/pageSize); + totalNum = jsonResult.Total; } } @@ -564,11 +566,11 @@ function page(current){ } function setPage(currentPage){ - if (isEmpty(pageData)){ + if(totalPage==0){ return; } console.log("currentPage=" + currentPage); - $('#page_total').text("共 " + pageData.Total + " 条"); + $('#page_total').text("共 " + totalNum + " 条"); if(currentPage > 1){ $('#startPage').removeClass("disabled"); $('#lastPage').removeClass("disabled");