1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-23 20:00:27 +08:00
2020-09-17 21:29:29 +08:00

31 lines
649 B
PHP

<?php
namespace App\Services\Logic\Verify;
use App\Services\Logic\Service;
use App\Services\Sms\Verify as VerifySmsService;
use App\Validators\Captcha as CaptchaValidator;
use App\Validators\Verify as VerifyValidator;
class SmsCode extends Service
{
public function handle()
{
$post = $this->request->getPost();
$validator = new VerifyValidator();
$post['phone'] = $validator->checkPhone($post['phone']);
$validator = new CaptchaValidator();
$validator->checkCode($post['ticket'], $post['rand']);
$service = new VerifySmsService();
$service->handle($post['phone']);
}
}