diff --git a/resources/assets/js/functions/utils.js b/resources/assets/js/functions/utils.js
index e0aa0db7f..79d42e3b4 100755
--- a/resources/assets/js/functions/utils.js
+++ b/resources/assets/js/functions/utils.js
@@ -45,5 +45,34 @@ module.exports = {
})
}
return text;
+ },
+
+ /**
+ * 获取文本消息图片
+ * @param text
+ * @returns {*[]}
+ */
+ textImagesInfo(text) {
+ const baseUrl = $A.apiUrl('../');
+ const array = text.match(new RegExp(`]*?>`, "g"));
+ const list = [];
+ if (array) {
+ const srcReg = new RegExp("src=([\"'])([^'\"]*)\\1"),
+ widthReg = new RegExp("(original-)?width=\"(\\d+)\""),
+ heightReg = new RegExp("(original-)?height=\"(\\d+)\"")
+ array.some(res => {
+ const srcMatch = res.match(srcReg),
+ widthMatch = res.match(widthReg),
+ heightMatch = res.match(heightReg);
+ if (srcMatch) {
+ list.push({
+ src: srcMatch[2].replace(/\{\{RemoteURL\}\}/g, baseUrl),
+ width: widthMatch ? widthMatch[2] : -1,
+ height: heightMatch ? heightMatch[2] : -1,
+ })
+ }
+ })
+ }
+ return list;
}
}
diff --git a/resources/assets/js/pages/manage/components/DialogItem.vue b/resources/assets/js/pages/manage/components/DialogItem.vue
index 7c87df739..5ef9485b4 100644
--- a/resources/assets/js/pages/manage/components/DialogItem.vue
+++ b/resources/assets/js/pages/manage/components/DialogItem.vue
@@ -4,21 +4,21 @@