错误代码 :
let result = await DB.query(`update users set access = ${access} , credit = ${credit} where phone = ${phone}`);
解决方案:由于access和credit数据库中设置为字符串类型, 加入引号即可。
let result = await DB.query(`update users set access = '${access}' , credit = '${credit}' where phone = ${phone}`);