Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
c12455e5
提交
c12455e5
authored
1月 27, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增学员须知
上级
1029715f
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
179 行增加
和
3 行删除
+179
-3
OtherAction.js
src/action/OtherAction.js
+8
-0
other_api.js
src/api/other_api.js
+10
-0
app.vue
src/app.vue
+120
-0
en.json
src/assets/languages/en.json
+10
-1
zh-CN.json
src/assets/languages/zh-CN.json
+10
-1
navigation.vue
src/components/learnSysLayout/navigation.vue
+16
-0
index.js
src/store/index.js
+5
-1
没有找到文件。
src/action/OtherAction.js
浏览文件 @
c12455e5
...
@@ -44,4 +44,12 @@ export default class OtherAction extends BaseACTION {
...
@@ -44,4 +44,12 @@ export default class OtherAction extends BaseACTION {
* 修改用户信息
* 修改用户信息
*/
*/
updateUser
(
obj
)
{
return
Other
.
updateUser
(
obj
).
then
(
res
=>
res
)
}
updateUser
(
obj
)
{
return
Other
.
updateUser
(
obj
).
then
(
res
=>
res
)
}
/**
* 签名
*/
createSign
(
obj
)
{
return
Other
.
createSign
(
obj
).
then
(
res
=>
res
)
}
/**
* 获取签名文档
*/
getSignDocument
(
obj
)
{
return
Other
.
getSignDocument
(
obj
).
then
(
res
=>
res
)
}
}
}
src/api/other_api.js
浏览文件 @
c12455e5
...
@@ -53,4 +53,14 @@ export default class OtherAPI extends BaseAPI {
...
@@ -53,4 +53,14 @@ export default class OtherAPI extends BaseAPI {
this
.
post
(
'/api/usercenter/user/update-user'
,
obj
,
{
this
.
post
(
'/api/usercenter/user/update-user'
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
})
/**
* 签名
*/
createSign
=
()
=>
this
.
post
(
'/api/usercenter/v1/sign/sign'
)
/**
* 获取签名文档
*/
getSignDocument
=
(
obj
=
{})
=>
this
.
get
(
'/api/usercenter/v1/sign/document'
,
obj
)
}
}
src/app.vue
浏览文件 @
c12455e5
<
template
>
<
template
>
<div
style=
"height: 100%; width: 100%"
>
<div
style=
"height: 100%; width: 100%"
>
<router-view></router-view>
<router-view></router-view>
<el-dialog
:title=
"$t('components.learnSysLayout.navigation.dialogTitle')"
:width=
"dialogWidth"
:visible
.
sync=
"dialogVisible"
:center=
"true"
:append-to-body=
"true"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
@
closed=
"handleClose"
>
<div
class=
"sign"
>
<p>
{{
$t
(
'components.learnSysLayout.navigation.dialogMessage1'
)
}}
<a
:href=
"$t('components.learnSysLayout.navigation.dialogMessageHref')"
target=
"_blank"
>
{{
$t
(
'components.learnSysLayout.navigation.dialogMessage2'
)
}}
</a
>
{{
$t
(
'components.learnSysLayout.navigation.dialogMessage3'
)
}}
</p>
<el-checkbox
v-model=
"checked"
>
{{
$t
(
'components.learnSysLayout.navigation.dialogCheckbox'
)
}}
</el-checkbox>
</div>
<template
#
footer
>
<el-button
type=
"primary"
:disabled=
"!checked"
@
click=
"handlePrimary"
>
{{
$t
(
'components.learnSysLayout.navigation.dialogButton'
)
}}
</el-button>
</
template
>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
cAction
from
'@/action'
export
default
{
export
default
{
metaInfo
()
{
metaInfo
()
{
return
{
return
{
title
:
this
.
$t
(
'title'
)
title
:
this
.
$t
(
'title'
)
}
}
},
data
()
{
const
UA
=
navigator
.
userAgent
return
{
isMobile
:
/iphone/i
.
test
(
UA
)
||
(
/android/i
.
test
(
UA
)
&&
/mobile/i
.
test
(
UA
)),
dialogVisible
:
false
,
checked
:
false
,
sign
:
{},
documentUrl
:
''
,
timer
:
null
}
},
computed
:
{
dialogWidth
()
{
return
this
.
isMobile
?
'90%'
:
'460px'
}
},
methods
:
{
createSign
()
{
cAction
.
Other
.
createSign
().
then
(
response
=>
{
const
{
code
,
data
}
=
response
if
(
code
===
1
)
{
this
.
sign
=
data
data
.
flowid
&&
this
.
getSignDocument
(
data
.
flowid
).
then
(()
=>
{
if
(
!
this
.
documentUrl
)
{
this
.
dialogVisible
=
true
}
})
}
else
{
this
.
$message
.
error
(
'处理签名失败'
)
}
})
},
getSignDocument
(
flowid
)
{
return
cAction
.
Other
.
getSignDocument
({
flowid
}).
then
(
response
=>
{
const
{
code
,
data
}
=
response
if
(
code
===
1
)
{
this
.
documentUrl
=
data
.
url
this
.
$store
.
commit
(
'updateDocumentUrl'
,
data
.
url
)
}
return
response
})
},
setTimer
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
getSignDocument
(
this
.
sign
.
flowid
).
then
(
response
=>
{
if
(
response
.
code
===
1
)
{
this
.
clearTimer
()
this
.
dialogVisible
=
false
}
else
{
this
.
dialogVisible
=
true
}
})
},
5000
)
},
clearTimer
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
},
handlePrimary
()
{
this
.
setTimer
()
this
.
newWindowPreview
(
this
.
sign
.
shortUrl
)
},
handleClose
()
{
if
(
!
this
.
documentUrl
)
{
window
.
location
.
href
=
webConf
.
others
.
loginUrl
}
},
// 新窗口预览
newWindowPreview
(
url
)
{
const
a
=
document
.
createElement
(
'a'
)
a
.
href
=
url
a
.
target
=
'_blank'
document
.
body
.
appendChild
(
a
)
a
.
click
()
a
.
remove
()
}
},
beforeMount
()
{
this
.
createSign
()
},
destroyed
()
{
this
.
clearTimer
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.sign
{
p
{
text-indent
:
2em
;
line-height
:
24px
;
}
}
</
style
>
src/assets/languages/en.json
浏览文件 @
c12455e5
...
@@ -26,7 +26,16 @@
...
@@ -26,7 +26,16 @@
"learnSysLayout"
:
{
"learnSysLayout"
:
{
"navigation"
:
{
"navigation"
:
{
"title"
:
"Online Learning System"
,
"title"
:
"Online Learning System"
,
"tip"
:
"Notifications"
"tip"
:
"Notifications"
,
"handlbook"
:
"Handlbook"
,
"library"
:
"Library"
,
"dialogTitle"
:
"Notice"
,
"dialogMessage1"
:
"Before using this online learning system, please read "
,
"dialogMessage2"
:
"《Zijing-CU MED Student Handbook》"
,
"dialogMessage3"
:
" very carefully, and agree to follow the instructions, policies and requirements."
,
"dialogMessageHref"
:
"https://zws-imgs-pub.ezijing.com/pc/cu/%E5%AD%A6%E7%94%9F%E6%89%8B%E5%86%8C.pdf"
,
"dialogCheckbox"
:
"I have read and agreed."
,
"dialogButton"
:
"OK"
},
},
"sideBar"
:
{
"sideBar"
:
{
"updatePic"
:
"Change profile photo"
,
"updatePic"
:
"Change profile photo"
,
...
...
src/assets/languages/zh-CN.json
浏览文件 @
c12455e5
...
@@ -26,7 +26,16 @@
...
@@ -26,7 +26,16 @@
"learnSysLayout"
:
{
"learnSysLayout"
:
{
"navigation"
:
{
"navigation"
:
{
"title"
:
"在线学习系统"
,
"title"
:
"在线学习系统"
,
"tip"
:
"通知"
"tip"
:
"通知"
,
"handlbook"
:
"查看学员手册"
,
"library"
:
"电子图书馆"
,
"dialogTitle"
:
"学员须知"
,
"dialogMessage1"
:
"使用学习平台前,请认真阅读"
,
"dialogMessage2"
:
"《紫荆教育-康博斯威尔大学教育学硕士学员手册》"
,
"dialogMessage3"
:
"内容,并同意遵守其中的各项要求。"
,
"dialogMessageHref"
:
"https://zws-imgs-pub.ezijing.com/pc/cu/%E5%AD%A6%E7%94%9F%E6%89%8B%E5%86%8C.pdf"
,
"dialogCheckbox"
:
"我已阅读并同意"
,
"dialogButton"
:
"确定"
},
},
"sideBar"
:
{
"sideBar"
:
{
"updatePic"
:
"修改头像"
,
"updatePic"
:
"修改头像"
,
...
...
src/components/learnSysLayout/navigation.vue
浏览文件 @
c12455e5
...
@@ -5,6 +5,10 @@
...
@@ -5,6 +5,10 @@
<div
class=
"text-title"
@
click=
"setStatus"
>
{{
$t
(
'components.learnSysLayout.navigation.title'
)
}}
</div>
<div
class=
"text-title"
@
click=
"setStatus"
>
{{
$t
(
'components.learnSysLayout.navigation.title'
)
}}
</div>
</div>
</div>
<div
class=
"nav-right"
>
<div
class=
"nav-right"
>
<div
class=
"nav-a"
>
<a
:href=
"documentUrl"
target=
"_blank"
>
{{
$t
(
'components.learnSysLayout.navigation.handlbook'
)
}}
</a>
<!--
<a
href=
"https://library.ciis.edu"
target=
"_blank"
>
{{
$t
(
'components.learnSysLayout.navigation.library'
)
}}
</a>
-->
</div>
<div
class=
"notify"
@
click=
"goNotify()"
>
<div
class=
"notify"
@
click=
"goNotify()"
>
{{
$t
(
'components.learnSysLayout.navigation.tip'
)
}}
{{
$t
(
'components.learnSysLayout.navigation.tip'
)
}}
<div
class=
"num"
v-if=
"this.$store.getters.myMsg != 0"
>
{{
this
.
$store
.
getters
.
myMsg
}}
</div>
<div
class=
"num"
v-if=
"this.$store.getters.myMsg != 0"
>
{{
this
.
$store
.
getters
.
myMsg
}}
</div>
...
@@ -25,6 +29,11 @@ export default {
...
@@ -25,6 +29,11 @@ export default {
num
:
this
.
$store
.
getters
.
myMsg
num
:
this
.
$store
.
getters
.
myMsg
}
}
},
},
computed
:
{
documentUrl
()
{
return
this
.
$store
.
state
.
documentUrl
}
},
mounted
()
{
mounted
()
{
cAction
.
Other
.
getNavMsg
()
cAction
.
Other
.
getNavMsg
()
.
then
(
data
=>
{
.
then
(
data
=>
{
...
@@ -115,4 +124,11 @@ export default {
...
@@ -115,4 +124,11 @@ export default {
}
}
}
}
}
}
.nav-a
{
a
{
margin
:
0
10px
;
color
:
#303133
;
text-decoration
:
none
;
}
}
</
style
>
</
style
>
src/store/index.js
浏览文件 @
c12455e5
...
@@ -4,7 +4,8 @@ Vue.use(Vuex)
...
@@ -4,7 +4,8 @@ Vue.use(Vuex)
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
state
:
{
state
:
{
myMsg
:
0
myMsg
:
0
,
documentUrl
:
''
},
},
getters
:
{
getters
:
{
myMsg
(
state
)
{
myMsg
(
state
)
{
...
@@ -14,6 +15,9 @@ export default new Vuex.Store({
...
@@ -14,6 +15,9 @@ export default new Vuex.Store({
mutations
:
{
mutations
:
{
myMsg
(
state
,
sum
)
{
myMsg
(
state
,
sum
)
{
state
.
myMsg
=
sum
state
.
myMsg
=
sum
},
updateDocumentUrl
(
state
,
url
)
{
state
.
documentUrl
=
url
}
}
},
},
actions
:
{}
actions
:
{}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论