完成图片、文件兼容修改语音icon 回复头像显示
This commit is contained in:
@@ -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) : "未知";
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user