fix: 修复request()->scheme()方法不存在的问题

- ApprovalService.getDetailUrl: 改用 request()->isSecure()
- AuthController.qrcodeLogin: 改用 request()->isSecure()
This commit is contained in:
root
2026-02-28 14:12:59 +08:00
parent da436949e1
commit ea10bdb138
2 changed files with 13 additions and 2 deletions
+6 -1
View File
@@ -287,7 +287,12 @@ class AuthController extends BaseController
]);
// 构建扫码登录 URL(使用数据库中配置的回调地址)
$callbackUrl = $feishuApp->mobile_callback_url ?? request()->scheme() . '://' . request()->host() . '/login/callback';
if ($feishuApp->mobile_callback_url) {
$callbackUrl = $feishuApp->mobile_callback_url;
} else {
$scheme = request()->isSecure() ? 'https' : 'http';
$callbackUrl = $scheme . '://' . request()->host() . '/login/callback';
}
$redirectUri = urlencode($callbackUrl);
$authUrl = "https://passport.feishu.cn/suite/passport/oauth/authorize?client_id={$feishuApp->app_id}&redirect_uri={$redirectUri}&response_type=code&state={$loginSession->id}";