bill 1 year ago
parent
commit
af2adb7259
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/api/instance.ts

+ 2 - 2
src/api/instance.ts

@@ -3,7 +3,7 @@ import { Message } from 'bill/index'
 import { showLoad, hideLoad } from '@/utils'
 import * as URL from './constant'
 import { ResCode, ResCodeDesc } from './constant'
-import { baseURL, params } from '@/env'
+import { appType, baseURL, params } from '@/env'
 
 const instance = axiosFactory()
 
@@ -25,7 +25,7 @@ export const {
 } = instance
 
 const gotoLogin = () => {
-  const loginHref = import.meta.env.DEV ? 'http://localhost:5174' : location.pathname
+  const loginHref = import.meta.env.DEV ? 'http://localhost:5174' : (params.app === appType.fire ? '/fire' : 'criminal')
   location.href = loginHref + '?redirect=' + escape(location.href) + '#/login'
 }