From 716b80eeddf12fda25824839d2981a9797cb9e48 Mon Sep 17 00:00:00 2001 From: aixianling Date: Sat, 2 Jul 2022 15:16:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E5=90=88=E5=88=97=E8=A1=A8=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dbUitls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/dbUitls.js b/src/utils/dbUitls.js index dedfce2..4f3e036 100644 --- a/src/utils/dbUitls.js +++ b/src/utils/dbUitls.js @@ -34,7 +34,7 @@ module.exports = { query(`select 1 from ${table} where name like '%${con}%' ${sqlCon}`).then(res => { return total = res.length }), - query(`select * from ${table} where name like '%${con}%' ${sqlCon} limit ${(current-1)*size},${size}`).then(res => { + query(`select * from ${table} where name like '%${con}%' ${sqlCon} limit ${(current-1)*size},${size||10}`).then(res => { return records = res }) ]).then(() => {