diff --git a/src/renderer/utils/musicSdk/mg/comment.js b/src/renderer/utils/musicSdk/mg/comment.js index 9fcdde9e..532bd99a 100644 --- a/src/renderer/utils/musicSdk/mg/comment.js +++ b/src/renderer/utils/musicSdk/mg/comment.js @@ -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,