fix bug
This commit is contained in:
parent
60f22db576
commit
f92658ffed
@ -4,6 +4,7 @@ namespace app\api\controller;
|
|||||||
|
|
||||||
use app\BaseController;
|
use app\BaseController;
|
||||||
use app\common\service\StudentService;
|
use app\common\service\StudentService;
|
||||||
|
use app\constant\ResponseCode;
|
||||||
use support\Request;
|
use support\Request;
|
||||||
|
|
||||||
class StudentController extends BaseController
|
class StudentController extends BaseController
|
||||||
@ -37,7 +38,11 @@ class StudentController extends BaseController
|
|||||||
$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 redirect($url);
|
return $this->json([
|
||||||
|
'code' => ResponseCode::SUCCESS,
|
||||||
|
'data' => $url
|
||||||
|
]);
|
||||||
|
// return redirect($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@ namespace app\api\controller;
|
|||||||
|
|
||||||
use app\BaseController;
|
use app\BaseController;
|
||||||
use app\common\service\TeacherService;
|
use app\common\service\TeacherService;
|
||||||
|
use app\constant\ResponseCode;
|
||||||
use support\Request;
|
use support\Request;
|
||||||
|
|
||||||
class TeacherController extends BaseController
|
class TeacherController extends BaseController
|
||||||
@ -30,7 +31,11 @@ class TeacherController extends BaseController
|
|||||||
$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";
|
||||||
return redirect($url);
|
return $this->json([
|
||||||
|
'code' => ResponseCode::SUCCESS,
|
||||||
|
'data' => $url
|
||||||
|
]);
|
||||||
|
// return redirect($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user