From 7710f8c36acbd39939ac3bc431d0fe23cc697c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Sat, 19 Jul 2025 11:01:51 +0800 Subject: [PATCH] xx --- resourceservicehtml/index.html | 6 +++++- resourceservicehtmlb/index.html | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/resourceservicehtml/index.html b/resourceservicehtml/index.html index be70237..eace115 100644 --- a/resourceservicehtml/index.html +++ b/resourceservicehtml/index.html @@ -168,7 +168,11 @@ authUrl.searchParams.set('scope', oidcConfig.scope); authUrl.searchParams.set('state', state); - window.location.href = authUrl.toString(); + // 将client_id作为参数传递到登录页面 + const loginUrl = new URL('https://oidc.local.com/login'); + loginUrl.searchParams.set('client_id', oidcConfig.clientId); + + window.location.href = loginUrl.toString(); } // 处理回调 diff --git a/resourceservicehtmlb/index.html b/resourceservicehtmlb/index.html index da3fd42..5de48da 100644 --- a/resourceservicehtmlb/index.html +++ b/resourceservicehtmlb/index.html @@ -88,6 +88,7 @@ // 页面加载时执行 window.onload = function() { + console.log("页面加载完成"); if (code) { // 有授权码,处理回调 handleCallback(code, state); @@ -149,6 +150,7 @@ // 显示登录部分 function showLoginSection() { + console.log("显示登录部分"); document.getElementById('status').className = 'status info'; document.getElementById('status').textContent = '请登录以继续'; @@ -168,7 +170,12 @@ authUrl.searchParams.set('scope', oidcConfig.scope); authUrl.searchParams.set('state', state); - window.location.href = authUrl.toString(); + // 将client_id作为参数传递到登录页面 + const loginUrl = new URL('https://oidc.local.com/login'); + console.log("--------loginUrl--------", loginUrl); + loginUrl.searchParams.set('client_id', oidcConfig.clientId); + + window.location.href = loginUrl.toString(); } // 处理回调