Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
4bc3a296
提交
4bc3a296
authored
11月 10, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复课程详情页点击'继续学习'可能出错的问题
上级
9945622b
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
3 行删除
+12
-3
player.js
learnOnline/pages/course/player.js
+11
-2
courseContent.js
learnOnline/pages/learnSystem/courseContent/courseContent.js
+1
-1
没有找到文件。
learnOnline/pages/course/player.js
浏览文件 @
4bc3a296
...
@@ -75,12 +75,21 @@ Page({
...
@@ -75,12 +75,21 @@ Page({
return
item
.
children
.
length
return
item
.
children
.
length
})
})
this
.
setData
({
loaded
:
true
,
course
:
response
})
this
.
setData
({
loaded
:
true
,
course
:
response
})
const
activeChapter
=
this
.
findChapter
(
this
.
data
.
chapterId
,
response
.
chapters
)
let
activeChapter
=
null
if
(
this
.
data
.
chapterId
)
{
activeChapter
=
this
.
findChapter
(
this
.
data
.
chapterId
,
response
.
chapters
)
}
else
{
activeChapter
=
response
.
chapters
.
reduce
((
result
,
item
)
=>
{
return
result
.
concat
(
item
.
children
)
},
[])
.
shift
()
}
if
(
activeChapter
)
{
if
(
activeChapter
)
{
// 更新选中的章节
// 更新选中的章节
this
.
updateActiveChapter
(
activeChapter
)
this
.
updateActiveChapter
(
activeChapter
)
// 设置默认展开
// 设置默认展开
this
.
setData
({
'collapseActiveNames[0]'
:
activeChapter
.
parent_id
})
this
.
setData
({
'collapseActiveNames[0]'
:
activeChapter
.
parent_id
,
chapterId
:
activeChapter
.
id
})
}
}
})
})
},
},
...
...
learnOnline/pages/learnSystem/courseContent/courseContent.js
浏览文件 @
4bc3a296
...
@@ -256,7 +256,7 @@ Page({
...
@@ -256,7 +256,7 @@ Page({
*/
*/
startLearn
:
function
(
e
)
{
startLearn
:
function
(
e
)
{
let
_data
=
this
.
data
.
latestVideo
let
_data
=
this
.
data
.
latestVideo
let
cid
=
_data
.
cid
,
sid
=
_data
.
sid
;
let
cid
=
this
.
data
.
headerInfo
.
id
,
sid
=
this
.
data
.
headerInfo
.
sid
;
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
`/pages/course/player?semester_id=
${
sid
}
&id=
${
cid
}
&chapter_id=
${
_data
.
id
}
`
url
:
`/pages/course/player?semester_id=
${
sid
}
&id=
${
cid
}
&chapter_id=
${
_data
.
id
}
`
})
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论