Commit 4bdae7f8 authored by shiyu's avatar shiyu

短信6

parent ef24e415
......@@ -35,9 +35,6 @@ public class WxAppletApi {
@Autowired
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";
......@@ -65,7 +62,7 @@ public class WxAppletApi {
public String getUrlLink(String query) {
String shortUrl = "";
String urlLink = "";
try {
String accessToken = wxLoginManager.getAccessToken();
String url = String.format(URL_LINK, accessToken);
......@@ -83,19 +80,13 @@ public class WxAppletApi {
String responseStr = okHttpUtil.async();
logger.info("获取加密URLLink response :{}", responseStr);
String msg = JsonUtils.getValueByPath(responseStr, "errmsg");
String urlLink = "";
if ("ok".equals(msg)) {
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) {
logger.error("获取小程序urlLink失败:{}", e);
}
return shortUrl;
return urlLink;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment