File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 50
50
import java .io .StringReader ;
51
51
import java .io .UnsupportedEncodingException ;
52
52
import java .net .URLEncoder ;
53
- import java .nio .charset .Charset ;
54
53
import java .security .NoSuchAlgorithmException ;
55
54
import java .util .*;
56
55
import java .util .Map .Entry ;
@@ -523,7 +522,8 @@ public File qrCodePicture(WxMpQrCodeTicket ticket) throws WxErrorException {
523
522
public String qrCodePictureUrl (String ticket ) throws WxErrorException {
524
523
String url = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s" ;
525
524
try {
526
- return String .format (url , URLEncoder .encode (ticket , Charsets .UTF_8 .name ()));
525
+ return this .shortUrl (String .format (url ,
526
+ URLEncoder .encode (ticket , Charsets .UTF_8 .name ())));
527
527
} catch (UnsupportedEncodingException e ) {
528
528
WxError error = WxError .newBuilder ().setErrorCode (-1 )
529
529
.setErrorMsg (e .getMessage ()).build ();
You can’t perform that action at this time.
0 commit comments