diff --git a/src/views/activity/detail.vue b/src/views/activity/detail.vue index 6a4338a..bbf38ae 100644 --- a/src/views/activity/detail.vue +++ b/src/views/activity/detail.vue @@ -91,11 +91,9 @@ export default { wx.updateAppMessageShareData({ title: 'e智社区', desc: than.info.activityName, - link: `http://epmet-cloud.elinkservice.cn/#/activityDetail?id=${than.$route.query.id}`, - imgUrl: '', - success: function () { - console.log('分享成功'); - } + link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}`, + imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png', + success: function () {} }) }); @@ -103,11 +101,9 @@ export default { wx.onMenuShareAppMessage({ title: 'e智社区', desc: than.info.activityName, - link: `http://epmet-cloud.elinkservice.cn/#/activityDetail?id=${than.$route.query.id}}`, - imgUrl: '', - success: function () { - console.log('分享成功'); - } + link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}`, + imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png', + success: function () {} }) } }, diff --git a/src/views/communityPublicity/detail.vue b/src/views/communityPublicity/detail.vue index e1a8f9f..ece3dd1 100644 --- a/src/views/communityPublicity/detail.vue +++ b/src/views/communityPublicity/detail.vue @@ -70,11 +70,9 @@ export default { wx.updateAppMessageShareData({ title: 'e智社区', desc: than.info.title, - link: `http://epmet-cloud.elinkservice.cn/#/communityPublicityDetail?item=${encodeURIComponent(than.info)}`, - imgUrl: '', - success: function () { - console.log('分享成功'); - } + link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/communityPublicityDetail?item=${encodeURIComponent(than.info)}&appId=${than.$store.state.app.appId}`, + imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png', + success: function () {} }) }); @@ -82,11 +80,9 @@ export default { wx.onMenuShareAppMessage({ title: 'e智社区', desc: than.info.title, - link: `http://epmet-cloud.elinkservice.cn/#/communityPublicityDetail?item=${encodeURIComponent(than.info)}}`, - imgUrl: '', - success: function () { - console.log('分享成功'); - } + link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/communityPublicityDetail?item=${encodeURIComponent(than.info)}&appId=${than.$store.state.app.appId}`, + imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png', + success: function () {} }) } } diff --git a/src/views/houseQR/index.vue b/src/views/houseQR/index.vue index 672bd21..969169c 100644 --- a/src/views/houseQR/index.vue +++ b/src/views/houseQR/index.vue @@ -144,8 +144,34 @@ export default { this.houesId = this.$store.state.app.houseId this.getHouseInfo() }, - mounted() { }, + mounted() { + setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData']) + this.share() + }, methods: { + share() { + let than = this + if (wx.updateAppMessageShareData) { + wx.ready(function () { + wx.updateAppMessageShareData({ + title: 'e智社区', + desc: '我的电子门牌', + link: `https://epmet-preview.elinkservice.cn/epmet-wx-pa/#/houseQR?houseId=${than.houesId}&appId=${than.$store.state.app.appId}`, + imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png', + success: function () {} + }) + }); + + } else { + wx.onMenuShareAppMessage({ + title: 'e智社区', + desc: '我的电子门牌', + link: `http://epmet-cloud.elinkservice.cn/#/houseQR?houseId=${than.houesId}}&appId=${than.$store.state.app.appId}`, + imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png', + success: function () {} + }) + } + }, getHouseInfo() { console.log(this.houesId) getHouseInfoQR(this.houesId).then(res => {