Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 118839a

Browse files
dengfengfengdengfeng
and
dengfeng
authored
🐛 #3692【小程序】【公众号】修复图片智能裁剪接口请求类型错误的问题
Co-authored-by: dengfeng <dengfeng@huaxincem.com>
1 parent 8447caa commit 118839a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaImgProcServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public WxImgProcAiCropResult aiCrop(String imgUrl, String ratios) throws WxError
8282
ratios = "";
8383
}
8484

85-
final String result = this.service.get(String.format(AI_CROP, imgUrl, ratios), null);
85+
final String result = this.service.post(String.format(AI_CROP, imgUrl, ratios), "");
8686
return WxImgProcAiCropResult.fromJson(result);
8787
}
8888

‎weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpImgProcServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public WxImgProcAiCropResult aiCrop(String imgUrl, String ratios) throws WxError
8686
ratios = "";
8787
}
8888

89-
final String result = this.wxMpService.get(String.format(AI_CROP.getUrl(this.wxMpService.getWxMpConfigStorage()),
90-
imgUrl, ratios), null);
89+
final String result = this.wxMpService.post(String.format(AI_CROP.getUrl(this.wxMpService.getWxMpConfigStorage()),
90+
imgUrl, ratios), "");
9191
return WxImgProcAiCropResult.fromJson(result);
9292
}
9393

‎weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpImgProcServiceImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ public void testSuperResolution2() throws Exception {
6161

6262
@Test
6363
public void testAiCrop() throws WxErrorException {
64-
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/raw/master/images/qrcodes/mp.png");
64+
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/images/banners/wiki.jpg");
6565
assertThat(result).isNotNull();
6666
System.out.println(result);
6767
}
6868

6969
@Test
7070
public void testAiCrop2() throws WxErrorException {
71-
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/raw/master/images/qrcodes/mp.png", "1,2.35");
71+
final WxImgProcAiCropResult result = this.mpService.getImgProcService().aiCrop("https://gitee.com/binary/weixin-java-tools/images/banners/wiki.jpg", "1,2.35");
7272
assertThat(result).isNotNull();
7373
System.out.println(result);
7474
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /