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
dd8e5425
Commit
dd8e5425
authored
Jun 13, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
666666
parent
546bc203
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
17 deletions
+58
-17
ContentLibrary.vue
pages/library/ContentLibrary.vue
+58
-17
No files found.
pages/library/ContentLibrary.vue
View file @
dd8e5425
...
...
@@ -688,6 +688,11 @@
//
}
);
const
libraryData
=
ref
({
"tupianBanben"
:
"1003"
,
"shareInfo"
:{
"shareTitle"
:
"7000万中国家庭都在看!科学育儿,全程陪伴,源于母爱。"
,
"shareImg"
:
"contentLibrary/1003/shareicon.png"
}
,
"bannerList"
:
[
{
"img"
:
"banner-cl0.png"
,
...
...
@@ -1232,22 +1237,22 @@
const
shareTitle
=
ref
(
'7000万中国家庭都在看!科学育儿,全程陪伴,源于母爱。'
);
const
shareImg
=
ref
(
$baseUrl
+
'contentLibrary/1003/shareicon.png'
);
const
shareImg
=
ref
(
'contentLibrary/1003/shareicon.png'
);
onShareAppMessage
(()
=>
{
console
.
log
(
'shareTitle='
,
shareTitle
);
console
.
log
(
'shareImg='
,
shareImg
);
console
.
log
(
'shareTitle='
,
shareTitle
.
value
);
console
.
log
(
'shareImg='
,
shareImg
.
value
);
return
{
title
:
shareTitle
.
value
,
path
:
'/pages/library/ContentLibrary'
,
imageUrl
:
shareImg
.
value
imageUrl
:
$baseUrl
+
shareImg
.
value
}
}
);
const
bannerList
=
ref
([
{
img
:
$baseUrl
+
`contentLibrary/1003/${libraryData?.value?.bannerList[0]?.img
}
`
,
img
:
$baseUrl
+
`contentLibrary/1003/${libraryData?.value?.bannerList[0]?.img
}
`
,
url
:
`${libraryData?.value?.bannerList[0]?.url
}
`
}
,
...
...
@@ -1279,12 +1284,12 @@
'亲子生活'
]);
const
tabConfigs
=
ref
(
{
expert
:
libraryData
?.
value
?.
tabConfigs
?.
expert
,
nutrition
:
libraryData
?.
value
?.
tabConfigs
?.
nutrition
,
momTalk
:
libraryData
?.
value
?.
tabConfigs
?.
momTalk
,
parentingLife
:
libraryData
?.
value
?.
tabConfigs
?.
parentingLife
}
);
const
tabConfigs
=
ref
(
libraryData
?.
value
?.
tabConfigs
//
expert: libraryData?.value?.tabConfigs?.expert,
//
nutrition: libraryData?.value?.tabConfigs?.nutrition,
//
momTalk: libraryData?.value?.tabConfigs?.momTalk,
//
parentingLife: libraryData?.value?.tabConfigs?.parentingLife
);
const
contentList0
=
ref
(
libraryData
?.
value
?.
product
[
0
]);
const
contentList1
=
ref
(
libraryData
?.
value
?.
product
[
1
]);
...
...
@@ -1349,6 +1354,8 @@
const
listData4
=
ref
([]);
const
tupianBanben
=
ref
(
libraryData
?.
value
?.
tupianBanben
);
// Tab状态管理
const
activeTab4
=
ref
(
0
)
const
handleTabChange4
=
(
e
)
=>
{
...
...
@@ -1365,17 +1372,51 @@
onMounted
(
async
()
=>
{
const
{
data
}
=
await
fetchContentLibraryJSON
();
libraryData
.
value
=
{...
data
}
;
tupianBanben
.
value
=
libraryData
.
value
.
tupianBanben
;
contentList0
.
value
=
libraryData
?.
value
?.
product
[
0
];
contentList1
.
value
=
libraryData
?.
value
?.
product
[
1
];
contentList2
.
value
=
libraryData
?.
value
?.
product
[
2
];
contentList01
.
value
=
libraryData
?.
value
?.
product
[
3
];
contentList11
.
value
=
libraryData
?.
value
?.
product
[
4
];
contentList21
.
value
=
libraryData
?.
value
?.
product
[
5
];
contentList02
.
value
=
libraryData
?.
value
?.
product
[
6
];
contentList12
.
value
=
libraryData
?.
value
?.
product
[
7
];
contentList22
.
value
=
libraryData
?.
value
?.
product
[
8
];
contentList03
.
value
=
libraryData
?.
value
?.
product
[
9
];
contentList13
.
value
=
libraryData
?.
value
?.
product
[
10
];
contentList23
.
value
=
libraryData
?.
value
?.
product
[
11
];
listData1
.
value
=
[
contentList0
.
value
,
contentList1
.
value
,
contentList2
.
value
];
listData2
.
value
=
[
contentList01
.
value
,
contentList11
.
value
,
contentList21
.
value
];
listData3
.
value
=
[
contentList02
.
value
,
contentList12
.
value
,
contentList22
.
value
];
listData4
.
value
=
[
contentList03
.
value
,
contentList13
.
value
,
contentList23
.
value
];
// tabConfigs.value = ref(
{
// expert: ['疾病护理', '脑育科普', '孕期护理'],
// nutrition: ['辅食制作', '奶粉百科', '全家营养'],
// momTalk: ['新鲜热议', '家庭生活', '心理成长'],
// parentingLife: ['早教学习', '动画故事', '家庭关系']
//
}
);
bannerList
.
value
=
[
{
img
:
$baseUrl
+
`contentLibrary/${tupianBanben.value
}
/${libraryData?.value?.bannerList[0]?.img
}
`
,
url
:
`${libraryData?.value?.bannerList[0]?.url
}
`
}
,
{
img
:
$baseUrl
+
`contentLibrary/${tupianBanben.value
}
/${libraryData?.value?.bannerList[1]?.img
}
`
,
url
:
`${libraryData?.value?.bannerList[1]?.url
}
`
}
,
{
img
:
$baseUrl
+
`contentLibrary/${tupianBanben.value
}
/${libraryData?.value?.bannerList[2]?.img
}
`
,
url
:
`${libraryData?.value?.bannerList[2]?.url
}
`
}
];
console
.
log
(
'tupianBanben.value='
,
libraryData
.
value
);
tabConfigs
.
value
=
libraryData
?.
value
?.
tabConfigs
;
}
);
...
...
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