上报接口添加渠道判断

This commit is contained in:
aozhiwei 2020-08-20 16:59:34 +08:00
parent 41787f8d59
commit 47e2112319

View File

@ -23,6 +23,7 @@
#include "buff.h"
#include "roomobstacle.h"
#include "aicomponent.h"
#include "jsondatamgr.h"
#include "framework/cpp/utils.h"
#include "framework/cpp/httpclientpool.h"
@ -2528,10 +2529,24 @@ void Human::SendBattleReport()
if (App::Instance()->HasFlag(3)) {
url = "http://192.168.100.41/webapp/index.php?c=Role&a=battleReport";
} else {
url = "https://game2004api-test.kingsome.cn/webapp/index.php?c=Role&a=battleReport";
if (JsonDataMgr::Instance()->channel != 0) {
url = a8::Format("http://game2004api-test.kingsome.cn/%d/webapp/index.php?c=Role&a=battleReport",
{
JsonDataMgr::Instance()->channel
});
} else {
url = "https://game2004api-test.kingsome.cn/webapp/index.php?c=Role&a=battleReport";
}
}
} else {
url = "http://game2004api.kingsome.cn/webapp/index.php?c=Role&a=battleReport";
if (JsonDataMgr::Instance()->channel != 0) {
url = a8::Format("http://game2004api.kingsome.cn/%d/webapp/index.php?c=Role&a=battleReport",
{
JsonDataMgr::Instance()->channel
});
} else {
url = "http://game2004api.kingsome.cn/webapp/index.php?c=Role&a=battleReport";
}
}
std::string data;
params->ToUrlEncodeStr(data);