@ -32,10 +32,13 @@ module.exports.loginService = async function (loginInfo) {
}
module.exports.updateUserInfoService = async function (userInfo) {
// userInfo.loginPwd = md5(userInfo.loginPwd)
await updateUserDao(userInfo)
const data = await getUserInfoDao(userInfo.loginId)
return data.dataValues
const result = await getUserInfoDao(userInfo.loginId)
return result.dataValues
module.exports.getUserInfoService = async function (loginId) {
@ -26,8 +26,12 @@ module.exports.getRandomExpressId = function () {
module.exports.handleArrayDaoData = function (arr) {
const result = []
for (const item of arr) {
result.push(item.dataValues)
// for (const item of arr) {
// result.push(item.dataValues)
// }
//倒叙输出
for (let i = arr.length - 1; i >= 0; i--) {
result.push(arr[i].dataValues)
return result