|
@@ -175,7 +175,7 @@ export default {
|
|
|
}),
|
|
|
...mapGetters('webSocket', ['socketMsg', 'socketStatus']),
|
|
|
getActionList () {
|
|
|
- return ['image']
|
|
|
+ return ['image', 'attach']
|
|
|
},
|
|
|
// 会话消息
|
|
|
getMsgList () {
|
|
@@ -183,7 +183,9 @@ export default {
|
|
|
list.forEach(v => {
|
|
|
if (isJSON(v.content) || v.type >= 3) {
|
|
|
try {
|
|
|
- v.content = JSON.parse(v.content.replace(/"/g, '"'))
|
|
|
+ if (typeof v.content === 'string') {
|
|
|
+ v.content = JSON.parse(v.content.replace(/"/g, '"'))
|
|
|
+ }
|
|
|
} catch (error) { console.log(error) }
|
|
|
}
|
|
|
})
|
|
@@ -969,7 +971,7 @@ export default {
|
|
|
itemType: 5,
|
|
|
link: '',
|
|
|
fool: 1,
|
|
|
- type: 3,
|
|
|
+ type: 4,
|
|
|
content: JSON.stringify(data)
|
|
|
}
|
|
|
const socketParams = {
|