token; $headers['appid'] = "gh_appid"; $headers['paltform'] = 'wx'; return $headers; } public function setUp() { parent::setUp(); /** @var UserModel $user */ $user = UserModel::where('uid', 50)->inRandomOrder()->first(); if (collect($user)->isEmpty()) { exit("基境初始化失败"); } if ($token = JWTAuth::attempt(['auth_key' => $user->phone, 'password' => $user->phone])) { dump($token); $this->token = "bearer{$token}"; } else { exit("基境初始化失败"); } } }