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
27e1aa78
Commit
27e1aa78
authored
Sep 08, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除分享朋友圈
parent
9019576f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
35 deletions
+26
-35
pages.json
pages.json
+3
-1
XingmaLabDetailPage.vue
pages/XingmaLabDetailPage/XingmaLabDetailPage.vue
+23
-34
No files found.
pages.json
View file @
27e1aa78
...
@@ -185,7 +185,9 @@
...
@@ -185,7 +185,9 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"enableShare"
:
true
"enableShare"
:
true
,
"shareAppMessage"
:
true
,
"shareTimeline"
:
false
}
}
},
},
{
{
...
...
pages/XingmaLabDetailPage/XingmaLabDetailPage.vue
View file @
27e1aa78
...
@@ -126,7 +126,7 @@ const fetchDetailData = async (id) => {
...
@@ -126,7 +126,7 @@ const fetchDetailData = async (id) => {
detailData
.
value
=
result
.
data
detailData
.
value
=
result
.
data
recordId
.
value
=
id
// 保存记录ID
recordId
.
value
=
id
// 保存记录ID
console
.
log
(
'✅ 详情数据获取成功:'
,
detailData
.
value
)
console
.
log
(
'✅ 详情数据获取成功:'
,
detailData
.
value
)
// 初始化时同步收藏状态到上一页
// 初始化时同步收藏状态到上一页
syncCollectionStatusToPrevPage
()
syncCollectionStatusToPrevPage
()
}
else
{
}
else
{
...
@@ -243,7 +243,7 @@ const handleShareClick = () => {
...
@@ -243,7 +243,7 @@ const handleShareClick = () => {
// 手动触发分享(如果需要的话)
// 手动触发分享(如果需要的话)
// uni.showShareMenu({
// uni.showShareMenu({
// withShareTicket: true,
// withShareTicket: true,
// menus: ['shareAppMessage'
, 'shareTimeline']
// menus: ['shareAppMessage'
] // 仅分享给好友,禁用朋友圈
// })
// })
}
}
...
@@ -268,7 +268,7 @@ const handleGoBack = () => {
...
@@ -268,7 +268,7 @@ const handleGoBack = () => {
}
}
// 生命周期
// 生命周期
onMounted
(
async
()
=>
{
onMounted
(
async
(
options
)
=>
{
md
.
sensorComponentLogTake
({
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
xcxComponentExposure
:
"true"
,
...
@@ -305,18 +305,23 @@ onMounted(async () => {
...
@@ -305,18 +305,23 @@ onMounted(async () => {
componentContent
:
"藏品详情页+"
+
detailData
.
value
.
content
componentContent
:
"藏品详情页+"
+
detailData
.
value
.
content
});
});
}
else
{
}
else
{
console
.
warn
(
'⚠️ 未获取到页面参数 id'
)
console
.
warn
(
'⚠️ 未获取到页面参数 id'
,
options
,
currentPage
.
options
)
uni
.
showToast
({
// uni.showToast({
title
:
'参数错误'
,
// title: '参数错误',
icon
:
'none'
// icon: 'none'
})
// })
// uni.redirectTo({
// url: `/pages/xingmaLab/xingmaLab`
// })
}
}
uni
.
hideShareMenu
({
// 启用分享菜单
menus
:
[
'shareTimeline'
]
})
// 启用分享菜单(仅限分享给好友,禁用朋友圈)
uni
.
showShareMenu
({
uni
.
showShareMenu
({
withShareTicket
:
true
,
withShareTicket
:
true
,
menus
:
[
'shareAppMessage'
,
'shareTimeline'
]
menus
:
[
'shareAppMessage'
]
})
})
})
})
...
@@ -375,34 +380,18 @@ export default {
...
@@ -375,34 +380,18 @@ export default {
// 如果无法获取页面实例,返回默认分享内容
// 如果无法获取页面实例,返回默认分享内容
return
{
return
{
title
:
'
星妈实验室详情
'
,
title
:
''
,
path
:
`/pages/XingmaLabDetailPage/XingmaLabDetailPage?id=
${
id
}
`
,
path
:
`/pages/XingmaLabDetailPage/XingmaLabDetailPage?id=
${
id
}
`
,
imageUrl
:
''
imageUrl
:
''
}
}
},
},
onShareTimeline
()
{
// 朋友圈分享已禁用
console
.
log
(
'onShareTimeline 被调用'
)
// onShareTimeline() {
// console.log('onShareTimeline 被调用')
// 获取当前页面的数据
// // 朋友圈分享功能已禁用
const
pages
=
getCurrentPages
()
// return null
const
currentPage
=
pages
[
pages
.
length
-
1
]
// }
const
options
=
currentPage
.
options
||
{}
const
id
=
options
.
id
||
''
// 获取页面实例
const
pageInstance
=
currentPage
.
$vm
if
(
pageInstance
&&
pageInstance
.
getShareData
)
{
return
pageInstance
.
getShareData
()
}
// 如果无法获取页面实例,返回默认分享内容
return
{
title
:
'星妈实验室详情'
,
path
:
`/pages/XingmaLabDetailPage/XingmaLabDetailPage?id=
${
id
}
`
,
imageUrl
:
''
}
}
}
}
</
script
>
</
script
>
...
...
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