Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
f91f9b8e
提交
f91f9b8e
authored
11月 19, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传视频进度增加时间点参数
上级
bbf95155
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
40 行增加
和
7 行删除
+40
-7
ChapterApi.js
learnOnline/apiService/ChapterApi.js
+3
-2
show.js
learnOnline/pages/videoPlayer/show.js
+10
-0
project.config.json
learnOnline/project.config.json
+27
-5
没有找到文件。
learnOnline/apiService/ChapterApi.js
浏览文件 @
f91f9b8e
...
...
@@ -101,7 +101,7 @@ const getCurrentChapterDetail = (vid, videoType,callback) => {
callback
:
function
(
res
)
{
let
json
=
{
video
:
{
src
:
videoType
==
3
?
res
.
data
.
video
&&
res
.
data
.
video
.
L
D
:
res
.
data
.
video
[
0
]
&&
res
.
data
.
video
[
0
].
playurl
,
src
:
videoType
==
3
?
res
.
data
.
video
&&
res
.
data
.
video
.
S
D
:
res
.
data
.
video
[
0
]
&&
res
.
data
.
video
[
0
].
playurl
,
spareSrc
:
''
// 正式环境时,需要将 contentVideo 中 spareSrc 改成 src
},
audio
:
{
...
...
@@ -148,7 +148,8 @@ const updateProgress = (obj) => {
v
:
obj
.
vid
,
_p
:
obj
.
pt
,
// 累计时间
_m
:
obj
.
mpt
,
// 当前播放最大时间
_c
:
obj
.
cpt
// 当前播放位置
_c
:
obj
.
cpt
,
// 当前播放位置
ps
:
obj
.
ps
// 时间点
},
callback
:
function
(
res
)
{}
})
...
...
learnOnline/pages/videoPlayer/show.js
浏览文件 @
f91f9b8e
...
...
@@ -529,6 +529,15 @@ Page({
break
}
}
// 记录播放时间点,进度上传后会清空
if
(
!
_obj
.
currentTime
)
{
return
}
this
.
realTimeProgress
.
ps
=
this
.
realTimeProgress
.
ps
||
[]
const
hasTimePoint
=
this
.
realTimeProgress
.
ps
.
includes
(
_obj
.
currentTime
)
if
(
!
hasTimePoint
)
{
this
.
realTimeProgress
.
ps
.
push
(
_obj
.
currentTime
)
}
},
/* 增加定时器,每过10000ms,把数据存入localStorage一次 并 提交一次 */
...
...
@@ -560,6 +569,7 @@ Page({
_rProgress
.
cpt
=
tempTime
_rProgress
.
mpt
=
tempTime
>
_rProgress
.
mpt
?
tempTime
:
_rProgress
.
mpt
ChapterApi
.
updateProgress
(
_rProgress
)
this
.
realTimeProgress
.
ps
=
[]
}
},
10000
)
}
...
...
learnOnline/project.config.json
浏览文件 @
f91f9b8e
...
...
@@ -3,12 +3,37 @@
"setting"
:
{
"urlCheck"
:
true
,
"es6"
:
true
,
"enhance"
:
false
,
"postcss"
:
true
,
"preloadBackgroundData"
:
false
,
"minified"
:
true
,
"newFeature"
:
true
"newFeature"
:
true
,
"coverView"
:
true
,
"nodeModules"
:
false
,
"autoAudits"
:
false
,
"showShadowRootInWxmlPanel"
:
true
,
"scopeDataCheck"
:
false
,
"uglifyFileName"
:
false
,
"checkInvalidKey"
:
true
,
"checkSiteMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
false
,
"useMultiFrameRuntime"
:
false
,
"useApiHook"
:
true
,
"babelSetting"
:
{
"ignore"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
},
"useIsolateContext"
:
true
,
"useCompilerModule"
:
true
,
"userConfirmedUseCompilerModuleSwitch"
:
false
,
"packNpmManually"
:
false
,
"packNpmRelationList"
:
[],
"minifyWXSS"
:
true
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.3.0
"
,
"libVersion"
:
"2.12.2
"
,
"appid"
:
"wx944151f4ea4203a4"
,
"projectname"
:
"learnOnline"
,
"isGameTourist"
:
false
,
...
...
@@ -16,11 +41,9 @@
"simulatorPluginLibVersion"
:
{},
"condition"
:
{
"search"
:
{
"current"
:
-1
,
"list"
:
[]
},
"conversation"
:
{
"current"
:
-1
,
"list"
:
[]
},
"game"
:
{
...
...
@@ -28,7 +51,6 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
-1
,
"list"
:
[]
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论