From 78a61bfe9d26e95f6b56eb46e090a5e3386c532e Mon Sep 17 00:00:00 2001 From: Dai Date: Thu, 25 Jul 2024 16:41:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AD=A6=E7=94=9Fopenid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/StudentController.php | 6 ++++++ config/route.php | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/api/controller/StudentController.php b/app/api/controller/StudentController.php index 376b4a4..95fc443 100644 --- a/app/api/controller/StudentController.php +++ b/app/api/controller/StudentController.php @@ -57,6 +57,12 @@ class StudentController extends BaseController return $this->json($res); } + /** + * @desc 更新学生openid + * @param Request $request + * @return \support\Response + * @throws \GuzzleHttp\Exception\GuzzleException + */ public function updateOpenid(Request $request) { $service = new StudentService(); diff --git a/config/route.php b/config/route.php index 9ee6998..587375c 100644 --- a/config/route.php +++ b/config/route.php @@ -22,16 +22,16 @@ Route::any('/h5', function (){ return view('../../public/h5/index'); }); -Route::fallback(function (Request $request) { - $response = strtoupper($request->method()) === 'OPTIONS' ? response('', 204) : response('', 404); - $response->withHeaders([ - 'Access-Control-Allow-Credentials' => 'true', - 'Access-Control-Allow-Origin' => "*", - 'Access-Control-Allow-Methods' => '*', - 'Access-Control-Allow-Headers' => '*', - ]); - return $response; -}); +//Route::fallback(function (Request $request) { +// $response = strtoupper($request->method()) === 'OPTIONS' ? response('', 204) : response('', 404); +// $response->withHeaders([ +// 'Access-Control-Allow-Credentials' => 'true', +// 'Access-Control-Allow-Origin' => "*", +// 'Access-Control-Allow-Methods' => '*', +// 'Access-Control-Allow-Headers' => '*', +// ]); +// return $response; +//});