初步MQ
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use support\think\Db;
|
||||
use think\Exception;
|
||||
use support\Log;
|
||||
use think\Model;
|
||||
@@ -32,6 +33,7 @@ class AlibabaSms extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
* @param array $args
|
||||
* @return void
|
||||
*/
|
||||
@@ -43,6 +45,7 @@ class AlibabaSms extends Model
|
||||
try {
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
$res = $client->sendSmsWithOptions($sendSmsRequest, $runtime);
|
||||
Log::info('短信接口返回---》' . json_encode($res->body->toArray()));
|
||||
if($res->body->code == 'OK') {
|
||||
return true;
|
||||
}else {
|
||||
@@ -60,6 +63,15 @@ class AlibabaSms extends Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询短信发送结果
|
||||
*/
|
||||
public function QuerySendDetails($data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user