Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
77dbd797
提交
77dbd797
编写于
6月 12, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加权限校验,跳转saas 、basis机构相关页面
上级
ee05e225
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
50 行增加
和
5 行删除
+50
-5
index.js
src/utils/followup/followupUtils/index.js
+50
-5
未找到文件。
src/utils/followup/followupUtils/index.js
浏览文件 @
77dbd797
import
dataConverter
from
'./dataConverter'
;
import
fetch
from
'@/utils/fetch'
;
import
{
getBaseUrl
,
getSaasDomain
,
getSaasApiDomain
}
from
'@/utils/index'
import
Vue
from
'vue'
;
function
getSaasHost
(){
var
host
;
if
(
location
.
host
.
indexOf
(
'dev-work'
)
>-
1
||
location
.
host
.
indexOf
(
'localhost'
)
>-
1
){
host
=
'https://dev-saas.yunqueyi.com'
}
else
if
(
location
.
host
.
indexOf
(
'test1-work'
)
>-
1
){
host
=
'https://test1.yunqueyi.com'
}
else
if
(
location
.
host
.
indexOf
(
'uat-work'
)
>-
1
){
host
=
'https://uat.yunqueyi.com'
}
else
{
host
=
'https://www.yunqueyi.com'
}
return
host
}
function
getWsHost
(){
var
host
;
if
(
location
.
host
.
indexOf
(
'dev-work'
)
>-
1
||
location
.
host
.
indexOf
(
'localhost'
)
>-
1
){
host
=
'https://dev-ws.yunqueyi.com'
}
else
if
(
location
.
host
.
indexOf
(
'test1-work'
)
>-
1
){
host
=
'https://test1-ws.yunqueyi.com'
}
else
if
(
location
.
host
.
indexOf
(
'uat-work'
)
>-
1
){
host
=
'https://uat-ws.yunqueyi.com'
}
else
{
host
=
'https://ws.yunqueyi.com'
}
return
host
}
const
alertMessage
=
(
msg
,
confirmButtonText
,
cancelButtonText
,
callback
)
=>
{
Vue
.
prototype
.
$confirm
(
msg
,
'提醒'
,
{
confirmButtonText
:
confirmButtonText
,
cancelButtonText
:
cancelButtonText
,
}).
then
(()
=>
{
callback
();
}).
catch
(()
=>
{
// 关闭弹窗
});
}
export
default
{
DC
:
dataConverter
,
...
...
@@ -14,17 +54,22 @@ export default {
method
:
'get'
,
description
:
'检查用户的机构权限'
,
}).
then
(
res
=>
{
// 1、未加入 2、审核中 3、加入成功
// res.data = 2
if
(
res
.
code
==
'000000'
)
{
// 1、未加入 2、审核中 3、加入成功
if
(
res
.
data
==
1
)
{
alert
(
'您当前暂无机构,无法使用居民管理、随访管理和群发消息等功能,请在加入机构后重试。'
)
return
new
Promise
((
resolve
,
reject
)
=>
{
// 点击 去加入,进入加入机构流程
alertMessage
(
'您当前暂无机构,无法使用居民管理、随访管理和群发消息等功能,请在加入机构后重试。'
,
'去加入'
,
'暂不加入'
,
()
=>
{
location
.
href
=
getSaasHost
()
+
'/pica-base/pica_join.html'
})
// return new Promise((resolve, reject) => {
// })
}
else
if
(
res
.
data
==
2
)
{
alert
(
'您创建的机构正在审核中,暂无法使用居民管理、随访管理和群发消息等功能,请在审核通过后重试。'
)
return
new
Promise
((
resolve
,
reject
)
=>
{
alert
Message
(
'您创建的机构正在审核中,暂无法使用居民管理、随访管理和群发消息等功能,请在审核通过后重试。'
,
'查看审核'
,
'取消'
,
()
=>
{
location
.
href
=
getWsHost
()
+
'/outside/status?tk='
+
localStorage
.
getItem
(
'storageToken'
)
})
// return new Promise((resolve, reject) => {
// })
}
else
if
(
res
.
data
==
3
)
{
return
callback
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录