新增拍一拍

This commit is contained in:
hugy committed 2023-02-01 10:36:32 +08:00
1 parent f82f85b2b6
commit d86d4c0bf6
3 files changed
+39 -3

No files matched your search

+9
View File
@@ -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;
}
+1
View File
@@ -64,6 +64,7 @@ typedef enum WECHAT_HTTP_APISTag
WECHAT_GET_CHATROOM_INFO,
WECHAT_GET_IMG_BY_NAME,
WECHAT_DO_OCR,
WECHAT_SEND_PAT_MSG,
} WECHAT_HTTP_APIS,
*PWECHAT_HTTP_APIS;