@tnwx/miniprogram
Version:
TNWX 微信系开发脚手架之极速开发微信小程序
28 lines (27 loc) • 984 B
TypeScript
/**
* @author Javen
* @copyright javendev@126.com
* @description OCR 识别相关 API
*/
export declare class OCRApi {
/**
* OCR 识别
* @param OcrType 接口URL
* @param imgUrl 图片的URL
*/
static ocrByUrl(OcrType: OCRType, imgUrl: string): Promise<any>;
/**
* OCR 识别
* @param ocrType 接口URL
* @param filePath 图片的文件路径
*/
static ocrByFile(ocrType: OCRType, filePath: string): Promise<any>;
}
export declare enum OCRType {
BANKCARD = "https://api.weixin.qq.com/cv/ocr/bankcard?access_token=%s",
BUSINESSLICENSE = "https://api.weixin.qq.com/cv/ocr/bizlicense?access_token=%s",
DRIVERLICENSE = "https://api.weixin.qq.com/cv/ocr/drivinglicense?access_token=%s",
IDCARD = "https://api.weixin.qq.com/cv/ocr/idcard?access_token=%s",
PRINTEDTEXT = "https://api.weixin.qq.com/cv/ocr/comm?access_token=%s",
VEHICLELICENSE = "https://api.weixin.qq.com/cv/ocr/driving?access_token=%s"
}