Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
dba1c6be
Commit
dba1c6be
authored
Sep 19, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
a50eb4f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
WeChatH5LoginInterceoptor.java
...latform/summit/interceptor/WeChatH5LoginInterceoptor.java
+4
-3
WeixinService.java
.../java/com/xxfc/platform/summit/service/WeixinService.java
+1
-1
No files found.
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/interceptor/WeChatH5LoginInterceoptor.java
View file @
dba1c6be
...
@@ -56,14 +56,15 @@ public class WeChatH5LoginInterceoptor extends HandlerInterceptorAdapter {
...
@@ -56,14 +56,15 @@ public class WeChatH5LoginInterceoptor extends HandlerInterceptorAdapter {
String
frontSessionValue
=
new
String
(
Base64
.
decode
(
frontSessionValue1
),
"utf-8"
);
String
frontSessionValue
=
new
String
(
Base64
.
decode
(
frontSessionValue1
),
"utf-8"
);
return
true
;
return
true
;
}
}
String
curr_url
=
request
.
getRequestURL
().
toString
()
/*String curr_url = request.getRequestURL().toString()
+
(
StringUtils
.
isBlank
(
request
.
getQueryString
())
?
""
:
"?"
+
request
.
getQueryString
());
+ (StringUtils.isBlank(request.getQueryString()) ? "" : "?" + request.getQueryString());*/
String
curr_url
=
"https://dev.dfangche.com/api/summit/activity/app/unauth/index"
;
String
encrypt_curr_url
=
Base64
.
encode
(
curr_url
);
String
encrypt_curr_url
=
Base64
.
encode
(
curr_url
);
String
code
=
request
.
getParameter
(
"code"
);
String
code
=
request
.
getParameter
(
"code"
);
// 没有code, 则进行网页授权获取code
// 没有code, 则进行网页授权获取code
log
.
info
(
"curr_url====="
+
curr_url
+
"-----code="
+
code
);
log
.
info
(
"curr_url====="
+
curr_url
+
"-----code="
+
code
);
if
(
StringUtils
.
isBlank
(
code
))
{
if
(
StringUtils
.
isBlank
(
code
))
{
String
redirec_url
=
url
+
"?"
+
WECHAT_AUTOLOGIN_CALLBACKURL_KEY
+
"="
+
encrypt_curr_url
;
String
redirec_url
=
curr_
url
+
"?"
+
WECHAT_AUTOLOGIN_CALLBACKURL_KEY
+
"="
+
encrypt_curr_url
;
String
oauth_api
=
weixinService
.
getAuthorize
(
redirec_url
);
String
oauth_api
=
weixinService
.
getAuthorize
(
redirec_url
);
log
.
info
(
"curr_url====="
+
curr_url
);
log
.
info
(
"curr_url====="
+
curr_url
);
response
.
sendRedirect
(
oauth_api
);
response
.
sendRedirect
(
oauth_api
);
...
...
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/service/WeixinService.java
View file @
dba1c6be
...
@@ -58,7 +58,7 @@ public class WeixinService {
...
@@ -58,7 +58,7 @@ public class WeixinService {
String
oauth_api
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid={APPID}&redirect_uri={REDIRECT_URI}&response_type=code&scope={SCOPE}&state={STATE}#wechat_redirect"
;
String
oauth_api
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid={APPID}&redirect_uri={REDIRECT_URI}&response_type=code&scope={SCOPE}&state={STATE}#wechat_redirect"
;
oauth_api
=
oauth_api
.
replace
(
"{APPID}"
,
wy_appid
)
oauth_api
=
oauth_api
.
replace
(
"{APPID}"
,
wy_appid
)
.
replace
(
"{REDIRECT_URI}"
,
redirec_url
)
.
replace
(
"{REDIRECT_URI}"
,
redirec_url
)
.
replace
(
"{SCOPE}"
,
"snsapi_
base
"
).
replace
(
"{STATE}"
,
"state"
);
.
replace
(
"{SCOPE}"
,
"snsapi_
userinfo
"
).
replace
(
"{STATE}"
,
"state"
);
log
.
info
(
"---oauth_api===="
+
oauth_api
);
log
.
info
(
"---oauth_api===="
+
oauth_api
);
return
oauth_api
;
return
oauth_api
;
}
}
...
...
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