mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-12 10:05:07 +08:00
refactor: refactor axios
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { DeptVO, DeptListReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询部门(精简)列表
|
||||
export const listSimpleDeptApi = () => {
|
||||
return request.get({ url: '/system/dept/list-all-simple' })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询字典数据(精简)列表
|
||||
export const listSimpleDictDataApi = () => {
|
||||
return request.get({ url: '/system/dict-data/list-all-simple' })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询字典(精简)列表
|
||||
export const listSimpleDictTypeApi = () => {
|
||||
return request.get({ url: '/system/dict-type/list-all-simple' })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { ErrorCodeVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询错误码列表
|
||||
export const getErrorCodePageApi = (params) => {
|
||||
return request.get({ url: '/system/error-code/page', params })
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询登录日志列表
|
||||
export const getLoginLogPageApi = (params) => {
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { MenuVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询菜单(精简)列表
|
||||
export const listSimpleMenusApi = () => {
|
||||
return request.get({ url: '/system/menu/list-all-simple' })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { NoticeVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询公告列表
|
||||
export const getNoticePageApi = (params) => {
|
||||
return request.get({ url: '/system/notice/page', params })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { OAuth2ClientVo } from './client.types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询 OAuth2列表
|
||||
export const getOAuth2ClientPageApi = (params) => {
|
||||
return request.get({ url: '/system/oauth2-client/page', params })
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询 token列表
|
||||
export const getAccessTokenPageApi = (params) => {
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询操作日志列表
|
||||
export const getOperateLogPageApi = (params) => {
|
||||
|
@ -1,12 +1,10 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type {
|
||||
PermissionAssignRoleDataScopeReqVO,
|
||||
PermissionAssignRoleMenuReqVO,
|
||||
PermissionAssignUserRoleReqVO
|
||||
} from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询角色拥有的菜单权限
|
||||
export const listRoleMenusApi = async (roleId: number) => {
|
||||
return await request.get({ url: '/system/permission/list-role-resources?roleId=' + roleId })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { PostVO, PostPageReqVO, PostExportReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询岗位列表
|
||||
export const getPostPageApi = async (params: PostPageReqVO) => {
|
||||
return await request.get({ url: '/system/post/page', params })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { RoleVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询角色列表
|
||||
export const getRolePageApi = async (params) => {
|
||||
return await request.get({ url: '/system/role/page', params })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { SensitiveWordVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询敏感词列表
|
||||
export const getSensitiveWordPageApi = (params) => {
|
||||
return request.get({ url: '/system/sensitive-word/page', params })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { SmsChannelVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询短信渠道列表
|
||||
export const getSmsChannelPageApi = (params) => {
|
||||
return request.get({ url: '/system/sms-channel/page', params })
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询短信日志列表
|
||||
export const getSmsLogPageApi = (params) => {
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { SmsTemplateVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询短信模板列表
|
||||
export const getSmsTemplatePageApi = (params) => {
|
||||
return request.get({ url: '/system/sms-template/page', params })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { TenantVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询租户列表
|
||||
export const getTenantPageApi = (params) => {
|
||||
return request.get({ url: '/system/tenant/page', params })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { TenantPackageVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询租户套餐列表
|
||||
export const getTenantPackageTypePageApi = (params) => {
|
||||
return request.get({ url: '/system/tenant-package/page', params })
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { UserVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询用户管理列表
|
||||
export const getUserPageApi = (params) => {
|
||||
return request.get({ url: '/system/user/page', params })
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询用户个人信息
|
||||
export const getUserProfileApi = () => {
|
||||
|
Reference in New Issue
Block a user