Commit 47d9d7c0 by 李伟康

commit

1 parent 5db55f21
......@@ -216,6 +216,18 @@ export default {
this.$refs.mutiImgItem[idx].style.height = imgWidth + 'px'
})
},
shareToExternalMoments (obj) {
let { taskId } = this.getQuery()
this.showLoading()
wxConfig.shareToExternalMoments(obj)
.then(() => {
this.hideLoading()
this.showToast('发送成功')
sopApi.successFinished(taskId)
}).catch(() => {
this.hideLoading()
})
},
send () {
this.showLoading()
let { taskId } = this.getQuery()
......@@ -223,7 +235,8 @@ export default {
this.hideLoading()
console.log(params)
let obj = {
attachments: []
attachments: [
]
}
if (params.text) {
obj.text = {
......@@ -243,7 +256,6 @@ export default {
url: e[key].url
}
else par = {
// mediaid: '3zP79XZIMyCtlbTEDG9zPnheeOQsBS4Iz_SkGIcH05bLhHUGLPQsYQLPWy_7BmzlZ'
mediaid: e[key].mediaId
}
obj.attachments.push({
......@@ -254,15 +266,7 @@ export default {
}
})
})
this.showLoading()
wxConfig.shareToExternalMoments(obj)
.then(res => {
this.hideLoading()
this.showToast('发送成功')
sopApi.successFinished(taskId)
}).catch(() => {
this.hideLoading()
})
this.shareToExternalMoments(obj)
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!