mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
#1002 增加微信OCR身份证识别接口
This commit is contained in:
@@ -426,6 +426,26 @@ public interface WxMpApiUrl {
|
||||
}
|
||||
}
|
||||
|
||||
@AllArgsConstructor
|
||||
enum Ocr implements WxMpApiUrl {
|
||||
/**
|
||||
* 身份证识别.
|
||||
*/
|
||||
IDCARD(API_DEFAULT_HOST_URL, "/cv/ocr/idcard?type=%s&img_url=%s");
|
||||
|
||||
private String prefix;
|
||||
private String path;
|
||||
|
||||
@Override
|
||||
public String getUrl(WxMpConfigStorage config) {
|
||||
if (config == null) {
|
||||
return buildUrl(null, prefix, path);
|
||||
}
|
||||
|
||||
return buildUrl(config.getHostConfig(), prefix, path);
|
||||
}
|
||||
}
|
||||
|
||||
@AllArgsConstructor
|
||||
enum Card implements WxMpApiUrl {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user