|
@@ -198,7 +198,7 @@ int CSDK::ReportKeyCopyResults(std::string sn)
|
|
|
form.insert(std::pair<std::string,std::string>("date", keys.copy_date));
|
|
|
CCurlClient curl;
|
|
|
curl.Initialize();
|
|
|
- if ( curl.FormPost("http://test.admin.ota.qhmoka.com/IDManage/reportlist.do?", form, result,3) == CURLE_OK)
|
|
|
+ if ( curl.FormPosts(_host + "/reportlist.do?", form, result,3) == CURLE_OK)
|
|
|
{
|
|
|
cJSON *pJson = cJSON_Parse(result.c_str());
|
|
|
if ( pJson == NULL )
|
|
@@ -254,7 +254,7 @@ int CSDK::BatchReportKeyCopyResults()
|
|
|
|
|
|
CCurlClient curl;
|
|
|
curl.Initialize();
|
|
|
- if ( curl.FormPost("http://test.admin.ota.qhmoka.com/IDManage/reportlist.do?", form, result,3) == CURLE_OK)
|
|
|
+ if ( curl.FormPosts(_host + "/reportlist.do?", form, result,3) == CURLE_OK)
|
|
|
{
|
|
|
cJSON *pJson = cJSON_Parse(result.c_str());
|
|
|
if ( pJson == NULL )
|
|
@@ -351,14 +351,14 @@ int CSDK::GetMidInfo(std::string order, STMid &mid)
|
|
|
{
|
|
|
// http»ñÈ¡mid;
|
|
|
std::string result;
|
|
|
- std::string url = "http://test.admin.ota.qhmoka.com/IDManage/getofflinelist.do?";
|
|
|
+ std::string url = _host + "/getofflinelist.do?";
|
|
|
std::string content = "orderNumber=";
|
|
|
content.append(order);
|
|
|
//content.append("&mac=");
|
|
|
//content.append(Global::g_strMacs);
|
|
|
CCurlClient curl;
|
|
|
curl.Initialize();
|
|
|
- if ( curl.Post(url, content, result) == CURLE_OK)
|
|
|
+ if ( curl.Posts(url, content, result) == CURLE_OK)
|
|
|
{
|
|
|
// ½âÎöjson×Ö·û´®;
|
|
|
cJSON *pJson = cJSON_Parse(result.c_str());
|
|
@@ -470,7 +470,6 @@ BOOL CSDK::GetBidInfo(std::string order, std::string macs)
|
|
|
code = cJSON_GetObjectItem(pJson, "code") ? cJSON_GetObjectItem(pJson, "code")->valuestring : "";
|
|
|
_host = cJSON_GetObjectItem(pJson, "host") ? (cJSON_GetObjectItem(pJson, "host")->valuestring != NULL ? cJSON_GetObjectItem(pJson, "host")->valuestring : "") : "";
|
|
|
|
|
|
-
|
|
|
if (_tcsicmp(code.c_str(), "1000") != 0)
|
|
|
{
|
|
|
bRet = FALSE;
|
|
@@ -497,13 +496,13 @@ int CSDK::ReportDownloadStatus(std::string order)
|
|
|
{
|
|
|
// http»ñÈ¡mid;
|
|
|
std::string result;
|
|
|
- std::string url = "http://test.admin.ota.qhmoka.com/IDManage/getreportofflinesn.do?";
|
|
|
+ std::string url = _host + "/getreportofflinesn.do?";
|
|
|
std::string content = "orderNumber=";
|
|
|
content.append(order);
|
|
|
|
|
|
CCurlClient curl;
|
|
|
curl.Initialize();
|
|
|
- if ( curl.Post(url, content, result) == CURLE_OK)
|
|
|
+ if ( curl.Posts(url, content, result) == CURLE_OK)
|
|
|
{
|
|
|
// ½âÎöjson×Ö·û´®;
|
|
|
cJSON *pJson = cJSON_Parse(result.c_str());
|