最近在研究一个购物的小程序,HOOK的方式取Code发现异地封号问题真的好严重 ,所以研究了下PC脱机协议版本,发现脱机的协议真的不错,异地不封号,
![在这里插入图片描述](https://img-blog.csdnimg.cn/7817b17f7b7f498ab2bec5144689252a.png#pic_center所有操作都封装了Api 使用起来非常方便
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "http://127.0.0.1:18081/api/Auth/WXJSLogin");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: text/plain");
headers = curl_slist_append(headers, "Content-Type: application/json-patch+json");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"Guid\":\"string\",\"AppId\":\"string\"}");
CURLcode ret = curl_easy_perform(hnd);
————————————————