eee
This commit is contained in:
+5
-5
@@ -225,15 +225,15 @@ class Message extends SmallProgram
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $filePath
|
||||
* @param $type
|
||||
* @param string $filePath
|
||||
* @param string $type
|
||||
* @param bool $isPermanent
|
||||
* @param string $title
|
||||
* @param string $introduction
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function upload($filePath, $type, bool $isPermanent = false, string $title = '', string $introduction = ''): Result
|
||||
public function uploadFile(string $filePath, string $type, bool $isPermanent = false, string $title = '', string $introduction = ''): Result
|
||||
{
|
||||
if (!file_exists($filePath)) {
|
||||
throw new Exception('文件不存在');
|
||||
@@ -253,7 +253,7 @@ class Message extends SmallProgram
|
||||
if ($isPermanent && $mime == 'video/mp3') {
|
||||
$data = ['media' => $real_path, 'description[title]' => $title, 'description[introduction]' => $introduction];
|
||||
}
|
||||
return $this->post($url, $data);
|
||||
return $this->post('api.weixin.qq.com', $url, $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -273,6 +273,6 @@ class Message extends SmallProgram
|
||||
private function sendKefuMsg()
|
||||
{
|
||||
$url = '/cgi-bin/message/custom/send?access_token=' . $this->payConfig->getAccessToken();
|
||||
return $this->post($url, $this->msgData);
|
||||
return $this->post('api.weixin.qq.com', $url, $this->msgData);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user