|
@@ -301,11 +301,10 @@ function get32Str($length='32'){
|
|
|
Db::name('store_member')->where('id',$username)->update(array('hx_username'=>$param['username'],'hx_password'=>$param['password'],'hx_uuid'=>$hx_account['entities'][0]['uuid']));
|
|
|
return true;
|
|
|
}
|
|
|
-function requestPost($url , $post_data = array() ){
|
|
|
+function requestPost($url , $post_data = array(),$headers=[] ){
|
|
|
// 1. 初始化一个cURL会话
|
|
|
- $headers = array();
|
|
|
//根据API的要求,定义相对应的Content-Type
|
|
|
- array_push($headers, "Content-Type".":"."application/json");
|
|
|
+ // array_push($headers, "Content-Type".":"."application/json");
|
|
|
$ch = curl_init();
|
|
|
// 2. 设置请求选项, 包括具体的url
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|