feat : wx login
This commit is contained in:
12
app/Constants/Common/ThirdCode.php
Normal file
12
app/Constants/Common/ThirdCode.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Constants\Common;
|
||||||
|
|
||||||
|
class ThirdCode
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const WX_LOGIN = 1;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Service\Api\Login;
|
namespace App\Service\Api\Login;
|
||||||
|
|
||||||
|
use App\Constants\Common\ThirdCode;
|
||||||
use App\Exception\ErrException;
|
use App\Exception\ErrException;
|
||||||
use App\Model\UserThird;
|
use App\Model\UserThird;
|
||||||
use App\Service\ServiceTrait\Api\WxMiniTrait;
|
use App\Service\ServiceTrait\Api\WxMiniTrait;
|
||||||
@@ -87,6 +88,7 @@ class WxFastLoginService extends LoginBaseService
|
|||||||
$model->user_id = $this->userId;
|
$model->user_id = $this->userId;
|
||||||
$model->open_id = $this->openId;
|
$model->open_id = $this->openId;
|
||||||
$model->union_id = $this->unionId;
|
$model->union_id = $this->unionId;
|
||||||
|
$model->type = ThirdCode::WX_LOGIN;
|
||||||
|
|
||||||
if (!$model->save()) throw new ErrException('注册失败-00001');
|
if (!$model->save()) throw new ErrException('注册失败-00001');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user