Parcourir la source

登录失败添加redirect

bill il y a 1 an
Parent
commit
f80adbb356
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/api/instance.ts

+ 2 - 2
src/api/instance.ts

@@ -25,8 +25,8 @@ export const {
 } = instance
 
 const gotoLogin = () => {
-  // const loginHref = import.meta.env.DEV ? 'http://localhost:5174' : '/'
-  // location.href = loginHref + '?redirect=' + escape(location.href) + '#/login'
+  const loginHref = import.meta.env.DEV ? 'http://localhost:5174' : '/'
+  location.href = loginHref + '?redirect=' + escape(location.href) + '#/login'
 }
 
 addReqErrorHandler(err => {