fix 跳转

This commit is contained in:
Dai 2024-07-25 10:52:13 +08:00
parent 09ce35043c
commit b509c94bc7
2 changed files with 6 additions and 6 deletions

View File

@ -30,16 +30,16 @@ class TeacherController extends BaseController
{ {
$appid = getenv('APP_ID'); $appid = getenv('APP_ID');
$redirect_uri = urlencode(getenv('SERVER_DOMAIN') . "/h5/#/pages/index/index");//重定向地址 $redirect_uri = urlencode(getenv('SERVER_DOMAIN') . "/h5#/pages/index/index");//重定向地址
// $redirect_uri = urlencode(getenv('SERVER_DOMAIN') . "/h5#/pages/login/login");//重定向地址 // $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"; // $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&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&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"; // $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([ return $this->json([
// 'code' => ResponseCode::SUCCESS, 'code' => ResponseCode::SUCCESS,
// 'data' => $url 'data' => $url
// ]); ]);
return redirect($url); return redirect($url);
} }

View File

@ -17,7 +17,7 @@ use Webman\Route;
// 默认路由 // 默认路由
Route::any('/', [\plugin\admin\app\controller\IndexController::class, 'index']); Route::any('/', [\plugin\admin\app\controller\IndexController::class, 'index']);
Route::any('/h5/', function (){ Route::any('/h5', function (){
// return view(public_path() . '/h5'); // return view(public_path() . '/h5');
return view('../../public/h5/index'); return view('../../public/h5/index');
}); });