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(() => {