修复了新增订单在最末尾的bug

master
P-Jhao 1 day ago
parent ea5a1152fd
commit e486b6e4c4

@ -32,10 +32,13 @@ module.exports.loginService = async function (loginInfo) {
} }
module.exports.updateUserInfoService = async function (userInfo) { module.exports.updateUserInfoService = async function (userInfo) {
// userInfo.loginPwd = md5(userInfo.loginPwd)
await updateUserDao(userInfo) await updateUserDao(userInfo)
const data = await getUserInfoDao(userInfo.loginId) const result = await getUserInfoDao(userInfo.loginId)
return data.dataValues
return result.dataValues
} }
module.exports.getUserInfoService = async function (loginId) { module.exports.getUserInfoService = async function (loginId) {

@ -26,8 +26,12 @@ module.exports.getRandomExpressId = function () {
module.exports.handleArrayDaoData = function (arr) { module.exports.handleArrayDaoData = function (arr) {
const result = [] const result = []
for (const item of arr) { // for (const item of arr) {
result.push(item.dataValues) // result.push(item.dataValues)
// }
//倒叙输出
for (let i = arr.length - 1; i >= 0; i--) {
result.push(arr[i].dataValues)
} }
return result return result
} }
Loading…
Cancel
Save