Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
32fd2525
提交
32fd2525
authored
7月 23, 2019
作者:
hexi
浏览文件
操作
浏览文件
下载
差异文件
修复安卓数据上报
上级
e3592e16
a010751c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
59 行增加
和
12 行删除
+59
-12
.gitignore
.gitignore
+1
-0
history.md
learnOnline/history.md
+4
-0
bindAccount.js
learnOnline/pages/index/bindAccount/bindAccount.js
+20
-4
bindPhone.js
learnOnline/pages/index/bindPhone/bindPhone.js
+20
-3
show.js
learnOnline/pages/videoPlayer/show.js
+14
-5
没有找到文件。
.gitignore
浏览文件 @
32fd2525
...
@@ -3,3 +3,4 @@
...
@@ -3,3 +3,4 @@
config.js
config.js
node_modules
node_modules
npm-debug.log
npm-debug.log
.idea/
learnOnline/history.md
浏览文件 @
32fd2525
#### 3.0.8.2019.07.22
1、修复安卓手机数据上报问题
#### 3.0.7.2019.07.17
1、用户手机号没有绑定微信,后端返回401,弹出提示框
#### 3.0.6.2019.07.16
#### 3.0.6.2019.07.16
1、upload-video 接口在 data 中增加vid传递
1、upload-video 接口在 data 中增加vid传递
#### 3.0.6.2019.07.15
#### 3.0.6.2019.07.15
...
...
learnOnline/pages/index/bindAccount/bindAccount.js
浏览文件 @
32fd2525
...
@@ -13,8 +13,7 @@ const BindAccount = {
...
@@ -13,8 +13,7 @@ const BindAccount = {
/* 点击确定 */
/* 点击确定 */
accountConfirm
:
function
(
e
)
{
accountConfirm
:
function
(
e
)
{
const
_that
=
this
,
_bind
=
_that
.
data
.
bindaccount
const
_that
=
this
,
_bind
=
_that
.
data
.
bindaccount
;
/* 调用接口 - 使用账号登录 */
/* 调用接口 - 使用账号登录 */
wx
.
request
({
wx
.
request
({
url
:
util
.
config
.
URL_PATH2
+
'/user_center/login'
,
url
:
util
.
config
.
URL_PATH2
+
'/user_center/login'
,
...
@@ -24,11 +23,12 @@ const BindAccount = {
...
@@ -24,11 +23,12 @@ const BindAccount = {
service
:
'applet.ezijing.com'
},
method
:
'POST'
,
header
:
{
service
:
'applet.ezijing.com'
},
method
:
'POST'
,
header
:
{
'tenant'
:
util
.
config
.
tenant
,
'tenant'
:
util
.
config
.
tenant
,
'content-type'
:
'application/x-www-form-urlencoded'
,
'content-type'
:
'application/x-www-form-urlencoded'
,
'version'
:
util
.
config
.
version
,
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
statusCode
&&
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
if
(
res
.
statusCode
&&
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
wx
.
hideToast
()
wx
.
hideToast
()
;
wx
.
setStorageSync
(
'userSession'
,
{
sessionKey
:
res
.
data
.
ticket
});
wx
.
setStorageSync
(
'userSession'
,
{
sessionKey
:
res
.
data
.
ticket
});
let
_token
=
wx
.
getStorageSync
(
'userSession'
).
sessionKey
let
_token
=
wx
.
getStorageSync
(
'userSession'
).
sessionKey
...
@@ -43,10 +43,26 @@ const BindAccount = {
...
@@ -43,10 +43,26 @@ const BindAccount = {
token
:
_token
,
token
:
_token
,
tenant
:
util
.
config
.
tenant
,
tenant
:
util
.
config
.
tenant
,
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
,
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
,
'version'
:
util
.
config
.
version
,
unionid
:
wx
.
getStorageSync
(
'union_id'
)
unionid
:
wx
.
getStorageSync
(
'union_id'
)
},
},
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
if
(
res
.
statusCode
!=
200
&&
res
.
statusCode
!=
401
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
if
(
res
.
statusCode
&&
res
.
statusCode
==
401
)
{
// 401特殊处理,这种情况,理解为手机号绑定错误
wx
.
hideToast
();
wx
.
showModal
({
title
:
'提示'
,
content
:
res
.
data
.
message
,
showCancel
:
false
,
complete
(
res
)
{
_that
.
setData
({
'bindaccount.pwd'
:
''
,
});
}
})
return
;
}
let
_userInfo
=
{
let
_userInfo
=
{
avatarUrl
:
res
.
data
.
avatar
||
_that
.
tempUserInfo
.
avatarUrl
||
'无'
,
avatarUrl
:
res
.
data
.
avatar
||
_that
.
tempUserInfo
.
avatarUrl
||
'无'
,
nickName
:
res
.
data
.
nickname
||
_that
.
tempUserInfo
.
nickName
||
'无'
nickName
:
res
.
data
.
nickname
||
_that
.
tempUserInfo
.
nickName
||
'无'
...
...
learnOnline/pages/index/bindPhone/bindPhone.js
浏览文件 @
32fd2525
...
@@ -46,7 +46,7 @@ const BindPhone = {
...
@@ -46,7 +46,7 @@ const BindPhone = {
},
},
/* 点击确定 */
/* 点击确定 */
codeConfirm
:
function
(
e
)
{
codeConfirm
:
function
(
e
)
{
const
_that
=
this
,
_bind
=
_that
.
data
.
bindphone
const
_that
=
this
,
_bind
=
_that
.
data
.
bindphone
;
if
(
!
_bind
.
phone
||
!
/^1
[
3-9
][
0-9
]{9}
$/
.
test
(
_bind
.
phone
))
{
wx
.
showToast
({
title
:
'请填入正确手机号'
,
icon
:
'none'
});
return
;
}
if
(
!
_bind
.
phone
||
!
/^1
[
3-9
][
0-9
]{9}
$/
.
test
(
_bind
.
phone
))
{
wx
.
showToast
({
title
:
'请填入正确手机号'
,
icon
:
'none'
});
return
;
}
if
(
!
_bind
.
code
||
!
/^
\d{4}
$/
.
test
(
_bind
.
code
))
{
wx
.
showToast
({
title
:
'请填入正确验证码'
,
icon
:
'none'
});
return
;
}
if
(
!
_bind
.
code
||
!
/^
\d{4}
$/
.
test
(
_bind
.
code
))
{
wx
.
showToast
({
title
:
'请填入正确验证码'
,
icon
:
'none'
});
return
;
}
wx
.
showToast
({
title
:
'验证中'
,
icon
:
'none'
})
wx
.
showToast
({
title
:
'验证中'
,
icon
:
'none'
})
...
@@ -56,11 +56,12 @@ const BindPhone = {
...
@@ -56,11 +56,12 @@ const BindPhone = {
data
:
{
mobile
:
_bind
.
phone
,
code
:
_bind
.
code
,
service
:
'applet.ezijing.com'
},
method
:
'POST'
,
header
:
{
data
:
{
mobile
:
_bind
.
phone
,
code
:
_bind
.
code
,
service
:
'applet.ezijing.com'
},
method
:
'POST'
,
header
:
{
'tenant'
:
util
.
config
.
tenant
,
'tenant'
:
util
.
config
.
tenant
,
'content-type'
:
'application/x-www-form-urlencoded'
,
'content-type'
:
'application/x-www-form-urlencoded'
,
'version'
:
util
.
config
.
version
,
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
statusCode
&&
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
if
(
res
.
statusCode
&&
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
wx
.
hideToast
()
wx
.
hideToast
()
;
clearInterval
(
_that
.
timer
);
clearInterval
(
_that
.
timer
);
wx
.
setStorageSync
(
'userSession'
,
{
sessionKey
:
res
.
data
.
ticket
});
wx
.
setStorageSync
(
'userSession'
,
{
sessionKey
:
res
.
data
.
ticket
});
...
@@ -76,10 +77,26 @@ const BindPhone = {
...
@@ -76,10 +77,26 @@ const BindPhone = {
token
:
_token
,
token
:
_token
,
'tenant'
:
util
.
config
.
tenant
,
'tenant'
:
util
.
config
.
tenant
,
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
,
'apikey'
:
'kZjHzONjsfkJZPvHwVHMTXvmjZ9D30pS'
,
'version'
:
util
.
config
.
version
,
unionid
:
wx
.
getStorageSync
(
'union_id'
)
unionid
:
wx
.
getStorageSync
(
'union_id'
)
},
},
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
if
(
res
.
statusCode
!=
200
&&
res
.
statusCode
!=
401
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
if
(
res
.
statusCode
&&
res
.
statusCode
==
401
)
{
// 401特殊处理,这种情况,理解为手机号绑定错误
wx
.
hideToast
();
wx
.
showModal
({
title
:
'提示'
,
content
:
res
.
data
.
message
,
showCancel
:
false
,
complete
(
res
)
{
_that
.
setData
({
'bindphone.code'
:
''
,
});
}
})
return
;
}
let
_userInfo
=
{
let
_userInfo
=
{
avatarUrl
:
res
.
data
.
avatar
||
_that
.
tempUserInfo
.
avatarUrl
||
'无'
,
avatarUrl
:
res
.
data
.
avatar
||
_that
.
tempUserInfo
.
avatarUrl
||
'无'
,
nickName
:
res
.
data
.
nickname
||
_that
.
tempUserInfo
.
nickName
||
'无'
nickName
:
res
.
data
.
nickname
||
_that
.
tempUserInfo
.
nickName
||
'无'
...
...
learnOnline/pages/videoPlayer/show.js
浏览文件 @
32fd2525
...
@@ -301,8 +301,8 @@ Page({
...
@@ -301,8 +301,8 @@ Page({
playVA
:
function
()
{
playVA
:
function
()
{
let
_data
=
this
.
data
,
_status
=
_data
.
status
let
_data
=
this
.
data
,
_status
=
_data
.
status
this
.
setData
({
'ctrlBar.isPlay'
:
true
})
this
.
setData
({
'ctrlBar.isPlay'
:
true
})
_status
.
isVideo
&&
this
.
_video
.
play
()
_status
.
isVideo
&&
this
.
_video
.
play
()
;
_status
.
isAudio
&&
this
.
_audio
.
play
()
_status
.
isAudio
&&
this
.
_audio
.
play
()
;
this
.
setHeartbeat
()
this
.
setHeartbeat
()
},
},
/* controlBar页面 - 暂停音视频 - bindTap事件和内部调用 */
/* controlBar页面 - 暂停音视频 - bindTap事件和内部调用 */
...
@@ -335,7 +335,10 @@ Page({
...
@@ -335,7 +335,10 @@ Page({
beginAndOutFullScreen
:
function
(
e
)
{},
beginAndOutFullScreen
:
function
(
e
)
{},
/* VideoOrAudio标签 - 开始/继续播放时触发play事件时,触发 - bindplay事件 */
/* VideoOrAudio标签 - 开始/继续播放时触发play事件时,触发 - bindplay事件 */
beginPlayVA
:
function
()
{
beginPlayVA
:
function
()
{
this
.
setData
({
'initVAFlag'
:
false
})
if
(
this
.
data
.
initVAFlag
){
this
.
setData
({
'initVAFlag'
:
false
})
this
.
setHeartbeat
()
//安卓手机播放之后才会上送进度
}
/* iphone6 8.4.1 首次初始化时,不能直接 设置进度并播放 */
/* iphone6 8.4.1 首次初始化时,不能直接 设置进度并播放 */
if
(
this
.
isFirstInitAndSwitchVideo
)
{
if
(
this
.
isFirstInitAndSwitchVideo
)
{
if
(
!
this
.
_cache
)
this
.
_cache
=
wx
.
getStorageSync
(
'videoCacheCtrlBar'
)
||
{}
if
(
!
this
.
_cache
)
this
.
_cache
=
wx
.
getStorageSync
(
'videoCacheCtrlBar'
)
||
{}
...
@@ -381,8 +384,14 @@ Page({
...
@@ -381,8 +384,14 @@ Page({
let
arr
=
_data
.
ctrlBar
.
currentTime
.
split
(
':'
),
tempTime
=
parseInt
(
arr
[
0
]
*
60
)
+
parseInt
(
arr
[
1
]);
let
arr
=
_data
.
ctrlBar
.
currentTime
.
split
(
':'
),
tempTime
=
parseInt
(
arr
[
0
]
*
60
)
+
parseInt
(
arr
[
1
]);
this
.
setData
({
'ctrlBar.initial_time'
:
tempTime
})
this
.
setData
({
'ctrlBar.initial_time'
:
tempTime
})
/* 这里改成异步的,试一下 */
/* 这里改成异步的,试一下 */
wx
.
setStorage
(
'videoCacheCtrlBar'
,
_data
.
ctrlBar
)
wx
.
setStorage
({
wx
.
setStorage
(
'audioCacheCtrlBar'
,
_data
.
ctrlBar
)
'key'
:
'videoCacheCtrlBar'
,
'data'
:
_data
.
ctrlBar
})
wx
.
setStorage
({
'key'
:
'audioCacheCtrlBar'
,
'data'
:
_data
.
ctrlBar
})
/* 由于 音视频相同,所以 设置方式设置成一致就可以了 */
/* 由于 音视频相同,所以 设置方式设置成一致就可以了 */
/* 提交进度请求, 进度进行中,才计算上进度时间 */
/* 提交进度请求, 进度进行中,才计算上进度时间 */
if
(
this
.
realTimeProgress
&&
tempTime
!=
this
.
realTimeProgress
.
cpt
)
{
if
(
this
.
realTimeProgress
&&
tempTime
!=
this
.
realTimeProgress
.
cpt
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论