Commit 12d14c69 authored by wty's avatar wty

后端代码错误处理更新3

parent c0b0c5c2
......@@ -23,7 +23,7 @@ router.get('/getUser', function (req, res, next) {
// }
const SQL = 'SELECT * FROM `user` WHERE `user`.uid = ?'
Mysql.query(SQL, [uid], (err, result) => {
if (err || !result || Object.keys(result).length) {
if (err || !result || !result?.length) {
res.send({
success: false,
err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment