From 525cc37d681324b76345e8126349df3c0311c683 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 15 Mar 2022 17:44:11 +0800 Subject: [PATCH] =?UTF-8?q?ios=E5=A4=8D=E5=88=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/saas/AppAskForm/components/List.vue | 57 +++++++++++++------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/src/saas/AppAskForm/components/List.vue b/src/saas/AppAskForm/components/List.vue index ad44bd72..a93ad838 100644 --- a/src/saas/AppAskForm/components/List.vue +++ b/src/saas/AppAskForm/components/List.vue @@ -109,6 +109,7 @@ export default { info: {}, isMore: false, list: [], + linkUrl: '', isShow: false } }, @@ -136,6 +137,12 @@ export default { 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() { @@ -159,35 +166,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 + }]) } - }) + } } }) },