|
|
@@ -83,6 +83,7 @@ bool CLewaimaiHttpClient::Login(std::string& errmsg)
|
|
|
|
|
|
//店铺ID默认为0
|
|
|
m_client.m_shop_id = "0";
|
|
|
+ m_client.m_shop_ids = "";
|
|
|
|
|
|
rapidjson::Value& v_rows = data["shop_ids"];
|
|
|
|
|
|
@@ -93,10 +94,12 @@ bool CLewaimaiHttpClient::Login(std::string& errmsg)
|
|
|
std::string shop_id = v_row_i.GetString();
|
|
|
|
|
|
m_client.m_shop_id = shop_id;
|
|
|
+
|
|
|
+ m_client.m_shop_ids += shop_id + ",";
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- //LOG_INFO("login success!");
|
|
|
+ m_client.m_shop_ids = m_client.m_shop_ids.substr(0, m_client.m_shop_ids.length() - 1);
|
|
|
+ }
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
@@ -158,10 +161,15 @@ bool CLewaimaiHttpClient::Request(std::string url, std::map<string, string> para
|
|
|
|
|
|
//LOG_INFO("postString:" << postString.c_str());
|
|
|
|
|
|
+ int a = 0;
|
|
|
+
|
|
|
CHttpClient m_httpClient;
|
|
|
int ret = m_httpClient.Posts(m_client.m_url + url, postString, response, NULL);
|
|
|
|
|
|
- //LOG_INFO("response:" << response.c_str());
|
|
|
+ if (url == "/goodstype/getlist")
|
|
|
+ {
|
|
|
+ LOG_INFO("response:" << response.c_str());
|
|
|
+ }
|
|
|
|
|
|
if (ret == 0)
|
|
|
{
|
|
|
@@ -181,3 +189,8 @@ std::string CLewaimaiHttpClient::getShopId()
|
|
|
{
|
|
|
return m_client.m_shop_id;
|
|
|
}
|
|
|
+
|
|
|
+std::string CLewaimaiHttpClient::getShopIdS()
|
|
|
+{
|
|
|
+ return m_client.m_shop_ids;
|
|
|
+}
|