2022-04-26 15:03:48 +08:00
|
|
|
import { useAxios } from '@/hooks/web/useAxios'
|
|
|
|
|
|
|
|
const request = useAxios()
|
|
|
|
|
|
|
|
// 获取所有字典
|
2022-06-25 21:56:24 +08:00
|
|
|
export const getDictApi = async (): Promise<IResponse> => {
|
|
|
|
const res = await request.get({ url: '/dict/list' })
|
|
|
|
return res && res.data
|
2022-04-26 15:03:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 模拟获取某个字典
|
2022-06-25 21:56:24 +08:00
|
|
|
export const getDictOneApi = async (): Promise<IResponse> => {
|
|
|
|
const res = await request.get({ url: '/dict/one' })
|
|
|
|
return res && res.data
|
2022-04-26 15:03:48 +08:00
|
|
|
}
|