Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
575e6363
提交
575e6363
authored
11月 08, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 看回放增加缺课、迟到补签功能
上级
4265544c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
52 行增加
和
21 行删除
+52
-21
.config.dev.js
.config.dev.js
+2
-2
courseDetail.vue
src/pages/learn/courseDetail.vue
+20
-6
list.vue
src/pages/mobile/list.vue
+30
-13
没有找到文件。
.config.dev.js
浏览文件 @
575e6363
module
.
exports
=
{
module
.
exports
=
{
domain
:
'dev.ezijing.com'
,
domain
:
'dev.ezijing.com'
,
url
:
'https://learn-api.ezijing.com/api'
,
url
:
'https://learn-api.ezijing.com/api'
,
apiBaseURL
:
'https://learn-api.ezijing.com'
,
apiBaseURL
:
'https://learn-api
2
.ezijing.com'
,
others
:
{
others
:
{
url
:
'/app/learn/course'
,
url
:
'/app/learn/course'
,
loginUrl
:
'https://login.ezijing.com/wmp/login/index'
loginUrl
:
'https://login
2
.ezijing.com/wmp/login/index'
},
},
webpack
:
{
webpack
:
{
externals
:
{
externals
:
{
...
...
src/pages/learn/courseDetail.vue
浏览文件 @
575e6363
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
<el-tag
v-if=
"item1.live.sign_status === 2"
type=
"danger"
size=
"small"
>
迟到
</el-tag>
<el-tag
v-if=
"item1.live.sign_status === 2"
type=
"danger"
size=
"small"
>
迟到
</el-tag>
<template
v-if=
"[3, 5].includes(item1.live.live_status)"
>
<template
v-if=
"[3, 5].includes(item1.live.live_status)"
>
<el-tag
v-if=
"item1.live.sign_status === 3"
type=
"danger"
size=
"small"
>
缺课
</el-tag>
<el-tag
v-if=
"item1.live.sign_status === 3"
type=
"danger"
size=
"small"
>
缺课
</el-tag>
<el-tag
v-if=
"item1.live.sign_status === 4"
type=
"success"
size=
"small"
>
已完成
</el-tag>
</
template
>
</
template
>
</template>
</template>
</template>
</template>
...
@@ -745,6 +746,15 @@ export default {
...
@@ -745,6 +746,15 @@ export default {
const
{
sid
,
cid
,
vid
,
type
}
=
data
const
{
sid
,
cid
,
vid
,
type
}
=
data
/* 进入详情页,不管是哪个,都存localstorage */
/* 进入详情页,不管是哪个,都存localstorage */
window
.
localStorage
.
setItem
(
'headerInfo'
,
JSON
.
stringify
(
this
.
headerInfo
))
window
.
localStorage
.
setItem
(
'headerInfo'
,
JSON
.
stringify
(
this
.
headerInfo
))
const
live
=
data
.
live
const
hasRecordUrl
=
live
.
enable_record
&&
live
.
record_url
if
([
3
,
5
].
includes
(
live
.
live_status
)
&&
hasRecordUrl
)
{
// 回看时,(缺课,迟到)先默认签到,隐藏签到成功弹窗
if
([
2
,
3
].
includes
(
live
.
sign_status
))
{
this
.
fetchSignIn
(
data
,
true
)
return
}
}
if
(
type
===
1
)
{
if
(
type
===
1
)
{
return
return
}
}
...
@@ -984,19 +994,23 @@ export default {
...
@@ -984,19 +994,23 @@ export default {
if
(
r
!=
null
)
return
unescape
(
r
[
2
])
if
(
r
!=
null
)
return
unescape
(
r
[
2
])
return
null
return
null
},
},
fetchSignIn
(
item
)
{
fetchSignIn
(
item
,
hidePopup
)
{
cAction
.
Player
.
signIn
(
item
.
live
.
id
)
cAction
.
Player
.
signIn
(
item
.
live
.
id
)
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
code
,
status
}
=
res
const
{
code
,
status
}
=
res
if
(
code
===
0
)
{
if
(
code
===
0
)
{
this
.
popup
.
signStatus
=
status
if
(
hidePopup
)
{
this
.
popup
.
visible
=
true
window
.
open
(
item
.
live
.
record_url
)
this
.
popup
.
data
=
item
}
else
{
this
.
updatePages
()
this
.
popup
.
signStatus
=
status
this
.
popup
.
visible
=
true
this
.
popup
.
data
=
item
this
.
updatePages
()
}
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
||
'签到失败'
)
if
(
!
hidePopup
)
this
.
$message
.
error
(
e
.
message
||
'签到失败'
)
})
})
}
}
}
}
...
...
src/pages/mobile/list.vue
浏览文件 @
575e6363
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
<
el
-
tag
v
-
if
=
"subitem.sign_status === 1"
type
=
"success"
size
=
"small"
style
=
"float:right;"
>
已签到
<
/el-tag
>
<
el
-
tag
v
-
if
=
"subitem.sign_status === 1"
type
=
"success"
size
=
"small"
style
=
"float:right;"
>
已签到
<
/el-tag
>
<
template
v
-
if
=
"[3, 5].includes(subitem.live_status)"
>
<
template
v
-
if
=
"[3, 5].includes(subitem.live_status)"
>
<
el
-
tag
v
-
if
=
"subitem.sign_status === 3"
type
=
"danger"
size
=
"small"
style
=
"float:right;"
>
缺课
<
/el-tag
>
<
el
-
tag
v
-
if
=
"subitem.sign_status === 3"
type
=
"danger"
size
=
"small"
style
=
"float:right;"
>
缺课
<
/el-tag
>
<
el
-
tag
v
-
if
=
"subitem.sign_status === 4"
type
=
"success"
size
=
"small"
style
=
"float:right;"
>
已完成
<
/el-tag
>
<
/template
>
<
/template
>
<
/template
>
<
/template
>
<
/div
>
<
/div
>
...
@@ -181,10 +182,22 @@ export default {
...
@@ -181,10 +182,22 @@ export default {
data
.
live_status
=
parseInt
(
data
.
live_status
)
data
.
live_status
=
parseInt
(
data
.
live_status
)
const
{
live_status
:
liveStatus
,
type
:
liveType
}
=
data
const
{
live_status
:
liveStatus
,
type
:
liveType
}
=
data
const
hasRecordUrl
=
data
.
enable_record
&&
data
.
record_url
const
hasRecordUrl
=
data
.
enable_record
&&
data
.
record_url
if
([
3
,
5
].
includes
(
liveStatus
)
&&
!
hasRecordUrl
)
{
if
([
3
,
5
].
includes
(
liveStatus
))
{
this
.
message
&&
this
.
message
.
close
()
if
(
!
hasRecordUrl
)
{
this
.
message
=
this
.
$message
({
type
:
'warning'
,
offset
:
0
,
message
:
this
.
$t
(
'live.liveEnd'
)
}
)
this
.
message
&&
this
.
message
.
close
()
return
this
.
message
=
this
.
$message
({
type
:
'warning'
,
offset
:
0
,
message
:
this
.
$t
(
'live.liveEnd'
)
}
)
return
}
else
{
// 回看时,先默认签到,隐藏签到成功弹窗
if
([
2
,
3
].
includes
(
data
.
sign_status
))
{
this
.
fetchSignIn
(
data
,
courseId
,
true
)
return
}
}
// if ([2, 3].includes(data.sign_status))
{
// this.fetchSignIn(data, courseId, true)
// return
//
}
}
}
if
(
liveType
===
5
)
{
if
(
liveType
===
5
)
{
// 打开云直播
// 打开云直播
...
@@ -196,7 +209,7 @@ export default {
...
@@ -196,7 +209,7 @@ export default {
this
.
openCloudClass
(
data
)
this
.
openCloudClass
(
data
)
return
return
}
}
this
.
openNewWindow
(
data
.
record_url
||
data
.
join_url
)
this
.
openNewWindow
(
data
.
join_url
)
}
,
}
,
// 打开云课堂
// 打开云课堂
openCloudClass
(
data
)
{
openCloudClass
(
data
)
{
...
@@ -276,21 +289,25 @@ export default {
...
@@ -276,21 +289,25 @@ export default {
}
}
return result
return result
}
,
}
,
fetchSignIn(item, courseId) {
fetchSignIn(item, courseId
, hidePopup
) {
cAction.Player.signIn(item.id)
cAction.Player.signIn(item.id)
.then(res => {
.then(res => {
const { code, status
}
= res
const { code, status
}
= res
if (code === 0) {
if (code === 0) {
this.popup.signStatus = status
if (hidePopup) {
this.popup.visible = true
this.openNewWindow(item.record_url)
this.popup.data = item
}
else {
this.popup.courseId = courseId
this.popup.signStatus = status
this.getNewLiveMsg()
this.popup.visible = true
this.getLiveList()
this.popup.data = item
this.popup.courseId = courseId
this.getNewLiveMsg()
this.getLiveList()
}
}
}
}
)
}
)
.catch(e => {
.catch(e => {
this.$message.error(e.message || '签到失败')
if (!hidePopup)
this.$message.error(e.message || '签到失败')
}
)
}
)
}
}
}
,
}
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论