'feat:拍一拍,ocr'

This commit is contained in:
hugy
2023-08-31 08:44:35 +08:00
parent 2863f8258f
commit 1ba2ed87b7
5 changed files with 159 additions and 2 deletions
+90 -1
View File
@@ -1688,7 +1688,7 @@ enableHttp=0时,使用ip,port的tcp服务回传消息。
> 发送小程序(待完善,不稳定),相关参数可以参考示例的滴滴小程序的内容自行组装。
###### 接口地址
> [/api/sendCustomEmotion](/api/sendApplet)
> [/api/sendApplet](/api/sendApplet)
###### HTTP请求方式
> POST JSON
@@ -1737,4 +1737,93 @@ enableHttp=0时,使用ip,port的tcp服务回传消息。
"data": {},
"msg": "success"
}
```
#### 35.拍一拍**
###### 接口功能
> 拍一拍
###### 接口地址
> [/api/sendPatMsg](/api/sendPatMsg)
###### HTTP请求方式
> POST JSON
###### 请求参数
|参数|必选|类型|说明|
|---|---|---|---|
|wxid|string|被拍人id|
|receiver|string|接收人id,可以是自己wxid,私聊好友wxid,群id|
###### 返回字段
|返回字段|字段类型|说明 |
|---|---|---|
|code|int|返回状态,大于0成功, -1失败|
|msg|string|成功提示|
|data|object|null|
###### 接口示例
入参:
``` javascript
{
"wxid":"wxid_1234",
"receiver":"wxid_1234",
}
```
响应:
``` javascript
{
"code": 1,
"data": {},
"msg": "success"
}
```
#### 36.OCR**
###### 接口功能
> OCR识别文字,非0时再调用一次,一般需要调用2次
###### 接口地址
> [/api/ocr](/api/ocr)
###### HTTP请求方式
> POST JSON
###### 请求参数
|参数|必选|类型|说明|
|---|---|---|---|
|imagePath|string|图片全路径|
###### 返回字段
|返回字段|字段类型|说明 |
|---|---|---|
|code|int|返回状态,0成功, 非0时再调用一次|
|msg|string|成功提示|
|data|object|识别得结果|
###### 接口示例
入参:
``` javascript
{
"imagePath":"C:\\var\\123.jpg"
}
```
响应:
``` javascript
{
"code": 0,
"data": "17 硬卧下铺别人能不能坐?12306回应\r\n18 中南财大被解聘女讲师已失联4个多月\r\n19 新一轮存款利率下调即将落地\r\n",
"msg": "success"
}
```