Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
9aa080eb
提交
9aa080eb
authored
7月 30, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 签到成功弹窗提示
上级
04bd251f
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
50 行增加
和
19 行删除
+50
-19
popup.vue
src/components/popup.vue
+7
-3
course.vue
src/pages/learn/course.vue
+30
-3
courseDetail.vue
src/pages/learn/courseDetail.vue
+5
-4
list.vue
src/pages/mobile/list.vue
+8
-9
没有找到文件。
src/components/popup.vue
浏览文件 @
9aa080eb
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
{{
title
}}
{{
title
}}
<i
class=
"icon-close el-icon-close"
@
click=
"handleClose"
></i>
<i
class=
"icon-close el-icon-close"
@
click=
"handleClose"
></i>
</div>
</div>
<slot></slot>
<div
class=
"content"
>
<slot></slot>
</div>
</div>
</div>
<div
class=
"overlay"
></div>
<div
class=
"overlay"
></div>
</div>
</div>
...
@@ -48,7 +50,6 @@ export default {
...
@@ -48,7 +50,6 @@ export default {
top
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
z-index
:
2000
;
z-index
:
2000
;
background
:
#fff
;
max-width
:
80vw
;
max-width
:
80vw
;
border-radius
:
5px
;
border-radius
:
5px
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -59,7 +60,7 @@ export default {
...
@@ -59,7 +60,7 @@ export default {
color
:
#fff
;
color
:
#fff
;
padding
:
10px
40px
10px
15px
;
padding
:
10px
40px
10px
15px
;
position
:
relative
;
position
:
relative
;
min-width
:
19
0px
;
min-width
:
22
0px
;
}
}
.title
>
i
{
.title
>
i
{
position
:
absolute
;
position
:
absolute
;
...
@@ -71,4 +72,7 @@ export default {
...
@@ -71,4 +72,7 @@ export default {
.title
>
i
:hover
{
.title
>
i
:hover
{
color
:
#e3e3e3
;
color
:
#e3e3e3
;
}
}
.content
{
background
:
#fff
;
}
</
style
>
</
style
>
src/pages/learn/course.vue
浏览文件 @
9aa080eb
...
@@ -96,17 +96,28 @@
...
@@ -96,17 +96,28 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
<app-popup
:title=
"popup.title"
:visible
.
sync=
"popup.visible"
>
<p
v-if=
"newLiveMsg.live"
class=
"popup-content"
@
click=
"goLive"
>
{{newLiveMsg.course_name}} {{newLiveMsg.live.start_time}}
<span>
进入直播
</span>
</p>
</app-popup>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
cAction
from
'@action'
import
cAction
from
'@action'
import
AppPopup
from
'@/components/popup'
let
UserInfo
=
{}
let
UserInfo
=
{}
export
default
{
export
default
{
components
:
{},
components
:
{
AppPopup
},
data
()
{
data
()
{
UserInfo
=
window
.
G
.
UserInfo
.
student_info
||
{}
UserInfo
=
window
.
G
.
UserInfo
.
student_info
||
{}
return
{
return
{
popup
:
{
title
:
'签到成功'
,
visible
:
false
,
data
:
{}
},
userInfo
:
{},
userInfo
:
{},
filter
:
{
filter
:
{
studyEarly
:
'down'
,
studyEarly
:
'down'
,
...
@@ -292,12 +303,15 @@ export default {
...
@@ -292,12 +303,15 @@ export default {
cAction
.
Player
.
signIn
(
id
)
cAction
.
Player
.
signIn
(
id
)
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
code
,
status
}
=
res
const
{
code
,
status
}
=
res
let
msg
=
''
if
(
code
===
0
)
{
if
(
code
===
0
)
{
if
(
status
===
1
)
{
if
(
status
===
1
)
{
this
.
$message
.
success
(
'签到成功'
)
msg
=
'签到成功'
}
else
if
(
status
===
2
)
{
}
else
if
(
status
===
2
)
{
this
.
$message
.
success
(
'课程已开始,您已迟到,请于课后补看错过视频'
)
msg
=
'课程已开始,您已迟到,请于课后补看错过视频'
}
}
this
.
popup
.
title
=
msg
this
.
popup
.
visible
=
true
this
.
getLatestLive
()
this
.
getLatestLive
()
}
}
})
})
...
@@ -310,6 +324,19 @@ export default {
...
@@ -310,6 +324,19 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.popup-content
{
padding
:
16px
15px
;
font-size
:
14px
;
cursor
:pointer
;
margin
:
0
;
}
.popup-content
:hover
,
.popup-content
:hover
span
{
color
:
#d21f28
;
}
.popup-content
span
{
color
:
#999
;
font-size
:
12px
;
}
.live-msg
{
.live-msg
{
position
:
relative
;
position
:
relative
;
padding
:
40px
;
padding
:
40px
;
...
...
src/pages/learn/courseDetail.vue
浏览文件 @
9aa080eb
...
@@ -92,10 +92,10 @@
...
@@ -92,10 +92,10 @@
<template>
<template>
{{
item1
.
live
.
start_time
}}
{{
item1
.
live
.
statusStr
}}
{{
item1
.
live
.
start_time
}}
{{
item1
.
live
.
statusStr
}}
<el-button
v-if=
"[-1, 0].includes(item1.live.sign_status)"
class=
"in-btn"
type=
"primary"
size=
"mini"
round
@
click
.
stop=
"handleSignIn(item1)"
>
签到
</el-button>
<el-button
v-if=
"[-1, 0].includes(item1.live.sign_status)"
class=
"in-btn"
type=
"primary"
size=
"mini"
round
@
click
.
stop=
"handleSignIn(item1)"
>
签到
</el-button>
<
!--
<el-tag
v-if=
"[3, 5].includes(item1.live.live_status) && [2, 3].includes(item1.live.sign_status)"
type=
"danger"
size=
"small"
>
{{
item1
.
live
.
sign_status
===
2
?
'迟到'
:
'漏签'
}}
</el-tag>
--
>
<
el-tag
v-if=
"item1.live.sign_status === 1"
type=
"success"
size=
"small"
>
已签到
</el-tag
>
<el-tag
v-if=
"
[1, 2].includes(item1.live.sign_status)"
type=
"danger"
size=
"small"
>
{{
item1
.
live
.
sign_status
===
2
?
'迟到'
:
'已签到'
}}
</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=
"
success
"
size=
"small"
>
缺课
</el-tag>
<el-tag
v-if=
"item1.live.sign_status === 3"
type=
"
danger
"
size=
"small"
>
缺课
</el-tag>
</
template
>
</
template
>
</template>
</template>
</div>
</div>
...
@@ -1002,9 +1002,10 @@ export default {
...
@@ -1002,9 +1002,10 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.popup-content
{
.popup-content
{
padding
:
2
px
15px
;
padding
:
16
px
15px
;
font-size
:
14px
;
font-size
:
14px
;
cursor
:pointer
;
cursor
:pointer
;
margin
:
0
;
}
}
.popup-content
:hover
,
.popup-content
:hover
span
{
.popup-content
:hover
,
.popup-content
:hover
span
{
color
:
#d21f28
;
color
:
#d21f28
;
...
...
src/pages/mobile/list.vue
浏览文件 @
9aa080eb
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
v
-
if
=
"[-1, 0].includes(latest.live.sign_status)"
class
=
"right"
@
click
=
"onClick(latest.live, latest.course_id)"
>
<
div
v
-
if
=
"[-1, 0].includes(latest.live.sign_status)"
class
=
"right"
@
click
=
"onClick(latest.live, latest.course_id)"
>
<
el
-
tag
size
=
"small"
@
click
.
stop
=
"handleSignIn(latest.live)"
>
签
到
<
/el-tag
>
<
el
-
tag
size
=
"small"
@
click
.
stop
=
"handleSignIn(latest.live
, latest.course_id
)"
>
签
到
<
/el-tag
>
<
/div
>
<
/div
>
<
div
v
-
else
class
=
"right"
@
click
=
"onClick(latest.live, latest.course_id)"
>
{{
$t
(
'live.goLive'
)
}}
<
/div
>
<
div
v
-
else
class
=
"right"
@
click
=
"onClick(latest.live, latest.course_id)"
>
{{
$t
(
'live.goLive'
)
}}
<
/div
>
<
/div
>
<
/div
>
...
@@ -33,9 +33,10 @@
...
@@ -33,9 +33,10 @@
<
div
class
=
"live-item-content__status"
>
<
div
class
=
"live-item-content__status"
>
{{
calcTimeText
(
subitem
)
}}
{{
calcTimeText
(
subitem
)
}}
<
el
-
tag
v
-
if
=
"[-1, 0].includes(subitem.sign_status)"
style
=
"float:right;"
size
=
"small"
@
click
.
stop
=
"handleSignIn(subitem, item.course_id)"
>
签
到
<
/el-tag
>
<
el
-
tag
v
-
if
=
"[-1, 0].includes(subitem.sign_status)"
style
=
"float:right;"
size
=
"small"
@
click
.
stop
=
"handleSignIn(subitem, item.course_id)"
>
签
到
<
/el-tag
>
<
el
-
tag
v
-
if
=
"[1, 2].includes(subitem.sign_status)"
type
=
"danger"
style
=
"float:right;"
size
=
"small"
>
{{
subitem
.
sign_status
===
2
?
'迟到'
:
'已签到'
}}
<
/el-tag
>
<
el
-
tag
v
-
if
=
"subitem.sign_status === 2"
type
=
"danger"
style
=
"float:right;"
size
=
"small"
>
迟到
<
/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
=
"
success
"
size
=
"small"
style
=
"float:right;"
>
缺课
<
/el-tag
>
<
el
-
tag
v
-
if
=
"subitem.sign_status === 3"
type
=
"
danger
"
size
=
"small"
style
=
"float:right;"
>
缺课
<
/el-tag
>
<
/template
>
<
/template
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -44,8 +45,8 @@
...
@@ -44,8 +45,8 @@
<
/template
>
<
/template
>
<
/div
>
<
/div
>
<
app
-
popup
:
title
=
"popup.title"
:
visible
.
sync
=
"popup.visible"
>
<
app
-
popup
:
title
=
"popup.title"
:
visible
.
sync
=
"popup.visible"
>
<
p
v
-
if
=
"popup.data"
class
=
"popup-content"
@
click
=
"
jumpToOtherVA(popup.data
)"
>
<
p
v
-
if
=
"popup.data"
class
=
"popup-content"
@
click
=
"
onClick(popup.data, popup.courseId
)"
>
{{
popup
.
data
topic
}}
{{
popup
.
data
.
start_time
}}
<
span
>
进入直播
<
/span
>
{{
popup
.
data
.
topic
}}
{{
popup
.
data
.
start_time
}}
<
span
>
进入直播
<
/span
>
<
/p
>
<
/p
>
<
/app-popup
>
<
/app-popup
>
<
/div
>
<
/div
>
...
@@ -314,12 +315,10 @@ export default {
...
@@ -314,12 +315,10 @@ export default {
</script>
</script>
<style>
<style>
.popup-content{
.popup-content{
padding:
2
px 15px;
padding:
16
px 15px;
font-size:14px;
font-size:14px;
cursor:pointer;
cursor:pointer;
}
margin:0;
.popup-content:hover,.popup-content:hover span{
color:#d21f28;
}
}
.popup-content span{
.popup-content span{
color:#999;
color:#999;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论