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
bf69e3d2
Commit
bf69e3d2
authored
Sep 03, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6666666
parent
4545dc87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
xingmaLab.vue
pages/xingmaLab/xingmaLab.vue
+25
-6
No files found.
pages/xingmaLab/xingmaLab.vue
View file @
bf69e3d2
...
...
@@ -310,6 +310,8 @@ const handleImageLoad = (e, item, index) => {
console
.
log
(
`图片
${
index
}
加载完成,设置高度为:
${
item
.
itemHeight
}
px`
);
}
const
currentItem
=
ref
(
null
);
onShow
(
async
()
=>
{
md
.
sensorComponentLogTake
({
...
...
@@ -333,12 +335,27 @@ onShow(async () => {
componentContent
:
"我的藏品"
});
// console.log('onshow')
await
xingmaLabStore
.
loadXingmaInfo
();
const
pages
=
getCurrentPages
()
let
currentPage
=
pages
[
pages
.
length
-
1
]
const
isFavorite
=
currentPage
?.
options
?.
isFavorite
await
reloadCangguanList
();
await
reloadCangpinList
();
await
reloadShoucangList
();
console
.
log
(
'isFavorite='
,
isFavorite
);
console
.
log
(
'currentPage='
,
currentPage
);
// console.log('onshow')
//1收藏,-1取消收藏,不存在刷新页面
if
(
!
isFavorite
){
await
xingmaLabStore
.
loadXingmaInfo
();
await
reloadCangguanList
();
await
reloadCangpinList
();
await
reloadShoucangList
();
}
else
{
if
(
isFavorite
==
1
){
currentItem
.
value
.
collection
=
true
;
}
else
{
currentItem
.
value
.
collection
=
false
;
}
}
})
...
...
@@ -608,7 +625,7 @@ const handleBottomNavClick = async (navType) => {
const
handleItemClick_cangguan
=
(
item
,
index
)
=>
{
console
.
log
(
'点击了项目藏馆:'
,
item
)
currentItem
.
value
=
item
;
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"星妈lab首页"
,
...
...
@@ -624,6 +641,7 @@ const handleItemClick_cangguan = (item, index) => {
const
handleItemClick_cangpin
=
(
item
,
index
)
=>
{
console
.
log
(
'点击了项目藏品:'
,
item
)
// currentItem.value = item;
// 这里可以添加跳转逻辑
uni
.
navigateTo
({
url
:
'/pages/XingmaLabDetailPage/XingmaLabDetailPage?id='
+
item
.
id
+
'&index='
+
index
...
...
@@ -634,6 +652,7 @@ const handleItemClick_cangpin = (item, index) => {
const
handleItemClick_shoucang
=
(
item
,
index
)
=>
{
console
.
log
(
'点击了项目收藏:'
,
item
)
// 这里可以添加跳转逻辑
// currentItem.value = item;
uni
.
navigateTo
({
url
:
'/pages/XingmaLabDetailPage/XingmaLabDetailPage?id='
+
item
.
id
+
'&index='
+
index
})
...
...
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