Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
18da5674
Commit
18da5674
authored
Apr 17, 2019
by
sam.x.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
桔子堆问题
parent
7c02aa53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
index.html
atms-orangeheap/public/index.html
+53
-0
IndexController.java
...java/pwc/taxtech/atms/web/controller/IndexController.java
+3
-2
No files found.
atms-orangeheap/public/index.html
View file @
18da5674
...
...
@@ -4,6 +4,59 @@
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<script>
//获取地址栏参数,name:参数名称
window
.
str
=
""
;
var
z
=
function
getUrlParms
(
name
){
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
}
var
ddTicket
=
z
(
"ticketStr"
);
//設置cookie
var
sc
=
function
setCookie
(
name
,
value
)
{
var
Days
=
30
;
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
escape
(
value
)
+
";expires="
+
exp
.
toGMTString
()
+
";path=./"
;
}
sc
(
"ddTicket"
,
ddTicket
);
var
ReUrl
=
"https://me.xiaojukeji.com/project/stargate-auth/html/login.html?redirect_uri=http%3A%2F%2Fmis.diditaxi.com.cn%2Fauth%3Fapp_id%3D2500%26version%3D1.0%26jumpto%3Dhttp://dts-test.erp.didichuxing.com/orangeweb/index.html%26callback_index%3D0"
if
(
ddTicket
==
undefined
||
ddTicket
==
""
||
ddTicket
==
null
){
document
.
location
=
ReUrl
;
}
/* else {
//创建核心对象
xmlhttp = null;
if (window.XMLHttpRequest) {// code for Firefox, Opera, IE7, etc.
xmlhttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
//编写回调函数
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//
}
}
//這個 url 測試的
var getUserUrl="http://dts-test.erp.didichuxing.com/sso/getUser?ticket=";
//open设置请求方式和请求路径
xmlhttp.open("get", getUserUrl+ddTicket);
//send 发送
xmlhttp.send();
}*/
</script>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
didi2
</title>
<link
rel=
"stylesheet"
href=
"font_roboto.css"
>
...
...
atms-web/src/main/java/pwc/taxtech/atms/web/controller/IndexController.java
View file @
18da5674
...
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.client.RestTemplate
;
import
pwc.taxtech.atms.common.DDUserInfoRes
;
import
pwc.taxtech.atms.common.HttpUtil
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.dto.AtmsTokenDto
;
import
pwc.taxtech.atms.web.AtmsWebSettings
;
import
pwc.taxtech.atms.web.service.OrangeHeapService
;
...
...
@@ -196,7 +197,7 @@ public class IndexController {
*/
@RequestMapping
(
value
=
{
"/sso/getUser"
},
method
=
RequestMethod
.
GET
)
@ResponseBody
public
String
accept
(
@RequestParam
(
value
=
"ticket"
)
String
ticket
,
HttpServletRequest
request
,
public
ApiResultDto
accept
(
@RequestParam
(
value
=
"ticket"
)
String
ticket
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
DDUserInfoRes
ddUserInfoRes
=
null
;
try
{
...
...
@@ -207,7 +208,7 @@ public class IndexController {
}
catch
(
Exception
e
)
{
logger
.
info
(
String
.
format
(
"调用DDSSO获取用户信息失败:[%s]"
,
e
.
getMessage
()),
e
);
}
return
JSON
.
toJSONString
(
ddUserInfoRes
);
return
ApiResultDto
.
success
(
ddUserInfoRes
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment