console
This commit is contained in:
@@ -141,11 +141,14 @@ export default {
|
|||||||
|
|
||||||
toSend() {
|
toSend() {
|
||||||
// 文本
|
// 文本
|
||||||
|
if(this.content.length) {
|
||||||
const text = {
|
const text = {
|
||||||
content: this.content
|
content: this.content
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const data = []
|
const data = []
|
||||||
// 图片
|
// 图片
|
||||||
|
if(this.picList.length) {
|
||||||
const imgs = this.picList.map(v =>{
|
const imgs = this.picList.map(v =>{
|
||||||
return {
|
return {
|
||||||
msgtype: "image",
|
msgtype: "image",
|
||||||
@@ -156,7 +159,9 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
data.push(imgs)
|
data.push(imgs)
|
||||||
|
}
|
||||||
// 视频
|
// 视频
|
||||||
|
if(this.videoList.length) {
|
||||||
const videos = this.videoList.map(v =>{
|
const videos = this.videoList.map(v =>{
|
||||||
return {
|
return {
|
||||||
msgtype: "video",
|
msgtype: "video",
|
||||||
@@ -166,7 +171,9 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
data.push(videos)
|
data.push(videos)
|
||||||
|
}
|
||||||
// 文件
|
// 文件
|
||||||
|
if(this.fileList.length) {
|
||||||
const files = this.fileList.map(v => {
|
const files = this.fileList.map(v => {
|
||||||
return {
|
return {
|
||||||
msgtype: "file",
|
msgtype: "file",
|
||||||
@@ -176,7 +183,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
data.push(files)
|
data.push(files)
|
||||||
|
}
|
||||||
// 链接
|
// 链接
|
||||||
// const links = this.webpage.map(v =>{
|
// const links = this.webpage.map(v =>{
|
||||||
// return {
|
// return {
|
||||||
@@ -189,9 +196,6 @@ export default {
|
|||||||
// },
|
// },
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.shareToExternalChat({ ...text, attachments: data }).then((res) =>{
|
this.shareToExternalChat({ ...text, attachments: data }).then((res) =>{
|
||||||
console.log(res, '返回的数据');
|
console.log(res, '返回的数据');
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user