Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
4bdae7f8
Commit
4bdae7f8
authored
Mar 21, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信6
parent
ef24e415
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/WxAppletApi.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/WxAppletApi.java
+2
-11
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/WxAppletApi.java
View file @
4bdae7f8
...
@@ -35,9 +35,6 @@ public class WxAppletApi {
...
@@ -35,9 +35,6 @@ public class WxAppletApi {
@Autowired
@Autowired
WxLoginManager
wxLoginManager
;
WxLoginManager
wxLoginManager
;
@Reference
(
check
=
false
)
ItemShortUrlServer
itemShortUrlServer
;
// 微信小程序音视频内容安全识别地址
// 微信小程序音视频内容安全识别地址
private
static
final
String
MEDIA_CHECK_URL
=
"https://api.weixin.qq.com/wxa/media_check_async?access_token=%s"
;
private
static
final
String
MEDIA_CHECK_URL
=
"https://api.weixin.qq.com/wxa/media_check_async?access_token=%s"
;
...
@@ -65,7 +62,7 @@ public class WxAppletApi {
...
@@ -65,7 +62,7 @@ public class WxAppletApi {
public
String
getUrlLink
(
String
query
)
{
public
String
getUrlLink
(
String
query
)
{
String
shortUrl
=
""
;
String
urlLink
=
""
;
try
{
try
{
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
url
=
String
.
format
(
URL_LINK
,
accessToken
);
String
url
=
String
.
format
(
URL_LINK
,
accessToken
);
...
@@ -83,19 +80,13 @@ public class WxAppletApi {
...
@@ -83,19 +80,13 @@ public class WxAppletApi {
String
responseStr
=
okHttpUtil
.
async
();
String
responseStr
=
okHttpUtil
.
async
();
logger
.
info
(
"获取加密URLLink response :{}"
,
responseStr
);
logger
.
info
(
"获取加密URLLink response :{}"
,
responseStr
);
String
msg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
String
msg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
String
urlLink
=
""
;
if
(
"ok"
.
equals
(
msg
))
{
if
(
"ok"
.
equals
(
msg
))
{
urlLink
=
JsonUtils
.
getValueByPath
(
responseStr
,
"url_link"
);
urlLink
=
JsonUtils
.
getValueByPath
(
responseStr
,
"url_link"
);
}
}
CloudServerResponse
<
String
>
cloudServerResponse
=
itemShortUrlServer
.
getShortUrlForAppName
(
urlLink
,
"quanku-applet"
);
logger
.
info
(
"获取加密URLLink ——> 转换短链接口返回: {}"
,
cloudServerResponse
);
if
(
cloudServerResponse
.
isSuccess
())
{
shortUrl
=
cloudServerResponse
.
getResult
();
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取小程序urlLink失败:{}"
,
e
);
logger
.
error
(
"获取小程序urlLink失败:{}"
,
e
);
}
}
return
shortUrl
;
return
urlLink
;
}
}
...
...
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