fix 跳转
This commit is contained in:
parent
09ce35043c
commit
b509c94bc7
@ -30,16 +30,16 @@ class TeacherController extends BaseController
|
||||
{
|
||||
$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");//重定向地址
|
||||
|
||||
// $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";
|
||||
// return $this->json([
|
||||
// 'code' => ResponseCode::SUCCESS,
|
||||
// 'data' => $url
|
||||
// ]);
|
||||
return $this->json([
|
||||
'code' => ResponseCode::SUCCESS,
|
||||
'data' => $url
|
||||
]);
|
||||
return redirect($url);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ use Webman\Route;
|
||||
// 默认路由
|
||||
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/h5/index');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user