refactor: folders

This commit is contained in:
张传龙
2022-09-18 20:05:40 +08:00
parent bdbe9b8483
commit 6664ae8f7b
45 changed files with 138 additions and 139 deletions

View File

@@ -1,7 +1,5 @@
import { useUserStore } from '@/store/modules/user'
import { isNullOrUndef } from '@/utils/is'
import { removeToken } from '@/utils/token'
import { toLogin } from '@/utils/auth'
import { useUserStore } from '@/store'
import { isNullOrUndef, removeToken, toLogin } from '@/utils'
export function addBaseParams(params) {
if (!params.userId) {

View File

@@ -14,6 +14,6 @@ export function createAxios(options = {}) {
return service
}
export default createAxios({
export const request = createAxios({
baseURL: import.meta.env.VITE_BASE_API,
})

View File

@@ -1,5 +1,4 @@
import { getToken } from '@/utils/token'
import { toLogin } from '@/utils/auth'
import { getToken, toLogin } from '@/utils'
import { resolveResError } from './helpers'
export function reqResolve(config) {