This commit is contained in:
aozhiwei 2022-03-25 19:14:02 +08:00
parent c8fd17ca34
commit bd2ce077ab
2 changed files with 8 additions and 1 deletions

View File

@ -82,6 +82,11 @@ std::string HttpProxy::HttpGet(a8::XParams param,
.SetSender(request->req_id),
[] (a8::XParams& param, a8::XObject& data)
{
HttpProxyRequest* req = HttpProxy::Instance()->GetRequest(param.sender.GetString());
if (req) {
req->on_ok(req->param, data);
}
HttpProxy::Instance()->DestoryRequest(req);
},
[] (a8::XParams& param, const std::string& response)
{

View File

@ -803,7 +803,7 @@ void RoomMgr::SendGetBattleData(int mode,
JsonDataMgr::Instance()->GetApiUrl(url);
if (!f8::IsOnlineEnv()) {
#ifdef DEBUG
if (!is_old_version) {
if (is_old_version) {
url = "https://game2006api-test.kingsome.cn/new/webapp/index.php";
}
#endif
@ -828,6 +828,8 @@ void RoomMgr::SendGetBattleData(int mode,
data->SetVal("members", *members);
data->SetVal("mode", mode);
url_params->SetVal("data", data->ToJsonStr());
url_params->SetVal("account_id", join_msgs[0]->account_id());
url_params->SetVal("session_id", join_msgs[0]->session_id());
}
HttpProxy::Instance()->HttpGet
(