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
3b614c60
Commit
3b614c60
authored
Sep 29, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
fb9f0141
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
WeixinController.java
.../xxfc/platform/universal/controller/WeixinController.java
+4
-6
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/WeixinController.java
View file @
3b614c60
...
...
@@ -42,16 +42,14 @@ public class WeixinController {
@RequestMapping
(
value
=
"/app/unauth/wxLogin"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
String
wxLogin
(
@RequestParam
(
value
=
"redirec_url"
)
String
redirec_url
,
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"1"
)
Integer
type
){
public
String
wxLogin
(
@RequestParam
(
value
=
"redirec_url"
)
String
redirec_url
){
log
.
info
(
"-----微信wxLogin---redirec_url=="
+
redirec_url
);
if
(
StringUtils
.
isBlank
(
redirec_url
)){
redirec_url
=
""
;
}
try
{
String
encrypt_curr_url
=
Base64
.
encode
(
redirec_url
.
getBytes
(
"utf-8"
));
redirec_url
=
url
+
"?"
+
WECHAT_AUTOLOGIN_CALLBACKURL_KEY
+
"="
+
encrypt_curr_url
+
"&orderNo="
+
orderNo
+
"&type="
+
type
;
redirec_url
=
url
+
"?"
+
WECHAT_AUTOLOGIN_CALLBACKURL_KEY
+
"="
+
encrypt_curr_url
;
String
oauth_api
=
weixinService
.
getAuthorize
(
redirec_url
);
return
String
.
format
(
"redirect:"
+
oauth_api
);
}
catch
(
Exception
e
){
...
...
@@ -69,8 +67,8 @@ public class WeixinController {
* @return
*/
@GetMapping
(
value
=
"/app/unauth/userInfo"
)
public
String
getUserInformation
(
String
code
,
String
callback
,
String
key
,
HttpServletRequest
request
)
{
log
.
info
(
"-----微信回调userInfo---code=="
+
code
+
"----redirec_url==="
+
callback
+
"---key==="
+
key
);
public
String
getUserInformation
(
String
code
,
String
callback
,
HttpServletRequest
request
)
{
log
.
info
(
"-----微信回调userInfo---code=="
+
code
+
"----redirec_url==="
+
callback
);
try
{
authUser
(
code
);
callback
=
new
String
(
Base64
.
decode
(
callback
),
"utf-8"
);
...
...
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