Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
6894edac
Commit
6894edac
authored
Sep 08, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享图
parent
eadf9469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
act0915.vue
activity0915/act0915/act0915.vue
+10
-11
No files found.
activity0915/act0915/act0915.vue
View file @
6894edac
...
@@ -141,17 +141,14 @@ defineOptions({
...
@@ -141,17 +141,14 @@ defineOptions({
name
:
'Act915Page'
name
:
'Act915Page'
})
})
// 分享功能配置
const
shareConfig
=
computed
(()
=>
({
title
:
invitationText
.
value
||
'飞鹤915活动'
,
path
:
`/activity0915/act0915/act0915?invitationCode=
${
invitationCode
.
value
}
`
,
imageUrl
:
invitationImageUrl
.
value
||
'Act915Page/v2/act915ShareImg.png'
// 使用接口返回的分享图片,如果没有则使用默认图片
}));
// 定义分享函数
// 定义分享函数
const
getShareData
=
()
=>
{
const
getShareData
=
()
=>
{
const
{
proxy
}
=
getCurrentInstance
()
const
$baseUrl
=
proxy
.
$baseUrl
const
shareTitle
=
invitationText
.
value
||
'飞鹤915活动'
const
shareTitle
=
invitationText
.
value
||
'飞鹤915活动'
const
shareImage
=
invitationImageUrl
.
value
||
'Act915Page/v2/act915ShareImg.png'
const
shareImage
=
invitationImageUrl
.
value
||
$baseUrl
+
'Act915Page/v2/act915ShareImg.png'
const
sharePath
=
`/activity0915/act0915/act0915?invitationCode=
${
invitationCode
.
value
}
`
const
sharePath
=
`/activity0915/act0915/act0915?invitationCode=
${
invitationCode
.
value
}
`
console
.
log
(
'分享参数:'
,
{
console
.
log
(
'分享参数:'
,
{
...
@@ -541,12 +538,12 @@ const handleInviteClick = () => {
...
@@ -541,12 +538,12 @@ const handleInviteClick = () => {
// 已登录用户直接分享,不需要助力
// 已登录用户直接分享,不需要助力
console.log('用户已登录,直接分享')
console.log('用户已登录,直接分享')
console.log('当前分享配置:', getShareData())
console.log('当前分享配置:', getShareData())
// 先隐藏朋友圈分享
// 先隐藏朋友圈分享
uni.hideShareMenu({
uni.hideShareMenu({
menus: ['shareTimeline']
menus: ['shareTimeline']
})
})
// 显示分享菜单
// 显示分享菜单
uni.showShareMenu({
uni.showShareMenu({
withShareTicket: true,
withShareTicket: true,
...
@@ -649,7 +646,9 @@ export default {
...
@@ -649,7 +646,9 @@ export default {
// 自定义分享内容
// 自定义分享内容
onShareAppMessage() {
onShareAppMessage() {
console.log('onShareAppMessage 被调用')
console.log('onShareAppMessage 被调用')
// 获取全局属性
const { proxy } = getCurrentInstance()
const $baseUrl = proxy.$baseUrl
// 获取当前页面的数据
// 获取当前页面的数据
const pages = getCurrentPages()
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const currentPage = pages[pages.length - 1]
...
@@ -666,7 +665,7 @@ export default {
...
@@ -666,7 +665,7 @@ export default {
return {
return {
title: '飞鹤915活动',
title: '飞鹤915活动',
path: `
/
activity0915
/
act0915
/
act0915
?
invitationCode
=
$
{
invitationCode
}
`,
path: `
/
activity0915
/
act0915
/
act0915
?
invitationCode
=
$
{
invitationCode
}
`,
imageUrl: 'Act915Page/v2/act915ShareImg.png'
imageUrl:
$baseUrl +
'Act915Page/v2/act915ShareImg.png'
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment