6
0
Fork 0

调整注册

release
vine_liutk 2022-01-20 09:43:56 +08:00 committed by 李静
parent 0d0beab6b1
commit 4db09cac16
1 changed files with 13 additions and 1 deletions

View File

@ -59,7 +59,19 @@ class RegisterController extends Controller
throw new BizException(__('Registration failed, please try again'));
}
$token = $user->createToken(Device::UNIAPP, ['mall']);
// 获取登录设备
$device = $request->header('client-app', Device::UNIAPP);
switch ($device) {
case Device::DEALER:
$token = $user->createToken(Device::DEALER);
break;
default:
$token = $user->createToken(Device::UNIAPP, ['mall']);
break;
}
// $token = $user->createToken(Device::UNIAPP, ['mall']);
return response()->json([
'token' => $token->plainTextToken,