Commit eadf9469 authored by spc's avatar spc

fixed

parent 67cc52b3
...@@ -145,13 +145,13 @@ defineOptions({ ...@@ -145,13 +145,13 @@ defineOptions({
const shareConfig = computed(() => ({ const shareConfig = computed(() => ({
title: invitationText.value || '飞鹤915活动', title: invitationText.value || '飞鹤915活动',
path: `/activity0915/act0915/act0915?invitationCode=${invitationCode.value}`, path: `/activity0915/act0915/act0915?invitationCode=${invitationCode.value}`,
imageUrl: invitationImageUrl.value || '' // 使用接口返回的分享图片 imageUrl: invitationImageUrl.value || 'Act915Page/v2/act915ShareImg.png' // 使用接口返回的分享图片,如果没有则使用默认图片
})); }));
// 定义分享函数 // 定义分享函数
const getShareData = () => { const getShareData = () => {
const shareTitle = invitationText.value || '飞鹤915活动' const shareTitle = invitationText.value || '飞鹤915活动'
const shareImage = invitationImageUrl.value || '' const shareImage = invitationImageUrl.value || 'Act915Page/v2/act915ShareImg.png'
const sharePath = `/activity0915/act0915/act0915?invitationCode=${invitationCode.value}` const sharePath = `/activity0915/act0915/act0915?invitationCode=${invitationCode.value}`
console.log('分享参数:', { console.log('分享参数:', {
...@@ -540,6 +540,14 @@ const handleInviteClick = () => { ...@@ -540,6 +540,14 @@ const handleInviteClick = () => {
// 已登录用户直接分享,不需要助力 // 已登录用户直接分享,不需要助力
console.log('用户已登录,直接分享') console.log('用户已登录,直接分享')
console.log('当前分享配置:', getShareData())
// 先隐藏朋友圈分享
uni.hideShareMenu({
menus: ['shareTimeline']
})
// 显示分享菜单
uni.showShareMenu({ uni.showShareMenu({
withShareTicket: true, withShareTicket: true,
menus: ['shareAppMessage'] menus: ['shareAppMessage']
...@@ -658,7 +666,7 @@ export default { ...@@ -658,7 +666,7 @@ export default {
return { return {
title: '飞鹤915活动', title: '飞鹤915活动',
path: `/activity0915/act0915/act0915?invitationCode=${invitationCode}`, path: `/activity0915/act0915/act0915?invitationCode=${invitationCode}`,
imageUrl: '' imageUrl: 'Act915Page/v2/act915ShareImg.png'
} }
}, },
......
...@@ -246,7 +246,9 @@ ...@@ -246,7 +246,9 @@
{ {
"path": "act0915/act0915", "path": "act0915/act0915",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": "",
"shareAppMessage": true,
"shareTimeline": false
} }
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment