From cf411407ddcf08f0bc390621aacde5141c6e5a25 Mon Sep 17 00:00:00 2001 From: jinhhanhan <1683105490@qq.com> Date: Tue, 28 Apr 2026 17:35:40 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E5=90=8D=E7=89=87=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=88=86=E4=BA=AB=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/contact/contact.vue | 44 +++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/pages_tool/contact/contact.vue b/pages_tool/contact/contact.vue index 9b97a97..692ffdb 100644 --- a/pages_tool/contact/contact.vue +++ b/pages_tool/contact/contact.vue @@ -248,7 +248,8 @@ export default { latitude: 0, longitude: 0, }, - personnel_bg: '' + personnel_bg: '', + mpShareData: null //小程序分享数据 }; }, onLoad(option) { @@ -303,6 +304,24 @@ export default { }); }, onShow() { + // #ifdef MP-WEIXIN + this.$util.getMpShare('/pages_tool/contact/contact').then(res => { + this.mpShareData = res; + }).catch(err => { + // 如果后台没配置,用默认值 + this.mpShareData = { + appMessage: { + title: '联系我们', + path: '/pages_tool/contact/contact' + }, + timeLine: { + title: '联系我们', + query: '' + } + }; + }); + // #endif + this.$util.hideHomeButton(); }, methods: { @@ -449,9 +468,28 @@ export default { longitude: parseFloat(this.shop.longitude), name: this.$lang('oneClickNavigation'), }); - } - } + }, + onShareAppMessage() { + return this.mpShareData?.appMessage || { + title: '联系我们', + path: '/pages_tool/contact/contact' + }; + }, + onShareTimeline() { + return this.mpShareData?.timeLine || { + title: '联系我们', + query: '' + }; + }, + onAddToFavorites() { + return { + title: '联系我们', + path: '/pages_tool/contact/contact' + }; + }, + }, }; +