27 lines
647 B
PHP
27 lines
647 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\api\controller;
|
||
|
|
|
||
|
|
use app\common\basics\Api;
|
||
|
|
use app\api\validate\VerifyValidate;
|
||
|
|
use app\common\server\JsonServer;
|
||
|
|
use app\api\logic\VerifyLogic;
|
||
|
|
|
||
|
|
class Verify extends Api
|
||
|
|
{
|
||
|
|
|
||
|
|
public $like_not_need_login = ['getVerifyCode'];
|
||
|
|
public function getVerifyCode(){
|
||
|
|
$get = $this->request->get();
|
||
|
|
$user_id = $this->user_id;
|
||
|
|
(new VerifyValidate())->goCheck('getVerifyCode', $get);
|
||
|
|
$data = VerifyLogic::getVerifyCode($get);
|
||
|
|
if (false === $data) {
|
||
|
|
return JsonServer::error(VerifyLogic::getError());
|
||
|
|
}
|
||
|
|
return JsonServer::success('获取成功!', $data);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|