Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
8bbcb4e1
提交
8bbcb4e1
authored
8月 23, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 签到未开始提示弹窗
上级
030db9f2
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
11 行删除
+26
-11
popup.vue
src/components/popup.vue
+11
-5
course.vue
src/pages/learn/course.vue
+4
-2
courseDetail.vue
src/pages/learn/courseDetail.vue
+4
-2
list.vue
src/pages/mobile/list.vue
+7
-2
没有找到文件。
src/components/popup.vue
浏览文件 @
8bbcb4e1
<
template
>
<
template
>
<div
class=
"popup"
v-show=
"visible"
>
<div
class=
"popup"
v-show=
"visible"
>
<div
class=
"popup-container"
:class=
"signStatus === 1 ? 'success':'warn'
"
>
<div
:class=
"
{ 'popup-container': true, success: signStatus === 1, warn: signStatus === 2 }
">
<p
v-if=
"signStatus === 1"
class=
"success"
>
签到成功!
</p>
<p
v-if=
"signStatus === 1"
class=
"success"
>
签到成功!
</p>
<p
v-if=
"signStatus === 2"
class=
"warn"
>
<p
v-if=
"signStatus === 2"
class=
"warn"
>
您已迟到。
<span>
请于课后补看错过视频。
</span>
您已迟到。
<span>
请于课后补看错过视频。
</span>
</p>
</p>
<p
v-if=
"signStatus === -1"
class=
"info"
>
直播未开始
<span>
请提前10分钟进入签到
</span>
</p>
<div
class=
"content"
>
<div
class=
"content"
>
<slot></slot>
<slot></slot>
</div>
</div>
...
@@ -72,14 +75,17 @@ export default {
...
@@ -72,14 +75,17 @@ export default {
text-align
:
center
;
text-align
:
center
;
margin
:
0
;
margin
:
0
;
}
}
.popup-container
p
.warn
{
.popup-container
p
span
{
color
:
#D51E2A
;
}
.popup-container
p
.warn
span
{
color
:
#959595
;
color
:
#959595
;
font-size
:
18px
;
font-size
:
18px
;
display
:
block
;
display
:
block
;
}
}
.popup-container
p
.warn
{
color
:
#D51E2A
;
}
.popup-container
p
.info
{
color
:
#333
;
}
.popup-container
>
i
{
.popup-container
>
i
{
position
:
absolute
;
position
:
absolute
;
left
:
50%
;
left
:
50%
;
...
...
src/pages/learn/course.vue
浏览文件 @
8bbcb4e1
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
</div>
</div>
</div>
</div>
<app-popup
:signStatus=
"popup.signStatus"
:visible
.
sync=
"popup.visible"
>
<app-popup
:signStatus=
"popup.signStatus"
:visible
.
sync=
"popup.visible"
>
<el-button
type=
"primary"
round
size=
"medium"
@
click=
"goLive"
>
进入直播
</el-button>
<el-button
v-if=
"['1', '2'].includes(popup.signStatus)"
type=
"primary"
round
size=
"medium"
@
click=
"goLive"
>
进入直播
</el-button>
</app-popup>
</app-popup>
</div>
</div>
</template>
</template>
...
@@ -173,7 +173,9 @@ export default {
...
@@ -173,7 +173,9 @@ export default {
methods
:
{
methods
:
{
handleSignIn
(
status
)
{
handleSignIn
(
status
)
{
if
(
status
===
-
1
)
{
if
(
status
===
-
1
)
{
this
.
$message
.
error
(
'直播未开始,请提前10分钟进入签到'
)
// this.$message.error('直播未开始,请提前10分钟进入签到')
this
.
popup
.
signStatus
=
-
1
this
.
popup
.
visible
=
true
}
else
if
(
status
===
0
)
{
}
else
if
(
status
===
0
)
{
this
.
fetchSignIn
()
this
.
fetchSignIn
()
}
}
...
...
src/pages/learn/courseDetail.vue
浏览文件 @
8bbcb4e1
...
@@ -275,7 +275,7 @@
...
@@ -275,7 +275,7 @@
</el-row>
</el-row>
</div>
</div>
<app-popup
:signStatus=
"popup.signStatus"
:visible
.
sync=
"popup.visible"
>
<app-popup
:signStatus=
"popup.signStatus"
:visible
.
sync=
"popup.visible"
>
<el-button
type=
"primary"
round
size=
"medium"
@
click=
"jumpToOtherVA(popup.data)"
>
进入直播
</el-button>
<el-button
v-if=
"['1', '2'].includes(popup.signStatus)"
type=
"primary"
round
size=
"medium"
@
click=
"jumpToOtherVA(popup.data)"
>
进入直播
</el-button>
</app-popup>
</app-popup>
</div>
</div>
</template>
</template>
...
@@ -626,7 +626,9 @@ export default {
...
@@ -626,7 +626,9 @@ export default {
},
},
handleSignIn
(
item
)
{
handleSignIn
(
item
)
{
if
(
item
.
live
.
sign_status
===
-
1
)
{
if
(
item
.
live
.
sign_status
===
-
1
)
{
this
.
$message
.
error
(
'直播未开始,请提前10分钟进入签到'
)
// this.$message.error('直播未开始,请提前10分钟进入签到')
this
.
popup
.
signStatus
=
-
1
this
.
popup
.
visible
=
true
}
else
{
}
else
{
this
.
fetchSignIn
(
item
)
this
.
fetchSignIn
(
item
)
}
}
...
...
src/pages/mobile/list.vue
浏览文件 @
8bbcb4e1
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<
/template
>
<
/template
>
<
/div
>
<
/div
>
<
app
-
popup
:
signStatus
=
"popup.signStatus"
:
visible
.
sync
=
"popup.visible"
>
<
app
-
popup
:
signStatus
=
"popup.signStatus"
:
visible
.
sync
=
"popup.visible"
>
<
el
-
button
type
=
"primary"
round
size
=
"medium"
@
click
=
"onClick(popup.data, popup.courseId)"
>
进入直播
<
/el-button
>
<
el
-
button
v
-
if
=
"['1', '2'].includes(popup.signStatus)"
type
=
"primary"
round
size
=
"medium"
@
click
=
"onClick(popup.data, popup.courseId)"
>
进入直播
<
/el-button
>
<
/app-popup
>
<
/app-popup
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -89,7 +89,9 @@ export default {
...
@@ -89,7 +89,9 @@ export default {
methods
:
{
methods
:
{
handleSignIn
(
item
,
courseId
)
{
handleSignIn
(
item
,
courseId
)
{
if
(
item
.
sign_status
===
-
1
)
{
if
(
item
.
sign_status
===
-
1
)
{
this
.
$message
.
error
(
'直播未开始,请提前10分钟进入签到'
)
// this.$message.error('直播未开始,请提前10分钟进入签到')
this
.
popup
.
signStatus
=
-
1
this
.
popup
.
visible
=
true
}
else
{
}
else
{
this
.
fetchSignIn
(
item
,
courseId
)
this
.
fetchSignIn
(
item
,
courseId
)
}
}
...
@@ -286,6 +288,9 @@ export default {
...
@@ -286,6 +288,9 @@ export default {
}
}
}
,
}
,
mounted() {
mounted() {
// window.setTimeout(() => {
// this.handleSignIn({ sign_status: -1
}
)
//
}
, 2000)
this.loading = this.$loading({
this.loading = this.$loading({
lock: true,
lock: true,
text: '',
text: '',
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论