first commit

This commit is contained in:
zhangchuanlong
2022-01-08 17:20:46 +08:00
commit 8d0158be7c
80 changed files with 5240 additions and 0 deletions

13
src/utils/http/help.js Normal file
View 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
}
}