chore: 更新依赖

This commit is contained in:
kailong321200875
2023-12-07 10:58:59 +08:00
parent 93767b65aa
commit f8db745696
3 changed files with 25 additions and 22 deletions

View File

@@ -1,8 +1,10 @@
import service from './service'
import { CONTENT_TYPE } from '@/constants'
import { useUserStoreWithOut } from '@/store/modules/user'
const request = (option: AxiosConfig) => {
const { url, method, params, data, headers, responseType } = option
const userStore = useUserStoreWithOut()
return service.request({
url: url,
method,
@@ -11,6 +13,7 @@ const request = (option: AxiosConfig) => {
responseType: responseType,
headers: {
'Content-Type': CONTENT_TYPE,
[userStore.getTokenKey ?? 'Authorization']: userStore.getToken ?? '',
...headers
}
})