Skip to content

Commit 3cbf757

Browse files
committed
fix: 首页支持微信分享
1 parent 0649d65 commit 3cbf757

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/pages/demo/base/mp-weixin-share.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ onShareAppMessage((options: Page.ShareAppMessageOption): Page.CustomShareContent
2727
console.log('options:', options)
2828
return {
2929
title: '自定义分享标题',
30+
desc: 'unibest 演示示例',
3031
path: '/pages/index/index?id=xxx',
31-
imageUrl:
32-
'https://cip-shopping-page-0eysug01066a9e-1302818703.tcloudbaseapp.com/pretty-girl.png',
3332
}
3433
})
3534
/** 激活“分享到朋友圈”, 注意:需要先激活“分享给好友” */

src/pages/index/index.vue

+10
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ const description = ref(
3333
onLoad(() => {
3434
console.log(author)
3535
})
36+
37+
/** 激活“分享给好友” */
38+
onShareAppMessage((options: Page.ShareAppMessageOption): Page.CustomShareContent => {
39+
console.log('options:', options)
40+
return {
41+
title: 'unibest',
42+
desc: 'unibest 演示示例',
43+
path: '/pages/index/index?id=xxx',
44+
}
45+
})
3646
</script>
3747

3848
<style>

0 commit comments

Comments
 (0)