Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
e9fd3da3
提交
e9fd3da3
编写于
12月 17, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
点击【添加居民】,增加用户是否进行过身份认证的校验,并且新增了跳转到saas的入口中的一个参数,用以默认展示身份认证页面的逻辑
上级
65346331
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
66 行增加
和
4 行删除
+66
-4
main.js
src/main.js
+12
-1
patients.js
src/router/patients.js
+2
-1
index.js
src/utils/followup/followupUtils/index.js
+52
-2
未找到文件。
src/main.js
浏览文件 @
e9fd3da3
...
...
@@ -52,7 +52,18 @@ router.beforeEach((to, from, next) => {
if
(
to
.
meta
.
checkAuth
){
utils
.
checkAuthFunc
().
then
(
res
=>
{
if
(
res
==
3
){
next
()
if
(
to
.
meta
.
doctorAuth
){
utils
.
getDoctorAuth
(
router
).
then
(
resAuth
=>
{
if
(
resAuth
==
4
){
next
()
}
else
{
next
(
false
)
return
}
})
return
}
next
();
}
else
{
next
(
false
)
return
...
...
src/router/patients.js
浏览文件 @
e9fd3da3
...
...
@@ -76,7 +76,8 @@ const patientsRouters = {
meta
:
{
title
:
'新增居民'
,
keepAlive
:
false
,
checkAuth
:
true
checkAuth
:
true
,
doctorAuth
:
true
},
},
],
...
...
src/utils/followup/followupUtils/index.js
浏览文件 @
e9fd3da3
...
...
@@ -31,16 +31,19 @@ function getWsHost(){
return
host
}
const
alertMessage
=
(
msg
,
confirmButtonText
,
cancelButtonText
,
callback
)
=>
{
const
alertMessage
=
(
msg
,
confirmButtonText
,
cancelButtonText
,
callback
,
closeCallback
)
=>
{
Vue
.
prototype
.
$confirm
(
msg
,
'提醒'
,
{
confirmButtonText
:
confirmButtonText
,
cancelButtonText
:
cancelButtonText
,
customClass
:
'check-auth'
,
showClose
:
false
,
}).
then
(()
=>
{
}).
then
((
action
)
=>
{
callback
();
}).
catch
(()
=>
{
// 关闭弹窗
if
(
closeCallback
){
closeCallback
();
}
});
}
...
...
@@ -107,6 +110,53 @@ export default {
}
}))
})
},
getDoctorAuth
:
(
router
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
fetch
({
headers
:
{
token
:
localStorage
.
getItem
(
'storageToken'
)
},
url
:
getBaseUrl
(
`healths/doctor/doctorAuth`
),
method
:
'get'
,
description
:
'检查用户的认证权限'
,
}).
then
(
res
=>
{
// 1:未认证 2、认证中 3、认证失败 4、认证成功
// res.data=3; // 该行注释用以本地测试用! 该行注释用以本地测试用! 该行注释用以本地测试用!
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
data
===
1
){
alertMessage
(
'您还未进行身份认证,认证成功后即可使用该功能。'
,
'去认证'
,
'取消'
,
()
=>
{
location
.
href
=
getSaasHost
()
+
'/saas/pica_personal_edit.html?ZmxhZz0x&showAuthCerty=true'
},()
=>
{
router
.
push
({
path
:
'/patients-manage/mypatients-manage/patients-list'
})
})
}
else
if
(
res
.
data
===
2
){
alertMessage
(
'您还未进行身份认证,认证成功后即可使用该功能。'
,
'去认证'
,
'取消'
,
()
=>
{
location
.
href
=
getSaasHost
()
+
'/saas/pica_personal_edit.html?ZmxhZz0x&showAuthCerty=true'
},()
=>
{
router
.
push
({
path
:
'/patients-manage/mypatients-manage/patients-list'
})
})
}
else
if
(
res
.
data
===
3
){
alertMessage
(
'您的身份认证审核失败,请重新认证通过后即可使用该功能。'
,
'重新认证'
,
'取消'
,
()
=>
{
location
.
href
=
getSaasHost
()
+
'/saas/pica_personal_edit.html?ZmxhZz0x&showAuthCerty=true'
},()
=>
{
router
.
push
({
path
:
'/patients-manage/mypatients-manage/patients-list'
})
})
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
res
.
data
)
})
}))
})
}
};
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录