ocr
This commit is contained in:
1 parent
7220b23cb3
commit
5ba4f72d5c
5 files changed
+83
-27
No files matched your search
+5
-6
@@ -131,7 +131,6 @@ string Dispatch(struct mg_connection *c, struct mg_http_message *hm) {
|
||||
break;
|
||||
}
|
||||
case WECHAT_MSG_SEND_AT: {
|
||||
break;
|
||||
wstring chat_room_id = GetWStringParam(j_param, "chatRoomId");
|
||||
vector<wstring> wxids = getArrayParam(j_param, "wxids");
|
||||
wstring msg = GetWStringParam(j_param, "msg");
|
||||
@@ -502,11 +501,11 @@ string Dispatch(struct mg_connection *c, struct mg_http_message *hm) {
|
||||
break;
|
||||
}
|
||||
case WECHAT_DO_OCR: {
|
||||
// wstring image_path = GetWStringParam(j_param, "imagePath");
|
||||
// string text("");
|
||||
// int success = g_context.misc_mgr->DoOCRTask(WS2LPWS(image_path), text);
|
||||
// json ret_data = {{"code", success}, {"result", "OK"}, {"text", text}};
|
||||
// ret = ret_data.dump();
|
||||
wstring image_path = GetWStringParam(j_param, "imagePath");
|
||||
string text("");
|
||||
int success = g_context.misc_mgr->DoOCRTask(WS2LPWS(image_path), text);
|
||||
json ret_data = {{"code", success}, {"result", "OK"}, {"text", text}};
|
||||
ret = ret_data.dump();
|
||||
break;
|
||||
}
|
||||
case WECHAT_SEND_PAT_MSG: {
|
||||
|
||||
Reference in new issue
Block a user