修复评论图片显示问题

pull/1326/head
lyswhut 2023-04-13 15:07:33 +08:00
parent 7149d0d43f
commit 60f0801a7c
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ export default {
time: item.createTime,
timeStr: dateFormat2(new Date(item.createTime).getTime()),
userName: item.author.name,
avatar: item.author.avatar && item.author.avatar.startsWith('//') ? `http:${item.author.avatar}` : item.author.avatar,
avatar: /^\/\//.test(item.author.avatar) ? `http:${item.author.avatar}` : item.author.avatar,
userId: item.author.id,
likedCount: item.praiseCount,
replyNum: item.replyTotal,
@ -75,7 +75,7 @@ export default {
time: c.createTime,
timeStr: dateFormat2(new Date(c.createTime).getTime()),
userName: c.author.name,
avatar: c.author.avatar,
avatar: /^\/\//.test(c.author.avatar) ? `http:${c.author.avatar}` : c.author.avatar,
userId: c.author.id,
likedCount: c.praiseCount,
replyNum: c.replyTotal,