feat : wx login

This commit is contained in:
2024-11-25 11:51:02 +08:00
parent 8d5ac829e3
commit 865ff6eb7e
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Constants\Common;
class ThirdCode
{
/**
*
*/
const WX_LOGIN = 1;
}

View File

@@ -10,6 +10,7 @@ declare(strict_types=1);
namespace App\Service\Api\Login;
use App\Constants\Common\ThirdCode;
use App\Exception\ErrException;
use App\Model\UserThird;
use App\Service\ServiceTrait\Api\WxMiniTrait;
@@ -87,6 +88,7 @@ class WxFastLoginService extends LoginBaseService
$model->user_id = $this->userId;
$model->open_id = $this->openId;
$model->union_id = $this->unionId;
$model->type = ThirdCode::WX_LOGIN;
if (!$model->save()) throw new ErrException('注册失败-00001');
}