协同宣发

This commit is contained in:
shijingjing
2022-09-15 15:38:38 +08:00
parent 81b718eea4
commit ee410774aa

View File

@@ -83,6 +83,7 @@ export default {
pictres: [],
options: '',
approver: [], //审批人
status: ''
}
},
onLoad(o) {
@@ -136,7 +137,6 @@ export default {
},
}
})
// data.push(imgs)
// 视频
const videos = this.videoList.map(v =>{
return {
@@ -146,7 +146,6 @@ export default {
},
}
})
// data.push(videos)
// 文件
const files = this.fileList.map(v => {
return {
@@ -156,8 +155,6 @@ export default {
},
}
})
// data.push(files)
// 链接
const links = this.webpage.map(v =>{
return {
@@ -176,18 +173,35 @@ export default {
return {
msgtype: "miniprogram",
miniprogram: {
appid: v.mpAppid, // 小程序的appid
title: v.mpTitle, // 小程序消息的title
imgUrl : v.sysFile.accessUrl, //小程序消息的封面图。必须带http或者https协议头
page: v.mpPage, //小程序消息打开后的路径,注意要以.html作为后缀否则在微信端打开会提示找不到页面
appid: v.mpAppid,
title: v.mpTitle,
imgUrl : v.sysFile.accessUrl,
page: v.mpPage,
},
}
})
data = [ ...imgs, ...videos, ...files, ...links, ...miniapps ]
this.shareToExternalChat({ text: text, attachments: data }).then((res) =>{
console.log(res,'返回的数据');
// err_msg: "shareToExternalChat:ok"
if (res.err_msg == "shareToExternalChat:ok") {
this.status = 'ok'
this.nextCallback()
} else {
this.status = 'fail'
this.nextCallback()
}
})
},
nextCallback() {
this.$http.post(`/app/appmasssendingtask/h5Callback`, null, {
params: {
id: this.id,
status: this.status,
}
}).then((res) =>{
console.log(res);
})
}
},
onShow() {
document.title = "群发居民群任务"