Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AuthorizeLogin
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
虞诚毅
AuthorizeLogin
Commits
733402f8
Commit
733402f8
authored
Apr 10, 2019
by
303514581@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2019/4/10 wap端回调接口参数调整
parent
dd7fc0e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletions
+13
-1
src/main/java/com/zhiwei/config/WechatConfig.java
+10
-0
src/main/java/com/zhiwei/controller/WapWechatLoginController.java
+1
-1
src/main/resources/wechatlogin.properties
+2
-0
No files found.
src/main/java/com/zhiwei/config/WechatConfig.java
View file @
733402f8
...
@@ -34,6 +34,8 @@ public class WechatConfig {
...
@@ -34,6 +34,8 @@ public class WechatConfig {
private
String
wapCodeUrl
;
private
String
wapCodeUrl
;
// 微信公众号授权appid
// 微信公众号授权appid
private
String
wapAppid
;
private
String
wapAppid
;
// 微信公众号授权appSecret
private
String
wapSecret
;
// 微信公众号成功授权后的回调地址,域名必须与审核时填写的授权域名一致
// 微信公众号成功授权后的回调地址,域名必须与审核时填写的授权域名一致
private
String
wapRedirectUri
;
private
String
wapRedirectUri
;
// 微信公众号应用授权作用域
// 微信公众号应用授权作用域
...
@@ -41,6 +43,14 @@ public class WechatConfig {
...
@@ -41,6 +43,14 @@ public class WechatConfig {
// #wechat_redirect无论直接打开还是做页面302重定向时候,必须带此参数
// #wechat_redirect无论直接打开还是做页面302重定向时候,必须带此参数
private
String
wapWR
;
private
String
wapWR
;
public
String
getWapSecret
()
{
return
wapSecret
;
}
public
void
setWapSecret
(
String
wapSecret
)
{
this
.
wapSecret
=
wapSecret
;
}
public
String
getWapCodeUrl
()
{
public
String
getWapCodeUrl
()
{
return
wapCodeUrl
;
return
wapCodeUrl
;
}
}
...
...
src/main/java/com/zhiwei/controller/WapWechatLoginController.java
View file @
733402f8
...
@@ -51,7 +51,7 @@ public class WapWechatLoginController {
...
@@ -51,7 +51,7 @@ public class WapWechatLoginController {
// 获取token的地址
// 获取token的地址
String
url
=
null
;
String
url
=
null
;
try
{
try
{
url
=
getUrl
.
getTokenUrl
(
config
.
getGetTokenUrl
(),
config
.
get
Appid
(),
config
.
get
Secret
(),
code
,
url
=
getUrl
.
getTokenUrl
(
config
.
getGetTokenUrl
(),
config
.
get
WapAppid
(),
config
.
getWap
Secret
(),
code
,
config
.
getGrantType
());
config
.
getGrantType
());
String
resultToken
=
""
;
String
resultToken
=
""
;
// 根据地址获取请求
// 根据地址获取请求
...
...
src/main/resources/wechatlogin.properties
View file @
733402f8
...
@@ -21,6 +21,8 @@ wechat.userInfoUrl=https://api.weixin.qq.com/sns/userinfo
...
@@ -21,6 +21,8 @@ wechat.userInfoUrl=https://api.weixin.qq.com/sns/userinfo
wechat.wapCodeUrl
=
https://open.weixin.qq.com/connect/oauth2/authorize
wechat.wapCodeUrl
=
https://open.weixin.qq.com/connect/oauth2/authorize
#微信公众号授权appid
#微信公众号授权appid
wechat.wapAppid
=
wxd1f40dde7e15845f
wechat.wapAppid
=
wxd1f40dde7e15845f
#微信公众号授权appid
wechat.wapSecret
=
65e1fda117ad20788adbce6161cb3a6f
#微信公众号成功授权后的回调地址,域名必须与审核时填写的授权域名一致
#微信公众号成功授权后的回调地址,域名必须与审核时填写的授权域名一致
wechat.wapRedirectUri
=
http://login.zhiweidata.com/wapwechat/recall
wechat.wapRedirectUri
=
http://login.zhiweidata.com/wapwechat/recall
#微信公众号应用授权作用域,snsapi_base (不弹出授权页面,直接跳转,只能获取用户openid),snsapi_userinfo (弹出授权页面,可通过openid拿到昵称、性别、所在地。并且, 即使在未关注的情况下,只要用户授权,也能获取其信息 )
#微信公众号应用授权作用域,snsapi_base (不弹出授权页面,直接跳转,只能获取用户openid),snsapi_userinfo (弹出授权页面,可通过openid拿到昵称、性别、所在地。并且, 即使在未关注的情况下,只要用户授权,也能获取其信息 )
...
...
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