Commit 47d9d7c0 by 李伟康

commit

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