diff --git a/pkg_common/views/room.vue b/pkg_common/views/room.vue
index cf598e5..b89bc0e 100644
--- a/pkg_common/views/room.vue
+++ b/pkg_common/views/room.vue
@@ -11,9 +11,9 @@
{{ item.username }}
{{ item.msg_content }}
-
+
-
+
@@ -22,7 +22,7 @@
{{ item.username }}
{{ item.msg_content }}
-
+
@@ -179,6 +179,12 @@ export default {
wsJson(json) {
return JSON.parse(json)
},
+ // 拼接图片完整地址:七牛上传后消息里只存 key,需要补上资源域名;http 统一转 https
+ imgUrl(content) {
+ if (!content) return ''
+ if (/^https?:\/\//i.test(content)) return content.replace(/^http:\/\//i, 'https://')
+ return this.webUrl + '/' + content
+ },
getUploadToken() {
let that = this;