mod: 文件名模块修改
This commit is contained in:
13
src/utils/http/helpers.js
Normal file
13
src/utils/http/helpers.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
|
||||
const WITHOUT_TOKEN_API = [{ url: '/auth/login', method: 'POST' }]
|
||||
|
||||
export function isWithoutToken({ url, method = '' }) {
|
||||
return WITHOUT_TOKEN_API.some((item) => item.url === url && item.method === method.toUpperCase())
|
||||
}
|
||||
|
||||
export function addBaseParams(params) {
|
||||
if (!params.userId) {
|
||||
params.userId = useUserStore().userId
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user