| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #pragma once
- #include "CHttpClient.h"
- class CZhipuziHttpClient
- {
- public:
- CZhipuziHttpClient();
- ~CZhipuziHttpClient();
- enum Env
- {
- DEV,
- TEST,
- RELEASE
- };
- public:
- static void Init(std::string username, std::string password);
- static bool Login(std::string& errmsg);
- static bool Request(std::string url, std::map<string, string> params, std::string& response);
- static bool RequestPingtai(std::string url, std::map<string, string> params, std::string& response);
- static std::string getShopId();
- public:
- static CZhipuziHttpClient m_client;
- private:
- std::string m_username;
- std::string m_password;
- std::string m_pingtai_url = "";
- std::string m_yewu_url = "";
- std::string m_canyin_yewu_url = "";
- std::string m_lingshou_yewu_url = "";
- std::string m_version_type;
- std::string lwm_sess_token;
- Env m_env;
- //这个是当前登陆的账号对应的店铺ID
- std::string m_shop_id;
- };
|