From e83fd9594f7dc3b6a4fd1635fcbdad76651e70e7 Mon Sep 17 00:00:00 2001 From: Dai Date: Thu, 25 Jul 2024 11:04:37 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/TeacherController.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/api/controller/TeacherController.php b/app/api/controller/TeacherController.php index 0dcf4cc..21df9d3 100644 --- a/app/api/controller/TeacherController.php +++ b/app/api/controller/TeacherController.php @@ -29,18 +29,12 @@ class TeacherController extends BaseController public function getCode(Request $request) { $appid = getenv('APP_ID'); - $domain = getenv('SERVER_DOMAIN'); - $redirect_uri = urlencode("$domain/h5#/pages/index/index");//重定向地址 -// $redirect_uri = urlencode(getenv('SERVER_DOMAIN') . "/h5#/pages/login/login");//重定向地址 - -// $url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri=$redirect_uri&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect"; + $redirect_uri = urlencode(getenv('SERVER_DOMAIN') . "/h5#/pages/index/index");//重定向地址 $url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri=$redirect_uri&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect"; -// $url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri=$redirect_uri&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; return $this->json([ 'code' => ResponseCode::SUCCESS, 'data' => $url ]); - return redirect($url); } /**