|
|
@@ -12,7 +12,7 @@ namespace crmeb\services;
|
|
12
|
12
|
|
|
13
|
13
|
|
|
14
|
14
|
use AlibabaCloud\Client\AlibabaCloud;
|
|
15
|
|
-use Exception;
|
|
|
15
|
+use think\Exception;
|
|
16
|
16
|
use think\facade\Db;
|
|
17
|
17
|
use GuzzleHttp\Exception\ClientException;
|
|
18
|
18
|
use GuzzleHttp\Exception\ServerException;
|
|
|
@@ -79,15 +79,14 @@ class AliYunSmsService
|
|
79
|
79
|
|
|
80
|
80
|
log::info("短信:返回参数");
|
|
81
|
81
|
log::info($result);
|
|
82
|
|
- Db::name('sms_record')->insert(['phone' => $mobile, 'content' => $content, 'template' => $TemplateCode]);
|
|
83
|
|
-
|
|
|
82
|
+ Db::name('sms_record')->insert(['phone' => $mobile, 'content' => $content, 'template' => $TemplateCode, 'create_time'=>date("Y-m-d H:i:s")]);
|
|
84
|
83
|
return $result->toArray();
|
|
85
|
|
- } catch (ClientException $e) {
|
|
86
|
|
- return ['code' => 500, 'message' => '阿里云短信客户端异常:' . $e->getErrorMessage()];
|
|
87
|
|
- } catch (ServerException $e) {
|
|
88
|
|
- return ['code' => 500, 'message' => '阿里云短信服务端异常:' . $e->getErrorMessage()];
|
|
|
84
|
+ // } catch (ClientException $e) {
|
|
|
85
|
+ // return ['code' => 500, 'message' => '阿里云短信客户端异常:' . $e->getErrorMessage()];
|
|
|
86
|
+ // } catch (ServerException $e) {
|
|
|
87
|
+ // return ['code' => 500, 'message' => '阿里云短信服务端异常:' . $e->getErrorMessage()];
|
|
89
|
88
|
} catch (Exception $e) {
|
|
90
|
|
- return ['code' => 500, 'message' => '阿里云短信服务端异常:' . $e->getErrorMessage()];
|
|
|
89
|
+ return ['code' => 500, 'message' => '阿里云短信服务端异常:' . $e->getMessage()];
|
|
91
|
90
|
}
|
|
92
|
91
|
}
|
|
93
|
92
|
}
|