Browse Source

奇讯云短信

lizhen_gitee 11 months ago
parent
commit
04ecc0116c
1 changed files with 3 additions and 11 deletions
  1. 3 11
      application/common/library/Qxysms.php

+ 3 - 11
application/common/library/Qxysms.php

@@ -36,8 +36,9 @@ class Qxysms
             'appkey'    => $this->appKey,
             'msg'       => "【{$this->signName}】您的验证码是{$code},请妥善保管"
         ];
+        $header = ['Content-type:application/json'];
 
-        $response  = curl_post($this->host . '/sms/batch/v1', json_encode($data),['Content-type:application/json']);
+        $response  = curl_post($this->host . '/sms/batch/v1', json_encode($data),$header);
 
         //dump($response);exit;
         $response = json_decode($response,true);
@@ -54,14 +55,5 @@ class Qxysms
         return intval((floatval($ms) + floatval($sec)) * 1000);
     }
 
-    /**
-     * @param $url
-     * @param array $params
-     * @param array $header
-     * @return PromiseInterface|Response
-     */
-    protected function postJson($url, array $params = [], array $header = [])
-    {
-        return Http::withHeaders($header)->acceptJson()->post($this->host . $url, $params);
-    }
+
 }