Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
7efa5286
提交
7efa5286
authored
7月 16, 2020
作者:
王拯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
在字段为0的情况下隐藏特定导航条
上级
58313b8d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
78 行增加
和
9 行删除
+78
-9
empty.vue
client/src/components/empty.vue
+21
-0
sidebar.vue
client/src/components/learnSysLayout/sidebar.vue
+48
-9
main.js
client/src/main.js
+5
-0
routes.js
client/src/router/routes.js
+4
-0
没有找到文件。
client/src/components/empty.vue
0 → 100644
浏览文件 @
7efa5286
<
template
>
<div
class=
"err-empty"
>
<div
class=
"tit"
>
很抱歉,您当前没有课程
</div>
</div>
</
template
>
<
script
>
export
default
{
mounted
()
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.err-empty
{
margin
:
30px
;
padding
:
0
;
font-style
:
500
;
font-size
:
16px
;
}
</
style
>
client/src/components/learnSysLayout/sidebar.vue
浏览文件 @
7efa5286
...
...
@@ -129,22 +129,61 @@ export default {
showHeaderData
()
{
const
isOpenExamination
=
this
.
UserInfo
.
student_info
.
is_open_learning_notes
||
null
const
isOpenExaminationNotes
=
this
.
UserInfo
.
student_info
.
is_open_examination_notes
||
null
const
isOpenTextbookLearning
=
this
.
UserInfo
.
student_info
.
is_open_textbook_learning
||
null
const
isOpenRequiredCourse
=
this
.
UserInfo
.
student_info
.
is_open_required_course
||
null
const
isOpenXxtendedCourse
=
this
.
UserInfo
.
student_info
.
is_open_extended_course
||
null
var
arrList
=
[]
var
obj
if
(
Number
(
isOpenExamination
)
===
0
&&
Number
(
isOpenExaminationNotes
)
===
0
)
{
if
(
Number
(
isOpenExamination
)
===
0
&&
Number
(
isOpenExaminationNotes
)
===
0
&&
(
Number
(
isOpenTextbookLearning
)
||
Number
(
isOpenRequiredCourse
)
||
Number
(
isOpenXxtendedCourse
))
)
{
this
.
headerData
=
this
.
arrHeader
(
this
.
headerData
).
filter
(
k
=>
k
.
index
!==
'1'
)
this
.
defaultActive
=
'2'
this
.
$router
.
push
({
path
:
'/app/learn/course'
})
}
else
if
(
Number
(
isOpenExamination
)
===
0
)
{
obj
=
{
name
:
'考前须知'
,
index
:
'1-2'
}
arrList
=
this
.
arrHeader
(
this
.
headerData
)
if
(
this
.
defaultActive
===
'1-1'
||
this
.
defaultActive
===
'1-2'
)
{
this
.
defaultActive
=
'2'
this
.
$router
.
push
({
path
:
'/app/learn/course'
})
}
}
else
if
(
Number
(
isOpenExamination
)
===
1
&&
!
Number
(
isOpenExaminationNotes
))
{
obj
=
{
name
:
'学习须知'
,
index
:
'1-1'
}
if
(
Number
(
isOpenTextbookLearning
)
||
Number
(
isOpenRequiredCourse
)
||
Number
(
isOpenXxtendedCourse
))
{
arrList
=
this
.
arrHeader
(
this
.
headerData
)
}
else
{
arrList
=
this
.
arrHeader
(
this
.
headerData
).
filter
(
k
=>
k
.
index
!==
'2'
)
}
arrList
[
0
].
children
.
push
(
obj
)
this
.
headerData
=
arrList
}
else
if
(
Number
(
isOpenExaminationNotes
)
===
0
)
{
obj
=
{
name
:
'学习须知'
,
index
:
'1-1'
}
arrList
=
this
.
arrHeader
(
this
.
headerData
)
}
else
if
(
Number
(
isOpenExaminationNotes
)
===
1
&&
!
Number
(
isOpenExamination
))
{
obj
=
{
name
:
'考前须知'
,
index
:
'1-2'
}
if
(
Number
(
isOpenTextbookLearning
)
||
Number
(
isOpenRequiredCourse
)
||
Number
(
isOpenXxtendedCourse
))
{
arrList
=
this
.
arrHeader
(
this
.
headerData
)
}
else
{
arrList
=
this
.
arrHeader
(
this
.
headerData
).
filter
(
k
=>
k
.
index
!==
'2'
)
}
arrList
[
0
].
children
.
push
(
obj
)
this
.
headerData
=
arrList
if
(
this
.
defaultActive
===
'1-1'
)
{
this
.
defaultActive
=
'1-2'
this
.
$router
.
push
({
path
:
'/app/tips/examina-tips'
})
}
}
else
if
(
Number
(
isOpenExaminationNotes
)
===
1
&&
Number
(
isOpenExamination
)
===
1
)
{
obj
=
[{
name
:
'学习须知'
,
index
:
'1-1'
},
{
name
:
'考前须知'
,
index
:
'1-2'
}]
if
(
Number
(
isOpenTextbookLearning
)
||
Number
(
isOpenRequiredCourse
)
||
Number
(
isOpenXxtendedCourse
))
{
arrList
=
this
.
arrHeader
(
this
.
headerData
)
}
else
{
arrList
=
this
.
arrHeader
(
this
.
headerData
).
filter
(
k
=>
k
.
index
!==
'2'
)
}
obj
.
forEach
((
item
)
=>
{
arrList
[
0
].
children
.
push
(
item
)
})
this
.
headerData
=
arrList
}
else
if
(
!
Number
(
isOpenTextbookLearning
)
&&
!
Number
(
isOpenRequiredCourse
)
&&
!
Number
(
isOpenXxtendedCourse
))
{
if
(
this
.
isExamination
)
{
this
.
headerData
=
this
.
headerData
.
filter
(
k
=>
k
.
index
===
'3'
)
this
.
defaultActive
=
'3'
this
.
$router
.
push
({
path
:
'/app/examination/my-examination'
})
}
else
{
this
.
headerData
=
[]
this
.
$router
.
push
({
path
:
'/empty'
})
}
}
},
goPages
(
str
)
{
...
...
client/src/main.js
浏览文件 @
7efa5286
...
...
@@ -19,6 +19,11 @@ import store from './store'
require
(
'promise.prototype.finally'
).
shim
()
/* 兼容处理 end */
const
VueRouterPush
=
VueRouter
.
prototype
.
push
VueRouter
.
prototype
.
push
=
function
push
(
to
)
{
return
VueRouterPush
.
call
(
this
,
to
).
catch
(
err
=>
err
)
}
Vue
.
use
(
VueRouter
)
Vue
.
use
(
UploadForm
)
Vue
.
component
(
UploadForm
.
name
,
UploadForm
)
...
...
client/src/router/routes.js
浏览文件 @
7efa5286
...
...
@@ -57,6 +57,10 @@ export default [
}
]
},
{
path
:
'/empty'
,
component
:
()
=>
import
(
'@/components/empty.vue'
)
},
{
path
:
'learn'
,
redirect
:
'error/404'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论