chore:名片可以分享了

This commit is contained in:
2026-04-28 17:35:40 +08:00
parent 86e4be302b
commit cf411407dd

View File

@@ -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'
};
},
},
};
</script>
<style lang="scss">