This commit is contained in:
陈誉午
2026-08-02 09:57:11 +08:00
parent 84d543eb14
commit a10fc51c02
2 changed files with 24 additions and 1 deletions
+23
View File
@@ -6,7 +6,30 @@ Component({
showPopup: false, showPopup: false,
showToast: false, showToast: false,
}, },
pageLifetimes: {
show() {
// 开启右上角菜单的"转发给朋友"和"分享到朋友圈"
wx.showShareMenu({
menus: ['shareAppMessage', 'shareTimeline'],
})
},
},
methods: { methods: {
// 转发给好友
onShareAppMessage() {
return {
title: '2024新款男士轻薄羽绒服 限时5折¥299',
path: '/pages/index/index',
imageUrl: '/pages/index/assets/test.png',
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '2024新款男士轻薄羽绒服 限时5折¥299',
imageUrl: '/pages/index/assets/test.png',
}
},
preventTouchMove() {}, preventTouchMove() {},
onOverlayTap() { onOverlayTap() {
wx.request({ wx.request({
+1 -1
View File
@@ -27,4 +27,4 @@
<text class="tool-desc">敬请期待</text> <text class="tool-desc">敬请期待</text>
</view> </view>
</view> </view>
</view> </view>