// 开发环境 // const oauthConfig = { // authority: "http://localhost:5666", // client_id: "Dashboard", // redirect_uri: "http://localhost:5500/callback.html", // response_type: "id_token token", // scope: "openid profile eapapi offline_access", // post_logout_redirect_uri: "http://localhost:5500/pages/macstatus.html", // silent_redirect_uri: "http://localhost:5500/silentref.html", // automaticSilentRenew: true, // }; // 测试环境 // const oauthConfig = { // authority: "https://eap.ofilm.com:7878", // client_id: "Dashboard", // redirect_uri: "https://eap.ofilm.com:7766/callback.html", // response_type: "id_token token", // scope: "openid profile eapapi offline_access", // post_logout_redirect_uri: "https://eap.ofilm.com:7766/pages/macstatus.html", // silent_redirect_uri: "https://eap.ofilm.com:7766/silentref.html", // automaticSilentRenew: true, // }; //正式环境 const oauthConfig = { authority: "http://192.168.1.10:6868", client_id: "Dashboard", redirect_uri: "http://192.168.1.10:9966/callback.html", response_type: "id_token token", scope: "openid profile eapapi offline_access", post_logout_redirect_uri: "http://192.168.1.10:9966/pages/macstatus.html", silent_redirect_uri: "http://192.168.1.10:9966/silentref.html", automaticSilentRenew: true, }; function strRandom(length) { let result = ""; const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; const charactersLength = characters.length; for (let i = 0; i < length; i++) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; }