优化验证码获取逻辑
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
0ab700ebf8
commit
4290688db0
@ -118,15 +118,17 @@ class Login extends BasicApi
|
|||||||
{
|
{
|
||||||
$mobile = $this->request->post('mobile', '');
|
$mobile = $this->request->post('mobile', '');
|
||||||
$code = RandomService::numeric(6);
|
$code = RandomService::numeric(6);
|
||||||
$sms = new Sms();
|
if (config('sms.debug')) {
|
||||||
$result = $sms->vSend($mobile, [
|
$sms = new Sms();
|
||||||
'data' => [
|
$result = $sms->vSend($mobile, [
|
||||||
'project' => 'DWYsW1',
|
'data' => [
|
||||||
'code' => $code
|
'project' => 'DWYsW1',
|
||||||
],
|
'code' => $code
|
||||||
]);
|
],
|
||||||
if (isError($result)) {
|
]);
|
||||||
$this->error('系统繁忙');
|
if (isError($result)) {
|
||||||
|
$this->error('系统繁忙');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
session('captcha', $code);
|
session('captcha', $code);
|
||||||
$this->success('', config('sms.debug') ? $code : '');
|
$this->success('', config('sms.debug') ? $code : '');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user