Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
5df28570
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5df28570
编写于
12月 07, 2020
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复单点sso.html文中的res.isRunning方法
上级
a83277ae
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
91 addition
and
129 deletion
+91
-129
o2web/source/x_desktop/js/sso.js
o2web/source/x_desktop/js/sso.js
+80
-0
o2web/source/x_desktop/smapsso.html
o2web/source/x_desktop/smapsso.html
+6
-66
o2web/source/x_desktop/sso.html
o2web/source/x_desktop/sso.html
+5
-63
未找到文件。
o2web/source/x_desktop/js/sso.js
0 → 100644
浏览文件 @
5df28570
window
.
layout
=
window
.
layout
||
{};
function
getServiceAddress
(
config
,
callback
){
window
.
layout
.
config
=
config
;
if
(
config
.
configMapping
&&
(
config
.
configMapping
[
window
.
location
.
host
]
||
config
.
configMapping
[
window
.
location
.
hostname
]))
{
var
mapping
=
config
.
configMapping
[
window
.
location
.
host
]
||
config
.
configMapping
[
window
.
location
.
hostname
];
if
(
mapping
.
servers
){
window
.
layout
.
serviceAddressList
=
mapping
.
servers
;
if
(
mapping
.
center
)
center
=
(
o2
.
typeOf
(
mapping
.
center
)
===
"
array
"
)
?
mapping
.
center
[
0
]
:
mapping
.
center
;
window
.
layout
.
centerServer
=
center
;
if
(
callback
)
callback
();
}
else
{
if
(
mapping
.
center
)
layout
.
config
.
center
=
(
o2
.
typeOf
(
mapping
.
center
)
===
"
array
"
)
?
mapping
.
center
:
[
mapping
.
center
];
getServiceAddressConfigArray
(
layout
.
config
,
callback
);
}
}
else
{
if
(
typeOf
(
config
.
center
)
==
"
object
"
){
getServiceAddressConfigObject
(
callback
);
}
else
if
(
typeOf
(
config
.
center
)
==
"
array
"
){
// var center = chooseCenter(config);
// if (center){
// getServiceAddressConfigObject(callback, center);
// }else{
getServiceAddressConfigArray
(
config
,
callback
);
// }
}
}
}
function
chooseCenter
(
config
){
var
host
=
window
.
location
.
host
;
var
center
=
null
;
for
(
var
i
=
0
;
i
<
config
.
center
.
length
;
i
++
){
var
ct
=
config
.
center
[
i
];
if
(
ct
.
webHost
==
host
){
center
=
ct
;
break
;
}
}
return
center
;
}
function
getServiceAddressConfigArray
(
config
,
callback
)
{
var
requests
=
[];
config
.
center
.
each
(
function
(
center
){
requests
.
push
(
getServiceAddressConfigObject
(
function
(){
requests
.
each
(
function
(
res
){
if
(
res
.
res
&&
res
.
res
.
isRunning
&&
res
.
res
.
isRunning
()){
res
.
res
.
cancel
();}
});
if
(
callback
)
callback
();
}.
bind
(
this
),
center
)
);
}.
bind
(
this
));
}
function
getServiceAddressConfigObject
(
callback
,
center
){
var
centerConfig
=
center
;
var
host
=
centerConfig
.
host
||
window
.
location
.
hostname
;
var
port
=
centerConfig
.
port
;
var
uri
=
""
;
var
locate
=
window
.
location
;
var
protocol
=
locate
.
protocol
;
if
(
!
port
||
port
==
"
80
"
){
uri
=
protocol
+
"
//
"
+
host
+
"
/x_program_center/jaxrs/distribute/assemble/source/{source}
"
;
}
else
{
uri
=
protocol
+
"
//
"
+
host
+
"
:
"
+
port
+
"
/x_program_center/jaxrs/distribute/assemble/source/{source}
"
;
}
var
currenthost
=
window
.
location
.
hostname
;
uri
=
uri
.
replace
(
/{source}/g
,
currenthost
);
//var uri = "http://"+layout.config.center+"/x_program_center/jaxrs/distribute/assemble";
return
MWF
.
restful
(
"
get
"
,
uri
,
null
,
function
(
json
){
window
.
layout
.
serviceAddressList
=
json
.
data
;
window
.
layout
.
centerServer
=
center
;
// var serviceAddressList = json.data;
// var addressObj = serviceAddressList["x_organization_assemble_authentication"];
// var address = protocol+"//"+addressObj.host+(addressObj.port==80 ? "" : ":"+addressObj.port)+"/z_sso_control/jaxrs/sso/smplogin";
if
(
callback
)
callback
();
}.
bind
(
this
));
}
o2web/source/x_desktop/smapsso.html
浏览文件 @
5df28570
...
@@ -5,76 +5,16 @@
...
@@ -5,76 +5,16 @@
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<title>
登录中...
</title>
<title>
登录中...
</title>
<script
src=
"../o2_core/o2.min.js"
></script>
<script
src=
"../o2_core/o2.min.js"
></script>
<script
src=
"
../o2_lib/Decimal
.js"
></script>
<script
src=
"
js/sso.min
.js"
></script>
<script>
<script>
function
getServiceAddress
(
config
,
callback
){
o2
.
addReady
(
function
(){
if
(
typeOf
(
config
.
center
)
==
"
object
"
){
o2
.
JSON
.
get
(
"
res/config/config.json
"
,
function
(
config
){
getServiceAddressConfigObject
(
callback
);
getServiceAddress
(
config
,
function
(){
}
else
if
(
typeOf
(
config
.
center
)
==
"
array
"
){
var
center
=
chooseCenter
(
config
);
if
(
center
){
getServiceAddressConfigObject
(
callback
,
center
);
}
else
{
getServiceAddressConfigArray
(
config
,
callback
);
}
//this.getServiceAddressConfigArray(callback);
}
}
function
chooseCenter
(
config
){
var
host
=
window
.
location
.
host
;
var
center
=
null
;
for
(
var
i
=
0
;
i
<
config
.
center
.
length
;
i
++
){
var
ct
=
config
.
center
[
i
];
if
(
ct
.
webHost
==
host
){
center
=
ct
;
break
;
}
}
return
center
;
}
function
getServiceAddressConfigArray
(
config
,
callback
)
{
var
requests
=
[];
config
.
center
.
each
(
function
(
center
){
requests
.
push
(
getServiceAddressConfigObject
(
function
(
address
){
requests
.
each
(
function
(
res
){
if
(
res
.
isRunning
&&
res
.
isRunning
()){
res
.
cancel
();}
});
if
(
callback
)
callback
(
address
);
}.
bind
(
this
),
center
)
);
}.
bind
(
this
));
}
function
getServiceAddressConfigObject
(
callback
,
center
){
var
centerConfig
=
center
;
var
host
=
centerConfig
.
host
||
window
.
location
.
hostname
;
var
port
=
centerConfig
.
port
;
var
uri
=
""
;
var
locate
=
window
.
location
;
var
locate
=
window
.
location
;
var
protocol
=
locate
.
protocol
;
var
protocol
=
locate
.
protocol
;
if
(
!
port
||
port
==
"
80
"
){
var
addressObj
=
layout
.
serviceAddressList
[
"
x_organization_assemble_authentication
"
];
uri
=
protocol
+
"
//
"
+
host
+
"
/x_program_center/jaxrs/distribute/assemble/source/{source}
"
;
}
else
{
uri
=
protocol
+
"
//
"
+
host
+
"
:
"
+
port
+
"
/x_program_center/jaxrs/distribute/assemble/source/{source}
"
;
}
var
currenthost
=
window
.
location
.
hostname
;
uri
=
uri
.
replace
(
/{source}/g
,
currenthost
);
//var uri = "http://"+layout.config.center+"/x_program_center/jaxrs/distribute/assemble";
return
MWF
.
restful
(
"
get
"
,
uri
,
null
,
function
(
json
){
var
serviceAddressList
=
json
.
data
;
var
addressObj
=
serviceAddressList
[
"
x_organization_assemble_authentication
"
];
var
address
=
protocol
+
"
//
"
+
addressObj
.
host
+
(
addressObj
.
port
==
80
?
""
:
"
:
"
+
addressObj
.
port
)
+
"
/z_sso_control/jaxrs/sso/smplogin
"
;
var
address
=
protocol
+
"
//
"
+
addressObj
.
host
+
(
addressObj
.
port
==
80
?
""
:
"
:
"
+
addressObj
.
port
)
+
"
/z_sso_control/jaxrs/sso/smplogin
"
;
if
(
callback
)
callback
(
address
);
}.
bind
(
this
));
}
o2
.
addReady
(
function
(){
o2
.
JSON
.
get
(
"
res/config/config.json
"
,
function
(
config
){
window
.
layout
=
{};
window
.
layout
.
config
=
config
;
getServiceAddress
(
config
,
function
(
address
){
var
uri
=
new
URI
(
window
.
location
.
toString
());
var
uri
=
new
URI
(
window
.
location
.
toString
());
var
xtoken
=
uri
.
getData
(
"
SMAP_SESSION_DATA
"
);
var
xtoken
=
uri
.
getData
(
"
SMAP_SESSION_DATA
"
);
var
appID
=
uri
.
getData
(
"
appID
"
);
var
appID
=
uri
.
getData
(
"
appID
"
);
...
...
o2web/source/x_desktop/sso.html
浏览文件 @
5df28570
...
@@ -7,73 +7,16 @@
...
@@ -7,73 +7,16 @@
<script
src=
"../o2_core/o2.min.js"
></script>
<script
src=
"../o2_core/o2.min.js"
></script>
<script
src=
"../o2_lib/Decimal.js"
></script>
<script
src=
"../o2_lib/Decimal.js"
></script>
<script>
<script>
function
getServiceAddress
(
config
,
callback
){
if
(
typeOf
(
config
.
center
)
==
"
object
"
){
getServiceAddressConfigObject
(
callback
);
}
else
if
(
typeOf
(
config
.
center
)
==
"
array
"
){
var
center
=
chooseCenter
(
config
);
if
(
center
){
getServiceAddressConfigObject
(
callback
,
center
);
}
else
{
getServiceAddressConfigArray
(
config
,
callback
);
}
//this.getServiceAddressConfigArray(callback);
}
}
function
chooseCenter
(
config
){
var
host
=
window
.
location
.
host
;
var
center
=
null
;
for
(
var
i
=
0
;
i
<
config
.
center
.
length
;
i
++
){
var
ct
=
config
.
center
[
i
];
if
(
ct
.
webHost
==
host
){
center
=
ct
;
break
;
}
}
return
center
;
}
function
getServiceAddressConfigArray
(
config
,
callback
)
{
var
requests
=
[];
config
.
center
.
each
(
function
(
center
){
requests
.
push
(
getServiceAddressConfigObject
(
function
(
address
){
requests
.
each
(
function
(
res
){
if
(
res
.
isRunning
()){
res
.
cancel
();}
});
if
(
callback
)
callback
(
address
);
}.
bind
(
this
),
center
)
);
}.
bind
(
this
));
}
function
getServiceAddressConfigObject
(
callback
,
center
){
var
centerConfig
=
center
;
var
host
=
centerConfig
.
host
||
window
.
location
.
hostname
;
var
port
=
centerConfig
.
port
;
var
uri
=
""
;
var
locate
=
window
.
location
;
var
protocol
=
locate
.
protocol
;
if
(
!
port
||
port
==
"
80
"
){
uri
=
protocol
+
"
//
"
+
host
+
"
/x_program_center/jaxrs/distribute/assemble/source/{source}
"
;
}
else
{
uri
=
protocol
+
"
//
"
+
host
+
"
:
"
+
port
+
"
/x_program_center/jaxrs/distribute/assemble/source/{source}
"
;
}
var
currenthost
=
window
.
location
.
hostname
;
uri
=
uri
.
replace
(
/{source}/g
,
currenthost
);
//var uri = "http://"+layout.config.center+"/x_program_center/jaxrs/distribute/assemble";
return
MWF
.
restful
(
"
get
"
,
uri
,
null
,
function
(
json
){
var
serviceAddressList
=
json
.
data
;
var
addressObj
=
serviceAddressList
[
"
x_organization_assemble_authentication
"
];
var
address
=
protocol
+
"
//
"
+
addressObj
.
host
+
(
addressObj
.
port
==
80
?
""
:
"
:
"
+
addressObj
.
port
)
+
addressObj
.
context
;
if
(
callback
)
callback
(
address
);
}.
bind
(
this
));
}
o2
.
addReady
(
function
(){
o2
.
addReady
(
function
(){
o2
.
JSON
.
get
(
"
res/config/config.json
"
,
function
(
config
){
o2
.
JSON
.
get
(
"
res/config/config.json
"
,
function
(
config
){
if
(
!
window
.
layout
)
window
.
layout
=
{};
if
(
!
window
.
layout
)
window
.
layout
=
{};
window
.
layout
.
config
=
config
;
window
.
layout
.
config
=
config
;
getServiceAddress
(
config
,
function
(
address
){
getServiceAddress
(
config
,
function
(
address
){
var
locate
=
window
.
location
;
var
protocol
=
locate
.
protocol
;
var
addressObj
=
layout
.
serviceAddressList
[
"
x_organization_assemble_authentication
"
];
var
address
=
protocol
+
"
//
"
+
addressObj
.
host
+
(
addressObj
.
port
==
80
?
""
:
"
:
"
+
addressObj
.
port
)
+
addressObj
.
context
;
var
uri
=
new
URI
(
window
.
location
.
toString
());
var
uri
=
new
URI
(
window
.
location
.
toString
());
var
xtoken
=
uri
.
getData
(
"
xtoken
"
);
var
xtoken
=
uri
.
getData
(
"
xtoken
"
);
var
client
=
uri
.
getData
(
"
client
"
);
var
client
=
uri
.
getData
(
"
client
"
);
...
@@ -115,7 +58,6 @@
...
@@ -115,7 +58,6 @@
});
});
});
});
</script>
</script>
</head>
</head>
<body
bgcolor=
"#faebd7"
bgcolor=
"#ffc0cb"
>
<body
bgcolor=
"#faebd7"
bgcolor=
"#ffc0cb"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录