eee
This commit is contained in:
+16
-2
@@ -63,18 +63,32 @@ class SecCheck extends SmallProgram
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const SCENE_INFO = 1;
|
||||
const SCENE_REPLY = 2;
|
||||
const SCENE_DISCAZ = 3;
|
||||
const SCENE_SHEJIAO = 4;
|
||||
|
||||
/**
|
||||
* @param string $content
|
||||
* @param int $scene
|
||||
* @param string $openId
|
||||
* @return Result
|
||||
*/
|
||||
public function text(string $content): Result
|
||||
public function text(string $content, int $scene, string $openId): Result
|
||||
{
|
||||
if (empty($content)) {
|
||||
return $this->sendError('文件不存在', 404);
|
||||
}
|
||||
$requestUrl = $this->_msgUrl . $this->payConfig->getAccessToken();
|
||||
|
||||
return $this->post('api.weixin.qq.com', $requestUrl, ['content' => $content]);
|
||||
return $this->post('api.weixin.qq.com', $requestUrl, json_encode([
|
||||
'content' => $content,
|
||||
'version' => 2,
|
||||
'scene' => $scene,
|
||||
'openid' => $openId
|
||||
], JSON_UNESCAPED_UNICODE),'application/json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user