feat : basic
This commit is contained in:
@@ -10,7 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Api\Login;
|
||||
|
||||
use App\Exception\ApiException;
|
||||
use App\Exception\ErrException;
|
||||
use App\Model\UserThird;
|
||||
use App\Service\ServiceTrait\Api\WxMiniTrait;
|
||||
use Hyperf\DbConnection\Db;
|
||||
@@ -37,7 +37,7 @@ class WxFastLoginService extends LoginBaseService
|
||||
{
|
||||
$this->jsCode = $this->request->input('js_code');
|
||||
|
||||
if (empty($this->jsCode)) throw new ApiException('登录参数错误');
|
||||
if (empty($this->jsCode)) throw new ErrException('登录参数错误');
|
||||
|
||||
$wxInfo = $this->jsCodeGetOpenId($this->jsCode);
|
||||
$this->openId = $wxInfo['openid'];
|
||||
@@ -88,6 +88,6 @@ class WxFastLoginService extends LoginBaseService
|
||||
$model->open_id = $this->openId;
|
||||
$model->union_id = $this->unionId;
|
||||
|
||||
if (!$model->save()) throw new ApiException('注册失败-00001');
|
||||
if (!$model->save()) throw new ErrException('注册失败-00001');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user