Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea_resources_pc
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
tea_resources_pc
Commits
32c78d37
Commit
32c78d37
authored
May 30, 2024
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
72039 【PC端】考核结果显示中的问答题部分,需要按照最新原型修改
parent
d0aacaaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
index.vue
src/views/lessionLearn/index.vue
+20
-1
No files found.
src/views/lessionLearn/index.vue
View file @
32c78d37
...
...
@@ -996,7 +996,7 @@ export default {
}
else
if
(
res
.
data
.
chapterList
[
0
].
currentChapter
)
{
current
=
this
.
findObjectByBusinessId
(
res
.
data
.
chapterList
[
0
].
currentChapter
,
res
.
data
)
}
else
{
current
=
(
this
.
chapterList
[
0
].
childList
[
0
].
childList
[
0
]
?
this
.
chapterList
[
0
].
childList
[
0
].
childList
[
0
]
:
this
.
chapterList
[
0
].
childList
[
0
]
)
current
=
this
.
findObjectByBusinessId
(
this
.
findFirstVideoUrlBusinessId
(
res
.
data
.
chapterList
),
res
.
data
)
}
this
.
sectionClick
(
current
,
current
.
sort
)
})
...
...
@@ -1004,6 +1004,25 @@ export default {
tagClick
(
tag
)
{
this
.
currentTag
=
tag
},
findFirstVideoUrlBusinessId
(
dataList
)
{
for
(
const
item
of
dataList
)
{
// 检查当前对象是否有非空的videoUrl
if
(
item
.
videoUrl
)
{
return
item
.
businessId
;
// 返回第一个找到的非空videoUrl的对象的businessId
}
// 如果当前对象没有videoUrl,但有子列表,则递归查找子列表
if
(
item
.
childList
&&
item
.
childList
.
length
>
0
)
{
const
resultFromChild
=
this
.
findFirstVideoUrlBusinessId
(
item
.
childList
);
if
(
resultFromChild
)
{
return
resultFromChild
;
// 如果在子列表中找到了,直接返回结果
}
}
}
// 如果遍历完当前列表及所有子列表都未找到,根据需求决定是否需要处理这种情况,这里默认返回null
return
null
;
},
findObjectByBusinessId
(
businessId
,
data
)
{
function
searchArray
(
array
)
{
for
(
const
item
of
array
)
{
...
...
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