Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jd-activity
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
曾水平
jd-activity
Commits
78b8555e
Commit
78b8555e
authored
Aug 10, 2022
by
weichaochao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登陆调整
parent
232d5ecc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
Open2LankouController.java
...om/duiba/jdactivity/controller/Open2LankouController.java
+17
-16
No files found.
src/main/java/cn/com/duiba/jdactivity/controller/Open2LankouController.java
View file @
78b8555e
...
@@ -236,20 +236,11 @@ public class Open2LankouController {
...
@@ -236,20 +236,11 @@ public class Open2LankouController {
return
URLDecoder
.
decode
(
redirectUrl
,
"UTF-8"
)
+
"&avatar="
+
avatar
+
"&nickname="
+
nickName
+
"&uid="
+
uid
;
return
URLDecoder
.
decode
(
redirectUrl
,
"UTF-8"
)
+
"&avatar="
+
avatar
+
"&nickname="
+
nickName
+
"&uid="
+
uid
;
}
}
CreditTool
tool
=
new
CreditTool
(
APP_KEY
,
APP_SECRET
);
Map
<
String
,
String
>
params
=
new
HashMap
<>();
//生成dcustom数据
Map
<
String
,
String
>
dcustomParam
=
new
HashMap
<>();
// dcustomParam.put("avatar", avatar);
// dcustomParam.put("nickname", nickName);
// 带上是否关注店铺信息
dcustomParam
.
put
(
"isFollow"
,
String
.
valueOf
(
isFollow
));
getDcustom
(
dcustomParam
,
params
);
if
(
StringUtils
.
equalsIgnoreCase
(
"null"
,
redirectUrl
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
"null"
,
redirectUrl
))
{
redirectUrl
=
""
;
redirectUrl
=
""
;
}
}
//免登参数
Map
<
String
,
String
>
params
=
new
HashMap
<>();
if
(
StringUtils
.
isNotBlank
(
redirectUrl
))
{
if
(
StringUtils
.
isNotBlank
(
redirectUrl
))
{
redirectUrl
=
UrlUtils
.
urlDecode
(
redirectUrl
);
redirectUrl
=
UrlUtils
.
urlDecode
(
redirectUrl
);
params
.
put
(
"redirect"
,
redirectUrl
);
params
.
put
(
"redirect"
,
redirectUrl
);
...
@@ -257,15 +248,25 @@ public class Open2LankouController {
...
@@ -257,15 +248,25 @@ public class Open2LankouController {
params
.
put
(
"uid"
,
uid
);
params
.
put
(
"uid"
,
uid
);
params
.
put
(
"nickname"
,
nickName
);
params
.
put
(
"nickname"
,
nickName
);
params
.
put
(
"avatar"
,
avatar
);
params
.
put
(
"avatar"
,
avatar
);
params
.
put
(
"isFollow"
,
isFollow
?
"1"
:
"0"
);
if
(
StringUtils
.
isNotBlank
(
credits
))
{
if
(
StringUtils
.
isNotBlank
(
credits
))
{
params
.
put
(
"credits"
,
credits
);
params
.
put
(
"credits"
,
credits
);
}
}
String
autoUrl
=
getAutologinHome
(
env
);
String
url
=
tool
.
buildUrlWithSign
(
autoUrl
,
params
);
//增加签名参数
String
param
=
url
.
substring
(
url
.
indexOf
(
"?"
)
+
1
,
url
.
length
()
-
1
);
params
.
put
(
"appKey"
,
APP_KEY
);
String
json
=
paramJson
(
param
);
params
.
put
(
"appSecret"
,
APP_SECRET
);
return
autoUrl
+
"?data="
+
URLEncoder
.
encode
(
json
,
"UTF-8"
);
if
(
params
.
get
(
"timestamp"
)
==
null
)
{
params
.
put
(
"timestamp"
,
System
.
currentTimeMillis
()
+
""
);
}
//计算签名值
String
sign
=
SignTool
.
sign
(
params
);
params
.
put
(
"sign"
,
sign
);
params
.
remove
(
"appSecret"
);
//json字符串参数
String
paramsJsonStr
=
JSON
.
toJSONString
(
params
);
String
autoUrl
=
getAutologinHome
(
env
);
return
autoUrl
+
"?data="
+
URLEncoder
.
encode
(
paramsJsonStr
,
"UTF-8"
);
}
}
public
static
String
paramJson
(
String
paramIn
)
{
public
static
String
paramJson
(
String
paramIn
)
{
...
...
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