feat : wx login
This commit is contained in:
@@ -20,12 +20,15 @@ use App\Lib\Crypto\CryptoFactory;
|
||||
use App\Model\User;
|
||||
use App\Model\UserThird;
|
||||
use App\Service\Api\BaseService;
|
||||
use App\Service\ServiceTrait\Api\GetUserInfoTrait;
|
||||
use Hyperf\Di\Annotation\Inject;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
abstract class LoginBaseService extends BaseService
|
||||
{
|
||||
use GetUserInfoTrait;
|
||||
|
||||
/**
|
||||
* 注入缓存类
|
||||
* @var RedisCache
|
||||
@@ -89,7 +92,7 @@ abstract class LoginBaseService extends BaseService
|
||||
protected function login(): void
|
||||
{
|
||||
$this->userId = empty($this->userId) ? $this->userInfo->id : $this->userId;
|
||||
|
||||
$this->userInfo = $this->getUserInfo($this->userId);
|
||||
if (empty($this->userId)) {
|
||||
throw new ErrException('登录失败');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user