Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
0b811f27
提交
0b811f27
authored
1月 13, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
差异文件
merge..
上级
25e5aa0f
40e03948
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
25 行增加
和
25 行删除
+25
-25
ChapterApi.js
learnOnline/apiService/ChapterApi.js
+5
-10
app.js
learnOnline/app.js
+4
-0
app.json
learnOnline/app.json
+1
-3
config.js
learnOnline/config.js
+3
-3
audioCtrl.js
learnOnline/pages/videoPlayer/contentAudio/audioCtrl.js
+0
-1
show.js
learnOnline/pages/videoPlayer/show.js
+4
-3
project.config.json
learnOnline/project.config.json
+4
-1
util.js
learnOnline/utils/util.js
+4
-4
没有找到文件。
learnOnline/apiService/ChapterApi.js
浏览文件 @
0b811f27
...
...
@@ -100,20 +100,14 @@ const getCurrentChapterDetail = (vid, videoType,callback) => {
},
callback
:
function
(
res
)
{
// 进入视频,开始读取视频时,存储 vid、log_key
wx
.
setStorageSync
({
key
:
'video_001'
,
data
:
{
vid
:
vid
,
log_key
:
res
.
data
.
log_key
||
''
}
})
wx
.
setStorageSync
(
'video_001'
,
{
vid
:
vid
,
log_key
:
res
.
data
.
log_key
||
''
})
let
json
=
{
video
:
{
src
:
videoType
==
3
?
res
.
data
.
video
&&
res
.
data
.
video
.
SD
:
res
.
data
.
video
[
0
]
&&
res
.
data
.
video
[
0
].
playurl
,
src
:
res
.
data
.
video
.
SD
,
spareSrc
:
''
// 正式环境时,需要将 contentVideo 中 spareSrc 改成 src
},
audio
:
{
src
:
videoType
==
3
?
res
.
data
.
video
&&
res
.
data
.
video
.
SQ
:
res
.
data
.
audio
[
0
].
url
,
src
:
res
.
data
.
video
.
SQ
,
poster
:
res
.
data
.
ppts
&&
res
.
data
.
ppts
[
0
]
&&
res
.
data
.
ppts
[
0
].
ppt_url
||
''
},
image
:
{
...
...
@@ -132,9 +126,10 @@ const getCurrentChapterDetail = (vid, videoType,callback) => {
/* 结束时,调用接口 */
const
endVideo
=
()
=>
{
let
json
=
wx
.
getStorageSync
(
'video_001'
)
||
{
vid
:
''
,
log_key
:
''
}
if
(
vid
!==
''
)
{
if
(
json
.
vid
!==
''
)
{
util
.
requestApi
({
url
:
util
.
config
.
URL_PATH1
+
'/v2/education/end-aliyun-video-streaming'
,
method
:
'POST'
,
data
:
json
,
callback
:
function
(
res
)
{}
})
...
...
learnOnline/app.js
浏览文件 @
0b811f27
...
...
@@ -2,9 +2,13 @@ import * as api from './api/base.js'
App
({
store
:
{
pageshow
:
false
,
user
:
{}
// 用户信息
},
onLaunch
:
function
()
{},
onPageNotFound
()
{
wx
.
redirectTo
({
url
:
'pages/login/index'
})
},
checkPageshow
(
callback
)
{
if
(
this
.
store
.
pageshow
)
{
callback
&&
callback
(
true
)
...
...
learnOnline/app.json
浏览文件 @
0b811f27
...
...
@@ -16,9 +16,7 @@
"pages/learnSystem/my/my"
,
"pages/learnSystem/myScore/myScore"
,
"pages/learnSystem/myDiscuss/myDiscuss"
,
"pages/learnSystem/discussDetail/discussDetail"
,
"pages/videoPlayer/AllBugPages/bugPage1/bugPage1"
,
"pages/videoPlayer/AllBugPages/test"
"pages/learnSystem/discussDetail/discussDetail"
],
"window"
:
{
"navigationBarBackgroundColor"
:
"#fff"
,
...
...
learnOnline/config.js
浏览文件 @
0b811f27
...
...
@@ -3,14 +3,14 @@ const env = 'production'
if
(
env
===
'production'
)
{
module
.
exports
=
{
appVersion
:
'enterprise_v3.2.
0
'
,
appVersion
:
'enterprise_v3.2.
2
'
,
apiBaseURL
:
'https://wechat-api.ezijing.com'
,
// 接口请求地址
tenant
:
'classes'
}
}
else
{
module
.
exports
=
{
appVersion
:
'enterprise_v3.2.
0
'
,
apiBaseURL
:
'https://wechat-api.ezijing.com'
,
// 接口请求地址
appVersion
:
'enterprise_v3.2.
2
'
,
apiBaseURL
:
'https://wechat-api
2
.ezijing.com'
,
// 接口请求地址
tenant
:
'classes'
}
}
learnOnline/pages/videoPlayer/contentAudio/audioCtrl.js
浏览文件 @
0b811f27
...
...
@@ -28,7 +28,6 @@ Audio.prototype = {
RATE
:
[
'0.5'
,
'0.8'
,
'1.0'
,
'1.25'
,
'1.5'
],
init
:
function
(
src
,
_that
)
{
let
_auCtx
=
wx
.
createInnerAudioContext
()
wx
.
setInnerAudioOption
({
obeyMuteSwitch
:
false
})
_auCtx
.
autoplay
=
false
_auCtx
.
src
=
src
/* 使用绑定事件,代替wxml中的事件绑定 */
...
...
learnOnline/pages/videoPlayer/show.js
浏览文件 @
0b811f27
...
...
@@ -179,7 +179,7 @@ Page({
})
// CC视频走这个接口
ChapterApi
.
getCurrentChapterDetail
(
vid
,
videoType
,
(
json
)
=>
{
ChapterApi
.
endVideo
()
//
ChapterApi.endVideo()
if
(
!
json
.
is_locked
&&
this
.
data
.
status
.
disable
)
{
this
.
setData
({
'status.disable'
:
false
})
}
...
...
@@ -217,11 +217,11 @@ Page({
this
.
isBackend
=
true
this
.
pauseVA
()
clearInterval
(
this
.
heartbeat
)
ChapterApi
.
endVideo
()
//
ChapterApi.endVideo()
},
onUnload
:
function
()
{
this
.
pauseVA
()
ChapterApi
.
endVideo
()
//
ChapterApi.endVideo()
},
onShow
:
function
()
{
/* 兼容 android 这里发现 android 打开预览大图,然后关闭 自动播放视频,而且关不掉, 兼容android强制关闭视频 */
...
...
@@ -587,6 +587,7 @@ Page({
_rProgress
.
pt
=
parseInt
(
_rProgress
.
pt
)
+
(
10000
/
1000
)
*
1.5
_rProgress
.
cpt
=
tempTime
_rProgress
.
mpt
=
tempTime
>
_rProgress
.
mpt
?
tempTime
:
_rProgress
.
mpt
_rProgress
.
ps
=
_rProgress
.
ps
||
[]
ChapterApi
.
updateProgress
(
Object
.
assign
({},
_rProgress
,
{
ps
:
_rProgress
.
ps
.
join
(
','
)
}))
this
.
realTimeProgress
.
ps
=
[]
}
...
...
learnOnline/project.config.json
浏览文件 @
0b811f27
...
...
@@ -18,16 +18,19 @@
"checkSiteMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
false
,
"useMultiFrameRuntime"
:
fals
e
,
"useMultiFrameRuntime"
:
tru
e
,
"useApiHook"
:
true
,
"useApiHostProcess"
:
true
,
"babelSetting"
:
{
"ignore"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
},
"bundle"
:
false
,
"useIsolateContext"
:
true
,
"useCompilerModule"
:
true
,
"userConfirmedUseCompilerModuleSwitch"
:
false
,
"userConfirmedBundleSwitch"
:
false
,
"packNpmManually"
:
false
,
"packNpmRelationList"
:
[],
"minifyWXSS"
:
true
...
...
learnOnline/utils/util.js
浏览文件 @
0b811f27
...
...
@@ -2,18 +2,18 @@
* 所有相关配置项
*/
const
url_test
=
{
URL_PATH1
:
'https://
lms-api2.ezijing.com
'
,
// 正式域名 - 由于项目变动域名
URL_PATH2
:
'https://
sso2.ezijing.com
'
,
// 正式域名 - 由于项目变动域名
URL_PATH1
:
'https://
wechat-api2.ezijing.com/api/lms
'
,
// 正式域名 - 由于项目变动域名
URL_PATH2
:
'https://
wechat-api2.ezijing.com/api
'
,
// 正式域名 - 由于项目变动域名
outSiteLink
:
'https://e-learning.ezijing.com'
,
// 正式外链
tenant
:
'classes'
,
version
:
'3.2.
0
'
version
:
'3.2.
2
'
}
const
url_online
=
{
URL_PATH1
:
'https://wechat-api.ezijing.com/api/lms-ep'
,
// 正式域名 - 由于项目变动域名
URL_PATH2
:
'https://wechat-api.ezijing.com/api'
,
// 正式域名 - 由于项目变动域名
outSiteLink
:
'https://e-learning.ezijing.com'
,
// 正式外链
tenant
:
'classes'
,
version
:
'3.2.
0
'
version
:
'3.2.
2
'
}
let
config
=
url_online
/* 请求接口统一 重定义 */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论