This commit is contained in:
yanran200730
2022-03-14 17:15:42 +08:00
parent 7af6c0d30e
commit e67e3b3a85

View File

@@ -103,6 +103,7 @@ export default {
info: {},
isMore: false,
list: [],
linkUrl: '',
isShow: false
}
},
@@ -123,18 +124,16 @@ export default {
})
},
showPopup(item) {
// if (item.status === '2') {
// this.$confirm('表单已停止发布,请在后台管理系统中查看调查结果', '', {
// showCancel: false
// })
//
// return false
// }
showPopup (item) {
this.info = item
this.id = item.id
this.isShow = true
this.$http.post(`/app/appquestionnairetemplate/queryQrCode?id=${item.id}`).then(res => {
if (res.code == 0) {
this.linkUrl = res.data.linkUrl
}
})
},
toStop() {
@@ -158,35 +157,31 @@ export default {
uni.showActionSheet({
itemList: ['分享', '微信分享', '获取链接'],
success: data => {
this.$http.post(`/app/appquestionnairetemplate/queryQrCode?id=${this.info.id}`).then(res => {
if (res.code == 0) {
if (data.tapIndex === 2) {
this.copy(res.data.linkUrl)
if (data.tapIndex === 2) {
this.copy(this.linkUrl)
this.isShow = false
}
if (data.tapIndex === 0 || data.tapIndex === 1) {
if (data.tapIndex === 0) {
this.wxInvoke(['shareAppMessage', {
title: this.info.title,
desc: this.info.tableExplain,
link: this.linkUrl,
imgUrl: this.info.headPicture
}, () => {
this.isShow = false
}
if (data.tapIndex === 0 || data.tapIndex === 1) {
if (data.tapIndex === 0) {
this.wxInvoke(['shareAppMessage', {
title: this.info.title,
desc: this.info.tableExplain,
link: res.data.linkUrl,
imgUrl: this.info.headPicture
}, () => {
this.isShow = false
}])
} else {
this.wxInvoke(['shareWechatMessage', {
title: this.info.title,
desc: this.info.tableExplain,
link: res.data.linkUrl,
imgUrl: this.info.headPicture
}, () => {
this.isShow = false
}])
}
}
}])
} else {
this.wxInvoke(['shareWechatMessage', {
title: this.info.title,
desc: this.info.tableExplain,
link: this.linkUrl,
imgUrl: this.info.headPicture
}, () => {
this.isShow = false
}])
}
})
}
}
})
},
@@ -197,7 +192,7 @@ export default {
document.body.appendChild(oInput)
oInput.select()
document.execCommand('Copy')
this.$u.toast('复制')
this.$u.toast('复制成功')
oInput.remove()
},