feat: 发送小程序 close issue #158

This commit is contained in:
hugy committed 2023-06-01 21:13:45 +08:00
1 parent e0b8805263
commit ef666c59a2
6 files changed
+144 -1

No files matched your search

+8
View File
@@ -642,6 +642,14 @@ string Dispatch(struct mg_connection *c, struct mg_http_message *hm) {
ret = ret_data.dump();
break;
}
case WECHAT_SEND_APP_MSG:{
wstring wxid = GetWStringParam(j_param, "wxid");
wstring applet = GetWStringParam(j_param, "appletId");
int success= g_context.send_mgr->SendAppletMsg(WS2LPWS(wxid),WS2LPWS(applet));
json ret_data = {{"code", success}, {"result", "OK"}};
ret = ret_data.dump();
break;
}
default:
json ret_data = {{"result", "ERROR"}, {"msg", "not support api"}};
ret = ret_data.dump();