浏览代码

修改跳转问题

bill 2 年之前
父节点
当前提交
12a271be18
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/api/instance.ts

+ 1 - 1
src/api/instance.ts

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