From 5d0841525a1140d7b75361cd98ee2a74b39698ce Mon Sep 17 00:00:00 2001 From: itgaojian163 Date: Wed, 23 Jul 2025 15:49:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A6=96=E9=A1=B5=E5=88=86?= =?UTF-8?q?=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mainPage/mainPage.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pages/mainPage/mainPage.js b/pages/mainPage/mainPage.js index 1c15f9d..8594bc0 100644 --- a/pages/mainPage/mainPage.js +++ b/pages/mainPage/mainPage.js @@ -32,7 +32,8 @@ Page({ ], docCount: 0, cerCount: 0, - recommendDesc: '' + recommendDesc: '', + shareTitle: '欢迎体验喵著' }, /** @@ -41,6 +42,29 @@ Page({ onLoad(options) { this.getMainProCount() }, + onShareAppMessage() { + const promise = new Promise(resolve => { + setTimeout(() => { + resolve({ + title: '欢迎体验喵著' + }) + }, 2000) + }) + return { + title: '欢迎体验喵著', + path: '/pages/mainPage/mainPage', + imageUrl: this.data.imgAssets + '/wx_share_img.png', + promise + } + }, + //分享朋友圈 + onShareTimeline() { + return { + title: this.data.shareTitle, + query: 'from=timeline', + imageUrl: this.data.imgAssets + '/wx_share_img.png' + } + }, getMainProCount() { ProApi.doGetMainProCount() .then(res => {