From 7a49c7c493a6b2e409f87b2d2864670cd606b328 Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Thu, 20 Nov 2025 12:03:51 +0800 Subject: [PATCH] =?UTF-8?q?Feat(=E9=A6=96=E9=A1=B5):=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pages/home/index.vue b/pages/home/index.vue index 997a61b..126d49c 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -381,6 +381,7 @@ import { getLocationSetting, openLocationSettting } from "@/utils/common" +import { getWeixinShareConfig } from '@/api/public' export default { name: 'IndexPage', components: { @@ -431,7 +432,8 @@ export default { tabIconPostion: {}, messageIcon: {}, recommendKeyword: [], - keywordIndex: 0 + keywordIndex: 0, + shareData: {} } }, onLoad() { @@ -452,6 +454,12 @@ export default { _this.statusBarHeight = statusBar } }) + getWeixinShareConfig().then(res => { + const { success, data } = res + if (success) { + this.shareData = data + } + }) }, onHide() { this.pageToHideHandle() @@ -459,6 +467,17 @@ export default { onPageScroll(e) { this.scrollTop = e.scrollTop }, + onShareTimeline() { + uni.updateShareMenu({ + isPrivateMessage: false, + withShareTicket: false + }) + return { + title: this.shareData.title || this.share.title, + query: '', + imageUrl: this.shareData.image || this.share.imageUrl + } + }, methods: { changeRecommendKeyword(e) { this.keywordIndex = e