完成图片、文件兼容修改语音icon 回复头像显示

This commit is contained in:
2025-07-05 14:25:53 +08:00
parent ad33895b6d
commit 179005822d
21 changed files with 2715 additions and 73 deletions

View File

@@ -49,7 +49,7 @@ export default {
computed: {
getAvatarUrl() {
if (this.src) {
return this.src;
return this.getFixedSourceUrl(this.src);
}
if (this.isGroup) {
return defaultGroupIcon;
@@ -65,6 +65,13 @@ export default {
},
},
methods: {
getFixedSourceUrl(url) {
// 如果 url 以 http://47.117.71.33/api/object/ 开头,则替换为带端口的
if (typeof url === 'string' && url.startsWith('http://47.117.71.33/api/object/')) {
return url.replace('http://47.117.71.33/api/object/', 'http://47.117.71.33:15219/api/object/');
}
return url;
},
errorHandle() {
this.avatarText = this.desc ? this.desc.slice(0, 1) : "未知";
},