mirror of
https://github.com/ttttupup/wxhelper.git
synced 2024-11-22 18:29:23 +08:00
新增拍一拍
This commit is contained in:
parent
f82f85b2b6
commit
d86d4c0bf6
30
README.md
30
README.md
@ -77,6 +77,8 @@ vcpkg
|
||||
2022-01-02 : 退出微信登录。
|
||||
|
||||
2022-01-31 : 新增修改群昵称(仅支持3.8.1.26)。
|
||||
|
||||
2022-02-01 : 新增拍一拍(仅支持3.8.1.26)。
|
||||
### 接口文档:
|
||||
|
||||
#### 0.检查微信登录**
|
||||
@ -829,17 +831,41 @@ vcpkg
|
||||
|text|string|提取的相应文字|
|
||||
|
||||
|
||||
#### 50.拍一拍**
|
||||
###### 接口功能
|
||||
> 群里拍一拍用户
|
||||
|
||||
###### 接口地址
|
||||
> [/api/?type=50](/api/?type=50)
|
||||
|
||||
###### HTTP请求方式
|
||||
> POST JSON
|
||||
|
||||
###### 请求参数
|
||||
|参数|必选|类型|说明|
|
||||
|---|---|---|---|
|
||||
|chatRoomId |ture |string| 微信群聊id |
|
||||
|wxid |ture |string| 要拍的用户wxid,如果使用用户自定义的微信号,则不会显示群内昵称 |
|
||||
###### 返回字段
|
||||
|返回字段|字段类型|说明 |
|
||||
|---|---|---|
|
||||
|code|int|返回状态,1成功, -1失败|
|
||||
|result|string|成功提示|
|
||||
|text|string|提取的相应文字|
|
||||
|
||||
|
||||
###### 接口示例
|
||||
入参:
|
||||
``` javascript
|
||||
{
|
||||
"imagePath":"C:\\3a610d7bc1cf5a15d12225a64b8962.dat"
|
||||
"chatRoomId":"123331@chatroom",
|
||||
"wxid":"wxid_123456"
|
||||
}
|
||||
|
||||
```
|
||||
响应:
|
||||
``` javascript
|
||||
{"code":0,"result":"OK","text":"搜索商品新闻简报小程序上线啦!!!我的收藏地址管理促销单品多买多省热门榜单热门榜单首发新品精品推荐精品推荐首发新品FRONTI警微安奈儿 童装冬季款男¥39900¥59.90帕拉丁品牌 时尚双背包409 00¥49.90我是有底线的首页分类购物车我的"}
|
||||
{"code":1,"result":"OK"}
|
||||
```
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "self_info.h"
|
||||
#include "hook_img.h"
|
||||
#include "ocr.h"
|
||||
#include "pat.h"
|
||||
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
using namespace std;
|
||||
@ -555,6 +556,14 @@ void api_handle(mg_http_message *hm, struct mg_connection *c, string &ret) {
|
||||
ret = ret_data.dump();
|
||||
break;
|
||||
}
|
||||
case WECHAT_SEND_PAT_MSG:{
|
||||
wstring room_id = get_http_req_param(hm, j_param, "chatRoomId", is_post);
|
||||
wstring wxid = get_http_req_param(hm, j_param, "wxid", is_post);
|
||||
int success = SendPatMsg(WS2LW(room_id),WS2LW(wxid));
|
||||
json ret_data = {{"code", success}, {"result", "OK"}};
|
||||
ret = ret_data.dump();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user