1234567891011121314151617181920212223242526272829303132 |
- <?php
- /**
- * Created by PhpStorm
- * User:林志杰
- * Email:[email protected]
- * Motto:纵有疾风起,人生不言弃!
- * Time:2020/2/8 1:24
- */
- declare(strict_types=1);
- namespace app\common\business;
- use app\common\model\mysql\User as UserModel;
- class User
- {
- public $userObj = null;
- public function __construct()
- {
- $this->userObj = new UserModel();
- }
- public function login(array $data)
- {
- $redisCode = cache(config('redis.code_pre') . $data['phoneNumber']);
- if (empty($redisCode) || $redisCode !== $data['code']) {
- throw new \think\Exception('验证码不存在',-1009);
- }
- }
- }
|