From 9d1c08e04385545c08f5ea6c92f22921027db03f Mon Sep 17 00:00:00 2001 From: horizons <1490493387@qq.com> Date: Mon, 26 Sep 2022 08:15:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20sas=E5=88=86=E6=94=AF=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E8=B0=83=E4=B8=BA=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 4352f15f4d6ea3a12b14de3ab129691e0bd4505b --- src/utils/auth.ts | 2 +- src/views/login/components/SocialSignin.vue | 2 +- vite.config.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/auth.ts b/src/utils/auth.ts index dd0ac832..7b669dbe 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -1,6 +1,6 @@ import Cookies from 'js-cookie'; -const SESSION_ID_KEY = 'SCG_SESSION_ID'; +const SESSION_ID_KEY = 'GATEWAY_SESSION_ID'; export const hasLogin = () => { const sessionId = Cookies.get(SESSION_ID_KEY); diff --git a/src/views/login/components/SocialSignin.vue b/src/views/login/components/SocialSignin.vue index abf6b51d..c77de089 100644 --- a/src/views/login/components/SocialSignin.vue +++ b/src/views/login/components/SocialSignin.vue @@ -33,7 +33,7 @@ function youlaiHandleClick(thirdpart: string) { // const appid = 'xxxxx' // const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect') const url = - 'http://localhost:9999/oauth2/authorization/gateway-client-authorization-code?redirect_uri=http://localhost:3000'; + 'http://127.0.0.1:9999/oauth2/authorization/gateway-client-authorization-code?redirect_uri=http://127.0.0.1:3000'; // window.open(url, thirdpart); window.location.href = url; } diff --git a/vite.config.ts b/vite.config.ts index 34391ce1..316acee9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -25,7 +25,7 @@ export default ({ mode }: ConfigEnv): UserConfig => { open: true, // 运行自动打开浏览器 proxy: { [env.VITE_APP_BASE_API]: { - target: 'https://api.youlai.tech', + target: 'http://127.0.0.1:9999', changeOrigin: true, rewrite: path => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')