ios复制bug

This commit is contained in:
yanran200730
2022-03-15 17:44:11 +08:00
parent dea36af8cd
commit 525cc37d68

View File

@@ -109,6 +109,7 @@ export default {
info: {}, info: {},
isMore: false, isMore: false,
list: [], list: [],
linkUrl: '',
isShow: false isShow: false
} }
}, },
@@ -136,6 +137,12 @@ export default {
this.info = item this.info = item
this.id = item.id this.id = item.id
this.isShow = true this.isShow = true
this.$http.post(`/app/appquestionnairetemplate/queryQrCode?id=${item.id}`).then(res => {
if (res.code == 0) {
this.linkUrl = res.data.linkUrl
}
})
}, },
toStop() { toStop() {
@@ -159,35 +166,31 @@ export default {
uni.showActionSheet({ uni.showActionSheet({
itemList: ['分享', '微信分享', '获取链接'], itemList: ['分享', '微信分享', '获取链接'],
success: data => { success: data => {
this.$http.post(`/app/appquestionnairetemplate/queryQrCode?id=${this.info.id}`).then(res => { if (data.tapIndex === 2) {
if (res.code == 0) { this.copy(this.linkUrl)
if (data.tapIndex === 2) { this.isShow = false
this.copy(res.data.linkUrl) }
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 this.isShow = false
} }])
if (data.tapIndex === 0 || data.tapIndex === 1) { } else {
if (data.tapIndex === 0) { this.wxInvoke(['shareWechatMessage', {
this.wxInvoke(['shareAppMessage', { title: this.info.title,
title: this.info.title, desc: this.info.tableExplain,
desc: this.info.tableExplain, link: this.linkUrl,
link: res.data.linkUrl, imgUrl: this.info.headPicture
imgUrl: this.info.headPicture }, () => {
}, () => { this.isShow = false
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
}])
}
}
} }
}) }
} }
}) })
}, },