|
|
|
|
@ -261,6 +261,7 @@ class AuthController extends Controller
|
|
|
|
|
public function mobile()
|
|
|
|
|
{
|
|
|
|
|
$code = request('code');
|
|
|
|
|
$openid = request()->openid;
|
|
|
|
|
$config = [
|
|
|
|
|
'app_id' => $this->appid,
|
|
|
|
|
'secret' => $this->appsecret
|
|
|
|
|
@ -277,7 +278,7 @@ class AuthController extends Controller
|
|
|
|
|
$user = $this->authModel->firstOrCreate([
|
|
|
|
|
"mobile" => $mobile
|
|
|
|
|
]);
|
|
|
|
|
$user->openid = $mobile;
|
|
|
|
|
$user->openid = $openid;
|
|
|
|
|
$user->save();
|
|
|
|
|
$token = $this->guard()->login($user);
|
|
|
|
|
return $this->respondWithToken($token);
|
|
|
|
|
|