1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-01-22 23:50:22 +08:00

style: lint

This commit is contained in:
zclzone
2024-06-06 18:05:36 +08:00
parent 98f9d5893a
commit a67510fe34
72 changed files with 542 additions and 389 deletions

View File

@@ -20,7 +20,7 @@ export function setupInterceptors(axiosInstance) {
const { accessToken } = useAuthStore()
if (accessToken) {
// token: Bearer + xxx
config.headers.Authorization = 'Bearer ' + accessToken
config.headers.Authorization = `Bearer ${accessToken}`
}
return config
@@ -42,7 +42,7 @@ export function setupInterceptors(axiosInstance) {
// 根据code处理对应的操作并返回处理后的message
const message = resolveResError(code, data?.message ?? statusText)
//需要错误提醒
// 需要错误提醒
!config?.noNeedTip && message && window.$message?.error(message)
return Promise.reject({ code, message, error: data ?? response })
}