This commit is contained in:
liuye
2022-01-07 14:21:54 +08:00
parent 2fa4df0ef2
commit f5f87da3ae

View File

@@ -123,7 +123,13 @@ export default {
.then((res) => {
if (res?.data) {
res.data.records.forEach((e) => {
e.avatar = e.createUserName?.substring(0, 2) || '游客'
// e.avatar = e.createUserName?.substring(0, 2) || '游客'
if(e.createUserName) {
e.avatar = e.createUserName.substring(e.createUserName.length, e.createUserName.length - 2)
}else {
e.avatar = '游客'
}
if (e.images) {
e.images = JSON.parse(e.images)
}