From 524f82063db79a332d40292aedb21b44790b9aec Mon Sep 17 00:00:00 2001 From: Burt <1020103647@qq.com> Date: Wed, 3 Jan 2024 11:46:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20=E5=BE=AE=E4=BF=A1=E5=88=86?= =?UTF-8?q?=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 291f45b..f0407b7 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -25,6 +25,7 @@ import { ref } from 'vue' import { useCountStore, useUserStore } from '@/store' import { http } from '@/utils/http' import { UserItem } from '@/typings' +import { onShareAppMessage } from '@dcloudio/uni-app' const countStore = useCountStore() const title = ref('Hello') @@ -47,6 +48,15 @@ const handleRequest = () => { }) console.log(res) } +onShareAppMessage((options: Page.ShareAppMessageOption): Page.CustomShareContent => { + console.log('options:', options) + return { + title: '自定义分享标题', + path: '/pages/index/index?id=xxx', + imageUrl: + 'https://cip-shopping-page-0eysug01066a9e-1302818703.tcloudbaseapp.com/pretty-girl.png', + } +})