mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-10 09:05:07 +08:00
refactor: vue3 axios api ...
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { ApiAccessLogVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiAccessLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<ApiAccessLogVO>>({ url: '/infra/api-access-log/page', params })
|
||||
export const getApiAccessLogPageApi = (params) => {
|
||||
return request.get({ url: '/infra/api-access-log/page', params })
|
||||
}
|
||||
|
||||
// 导出API 访问日志
|
||||
export const exportApiAccessLogApi = (params) => {
|
||||
return defHttp.get({ url: '/infra/api-access-log/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/infra/api-access-log/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,19 +1,20 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { ApiErrorLogVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiErrorLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<ApiErrorLogVO>>({ url: '/infra/api-error-log/page', params })
|
||||
export const getApiErrorLogPageApi = (params) => {
|
||||
return request.get({ url: '/infra/api-error-log/page', params })
|
||||
}
|
||||
|
||||
// 更新 API 错误日志的处理状态
|
||||
export const updateApiErrorLogPageApi = (id: number, processStatus: number) => {
|
||||
return defHttp.put({
|
||||
return request.put({
|
||||
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
|
||||
})
|
||||
}
|
||||
|
||||
// 导出API 访问日志
|
||||
export const exportApiErrorLogApi = ({ params }) => {
|
||||
return defHttp.get({ url: '/infra/api-error-log/export-excel', params, responseType: 'blob' })
|
||||
export const exportApiErrorLogApi = (params) => {
|
||||
return request.get({ url: '/infra/api-error-log/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,62 +1,59 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { CodegenDetailVO, CodegenPreviewVO, CodegenTableVO, DatabaseTableVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { CodegenTableVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表代码生成表定义
|
||||
export const getCodegenTablePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<CodegenTableVO>>({ url: '/infra/codegen/table/page', params })
|
||||
export const getCodegenTablePageApi = (params) => {
|
||||
return request.get({ url: '/infra/codegen/table/page', params })
|
||||
}
|
||||
|
||||
// 查询详情代码生成表定义
|
||||
export const getCodegenTableApi = (id: number) => {
|
||||
return defHttp.get<CodegenDetailVO>({ url: '/infra/codegen/detail?tableId=' + id })
|
||||
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
|
||||
}
|
||||
|
||||
// 新增代码生成表定义
|
||||
export const createCodegenTableApi = (params: CodegenTableVO) => {
|
||||
return defHttp.post({ url: '/infra/codegen/create', params })
|
||||
export const createCodegenTableApi = (data: CodegenTableVO) => {
|
||||
return request.post({ url: '/infra/codegen/create', data })
|
||||
}
|
||||
|
||||
// 修改代码生成表定义
|
||||
export const updateCodegenTableApi = (params: CodegenTableVO) => {
|
||||
return defHttp.put({ url: '/infra/codegen/update', params })
|
||||
export const updateCodegenTableApi = (data: CodegenTableVO) => {
|
||||
return request.put({ url: '/infra/codegen/update', data })
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,同步数据库的表和字段定义
|
||||
export const syncCodegenFromDBApi = (id: number) => {
|
||||
return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
||||
return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
||||
}
|
||||
|
||||
// 基于 SQL 建表语句,同步数据库的表和字段定义
|
||||
export const syncCodegenFromSQLApi = (id: number, sql: string) => {
|
||||
return defHttp.put({
|
||||
url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql,
|
||||
headers: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
|
||||
}
|
||||
|
||||
// 预览生成代码
|
||||
export const previewCodegenApi = (id: number) => {
|
||||
return defHttp.get<CodegenPreviewVO[]>({ url: '/infra/codegen/preview?tableId=' + id })
|
||||
return request.get({ url: '/infra/codegen/preview?tableId=' + id })
|
||||
}
|
||||
|
||||
// 下载生成代码
|
||||
export const downloadCodegenApi = (id: number) => {
|
||||
return defHttp.get({ url: '/infra/codegen/download?tableId=' + id, responseType: 'blob' })
|
||||
return request.get({ url: '/infra/codegen/download?tableId=' + id, responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 获得表定义
|
||||
export const getSchemaTableListApi = (params) => {
|
||||
return defHttp.get<DatabaseTableVO[]>({ url: '/infra/codegen/db/table/list', params })
|
||||
return request.get({ url: '/infra/codegen/db/table/list', params })
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,创建代码生成器的表定义
|
||||
export const createCodegenListApi = (params) => {
|
||||
return defHttp.post({ url: '/infra/codegen/create-list', params })
|
||||
export const createCodegenListApi = (data) => {
|
||||
return request.post({ url: '/infra/codegen/create-list', data })
|
||||
}
|
||||
|
||||
// 删除代码生成表定义
|
||||
export const deleteCodegenTableApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
||||
return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
||||
}
|
||||
|
@ -1,37 +1,39 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { ConfigVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询参数列表
|
||||
export const getConfigPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<ConfigVO>>({ url: '/infra/config/page', params })
|
||||
export const getConfigPageApi = (params) => {
|
||||
return request.get({ url: '/infra/config/page', params })
|
||||
}
|
||||
|
||||
// 查询参数详情
|
||||
export const getConfigApi = (id: number) => {
|
||||
return defHttp.get<ConfigVO>({ url: '/infra/config/get?id=' + id })
|
||||
return request.get({ url: '/infra/config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export const getConfigKeyApi = (configKey: string) => {
|
||||
return defHttp.get<ConfigVO>({ url: '/infra/config/get-value-by-key?key=' + configKey })
|
||||
return request.get({ url: '/infra/config/get-value-by-key?key=' + configKey })
|
||||
}
|
||||
|
||||
// 新增参数
|
||||
export const createConfigApi = (params: ConfigVO) => {
|
||||
return defHttp.post({ url: '/infra/config/create', params })
|
||||
export const createConfigApi = (data: ConfigVO) => {
|
||||
return request.post({ url: '/infra/config/create', data })
|
||||
}
|
||||
|
||||
// 修改参数
|
||||
export const updateConfigApi = (params: ConfigVO) => {
|
||||
return defHttp.put({ url: '/infra/config/update', params })
|
||||
export const updateConfigApi = (data: ConfigVO) => {
|
||||
return request.put({ url: '/infra/config/update', data })
|
||||
}
|
||||
|
||||
// 删除参数
|
||||
export const deleteConfigApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/infra/config/delete?id=' + id })
|
||||
return request.delete({ url: '/infra/config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出参数
|
||||
export const exportConfigApi = ({ params }) => {
|
||||
return defHttp.get({ url: '/infra/config/export', params, responseType: 'blob' })
|
||||
export const exportConfigApi = (params) => {
|
||||
return request.get({ url: '/infra/config/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,27 +1,29 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { DataSourceConfigVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询数据源配置列表
|
||||
export const getDataSourceConfigListApi = () => {
|
||||
return defHttp.get<DataSourceConfigVO[]>({ url: '/infra/data-source-config/list' })
|
||||
return request.get({ url: '/infra/data-source-config/list' })
|
||||
}
|
||||
|
||||
// 查询数据源配置详情
|
||||
export const getDataSourceConfigApi = (id: number) => {
|
||||
return defHttp.get<DataSourceConfigVO>({ url: '/infra/data-source-config/get?id=' + id })
|
||||
return request.get({ url: '/infra/data-source-config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增数据源配置
|
||||
export const createDataSourceConfigApi = (params: DataSourceConfigVO) => {
|
||||
return defHttp.post({ url: '/infra/data-source-config/create', params })
|
||||
export const createDataSourceConfigApi = (data: DataSourceConfigVO) => {
|
||||
return request.post({ url: '/infra/data-source-config/create', data })
|
||||
}
|
||||
|
||||
// 修改数据源配置
|
||||
export const updateDataSourceConfigApi = (params: DataSourceConfigVO) => {
|
||||
return defHttp.put({ url: '/infra/data-source-config/update', params })
|
||||
export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => {
|
||||
return request.put({ url: '/infra/data-source-config/update', data })
|
||||
}
|
||||
|
||||
// 删除数据源配置
|
||||
export const deleteDataSourceConfigApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
||||
return request.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 导出Html
|
||||
export const exportHtmlApi = () => {
|
||||
return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
|
||||
return request.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 导出Word
|
||||
export const exportWordApi = () => {
|
||||
return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
|
||||
return request.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 导出Markdown
|
||||
export const exportMarkdownApi = () => {
|
||||
return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
|
||||
return request.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { FileVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询文件列表
|
||||
export const getFilePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<FileVO>>({ url: '/infra/file/page', params })
|
||||
export const getFilePageApi = (params) => {
|
||||
return request.get({ url: '/infra/file/page', params })
|
||||
}
|
||||
|
||||
// 删除文件
|
||||
export const deleteFileApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/infra/file/delete?id=' + id })
|
||||
return request.delete({ url: '/infra/file/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,37 +1,39 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { FileConfigVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询文件配置列表
|
||||
export const getFileConfigPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<FileConfigVO>>({ url: '/infra/file-config/page', params })
|
||||
export const getFileConfigPageApi = (params) => {
|
||||
return request.get({ url: '/infra/file-config/page', params })
|
||||
}
|
||||
|
||||
// 查询文件配置详情
|
||||
export const getFileConfigApi = (id: number) => {
|
||||
return defHttp.get<FileConfigVO>({ url: '/infra/file-config/get?id=' + id })
|
||||
return request.get({ url: '/infra/file-config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 更新文件配置为主配置
|
||||
export const updateFileConfigMasterApi = (id: number) => {
|
||||
return defHttp.get<FileConfigVO>({ url: '/infra/file-config/update-master?id=' + id })
|
||||
return request.get({ url: '/infra/file-config/update-master?id=' + id })
|
||||
}
|
||||
|
||||
// 新增文件配置
|
||||
export const createFileConfigApi = (params: FileConfigVO) => {
|
||||
return defHttp.post({ url: '/infra/file-config/create', params })
|
||||
export const createFileConfigApi = (data: FileConfigVO) => {
|
||||
return request.post({ url: '/infra/file-config/create', data })
|
||||
}
|
||||
|
||||
// 修改文件配置
|
||||
export const updateFileConfigApi = (params: FileConfigVO) => {
|
||||
return defHttp.put({ url: '/infra/file-config/update', params })
|
||||
export const updateFileConfigApi = (data: FileConfigVO) => {
|
||||
return request.put({ url: '/infra/file-config/update', data })
|
||||
}
|
||||
|
||||
// 删除文件配置
|
||||
export const deleteFileConfigApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
|
||||
return request.delete({ url: '/infra/file-config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 测试文件配置
|
||||
export const testFileConfigApi = (id: number) => {
|
||||
return defHttp.get({ url: '/infra/file-config/test?id=' + id })
|
||||
return request.get({ url: '/infra/file-config/test?id=' + id })
|
||||
}
|
||||
|
@ -1,38 +1,36 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { JobVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 任务列表
|
||||
export const getJobPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<JobVO>>({ url: '/infra/job/page', params })
|
||||
export const getJobPageApi = (params) => {
|
||||
return request.get({ url: '/infra/job/page', params })
|
||||
}
|
||||
|
||||
// 任务详情
|
||||
export const getJobApi = (id: number) => {
|
||||
return defHttp.get<JobVO>({ url: '/infra/job/get?id=' + id })
|
||||
return request.get({ url: '/infra/job/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增任务
|
||||
export const createJobApi = (params: JobVO) => {
|
||||
return defHttp.post({ url: '/infra/job/create', params })
|
||||
export const createJobApi = (data: JobVO) => {
|
||||
return request.post({ url: '/infra/job/create', data })
|
||||
}
|
||||
|
||||
// 修改定时任务调度
|
||||
export const updateJobApi = (params: JobVO) => {
|
||||
return defHttp.put({ url: '/infra/job/update', params })
|
||||
return request.put({ url: '/infra/job/update', params })
|
||||
}
|
||||
|
||||
// 删除定时任务调度
|
||||
export const deleteJobApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/infra/job/delete?id=' + id })
|
||||
return request.delete({ url: '/infra/job/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出定时任务调度
|
||||
export const exportJobApi = (params) => {
|
||||
return defHttp.get({
|
||||
url: '/infra/job/export-excel',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
return request.get({ url: '/infra/job/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
@ -41,15 +39,15 @@ export const updateJobStatusApi = (id: number, status: number) => {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return defHttp.put({ url: '/infra/job/update-status', data: data })
|
||||
return request.put({ url: '/infra/job/update-status', data: data })
|
||||
}
|
||||
|
||||
// 定时任务立即执行一次
|
||||
export const runJobApi = (id: number) => {
|
||||
return defHttp.put({ url: '/infra/job/trigger?id=' + id })
|
||||
return request.put({ url: '/infra/job/trigger?id=' + id })
|
||||
}
|
||||
|
||||
// 获得定时任务的下 n 次执行时间
|
||||
export const getJobNextTimesApi = (id: number) => {
|
||||
return defHttp.get({ url: '/infra/job/get_next_times?id=' + id })
|
||||
return request.get({ url: '/infra/job/get_next_times?id=' + id })
|
||||
}
|
||||
|
@ -1,19 +1,20 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { JobLogVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 任务日志列表
|
||||
export const getJobLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<JobLogVO>>({ url: '/infra/job-log/page', params })
|
||||
export const getJobLogPageApi = (params) => {
|
||||
return request.get({ url: '/infra/job-log/page', params })
|
||||
}
|
||||
|
||||
// 任务日志详情
|
||||
export const getJobLogApi = (id: number) => {
|
||||
return defHttp.get<JobLogVO>({ url: '/infra/job-log/get?id=' + id })
|
||||
return request.get({ url: '/infra/job-log/get?id=' + id })
|
||||
}
|
||||
|
||||
// 导出定时任务日志
|
||||
export const exportJobLogApi = (params) => {
|
||||
return defHttp.get({
|
||||
return request.get({
|
||||
url: '/infra/job-log/export-excel',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
|
@ -1,16 +1,25 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { RedisKeyInfo, RedisMonitorInfoVO } from '@/api/infra/redis/types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
/**
|
||||
* 获取redis 监控信息
|
||||
*/
|
||||
export const redisMonitorInfo = () => {
|
||||
return defHttp.get<RedisMonitorInfoVO>({ url: '/infra/redis/get-monitor-info' })
|
||||
export const getCacheApi = () => {
|
||||
return request.get({ url: '/infra/redis/get-monitor-info' })
|
||||
}
|
||||
// 获取模块
|
||||
export const getKeyDefineListApi = () => {
|
||||
return request.get({ url: '/infra/redis/get-key-define-list' })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取redis key列表
|
||||
*/
|
||||
export const redisKeysInfo = () => {
|
||||
return defHttp.get<RedisKeyInfo[]>({ url: '/infra/redis/get-key-list' })
|
||||
export const getKeyListApi = (keyTemplate: string) => {
|
||||
return request.get({
|
||||
url: '/infra/redis/get-key-list',
|
||||
params: {
|
||||
keyTemplate
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import { getRefreshToken } from '@/utils/auth'
|
||||
import type { UserLoginVO, TokenType, UserInfoVO } from './types'
|
||||
import type { UserLoginVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
export interface CodeImgResult {
|
||||
captchaOnOff: boolean
|
||||
@ -18,45 +20,45 @@ export interface SmsLoginVO {
|
||||
|
||||
// 获取验证码
|
||||
export const getCodeImgApi = () => {
|
||||
return defHttp.get<CodeImgResult>({ url: '/system/captcha/get-image' })
|
||||
return request.get({ url: '/system/captcha/get-image' })
|
||||
}
|
||||
|
||||
// 登录
|
||||
export const loginApi = (params: UserLoginVO) => {
|
||||
return defHttp.post<TokenType>({ url: '/system/auth/login', params })
|
||||
export const loginApi = (data: UserLoginVO) => {
|
||||
return request.post({ url: '/system/auth/login', data })
|
||||
}
|
||||
|
||||
// 刷新访问令牌
|
||||
export const refreshToken = () => {
|
||||
return defHttp.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })
|
||||
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })
|
||||
}
|
||||
|
||||
// 使用租户名,获得租户编号
|
||||
export const getTenantIdByNameApi = (name: string) => {
|
||||
return defHttp.get({ url: '/system/tenant/get-id-by-name?name=' + name })
|
||||
return request.get({ url: '/system/tenant/get-id-by-name?name=' + name })
|
||||
}
|
||||
|
||||
// 登出
|
||||
export const loginOutApi = () => {
|
||||
return defHttp.delete({ url: '/system/auth/logout' })
|
||||
return request.delete({ url: '/system/auth/logout' })
|
||||
}
|
||||
|
||||
// 获取用户权限信息
|
||||
export const getInfoApi = () => {
|
||||
return defHttp.get<UserInfoVO>({ url: '/system/auth/get-permission-info' })
|
||||
return request.get({ url: '/system/auth/get-permission-info' })
|
||||
}
|
||||
|
||||
// 路由
|
||||
export const getAsyncRoutesApi = () => {
|
||||
return defHttp.get({ url: '/system/auth/list-menus' })
|
||||
return request.get({ url: '/system/auth/list-menus' })
|
||||
}
|
||||
|
||||
//获取登录验证码
|
||||
export const sendSmsCodeApi = (params: SmsCodeVO) => {
|
||||
return defHttp.post({ url: '/system/auth/send-sms-code', params })
|
||||
export const sendSmsCodeApi = (data: SmsCodeVO) => {
|
||||
return request.post({ url: '/system/auth/send-sms-code', data })
|
||||
}
|
||||
|
||||
// 短信验证码登录
|
||||
export const smsLoginApi = (params: SmsLoginVO) => {
|
||||
return defHttp.post({ url: '/system/auth/sms-login', params })
|
||||
export const smsLoginApi = (data: SmsLoginVO) => {
|
||||
return request.post({ url: '/system/auth/sms-login', data })
|
||||
}
|
||||
|
@ -1,24 +1,26 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { AppVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付应用
|
||||
export const getAppPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<AppVO>>({ url: '/pay/app/page', params })
|
||||
export const getAppPageApi = (params) => {
|
||||
return request.get({ url: '/pay/app/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付应用
|
||||
export const getAppApi = (id: number) => {
|
||||
return defHttp.get<AppVO>({ url: '/pay/app/get?id=' + id })
|
||||
return request.get({ url: '/pay/app/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增支付应用
|
||||
export const createAppApi = (params: AppVO) => {
|
||||
return defHttp.post({ url: '/pay/app/create', params })
|
||||
export const createAppApi = (data: AppVO) => {
|
||||
return request.post({ url: '/pay/app/create', data })
|
||||
}
|
||||
|
||||
// 修改支付应用
|
||||
export const updateAppApi = (params: AppVO) => {
|
||||
return defHttp.put({ url: '/pay/app/update', params })
|
||||
export const updateAppApi = (data: AppVO) => {
|
||||
return request.put({ url: '/pay/app/update', data })
|
||||
}
|
||||
|
||||
// 支付应用信息状态修改
|
||||
@ -27,20 +29,20 @@ export const changeAppStatusApi = (id: number, status: number) => {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return defHttp.put({ url: '/pay/app/update-status', data: data })
|
||||
return request.put({ url: '/pay/app/update-status', data: data })
|
||||
}
|
||||
|
||||
// 删除支付应用
|
||||
export const deleteAppApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/pay/app/delete?id=' + id })
|
||||
return request.delete({ url: '/pay/app/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付应用
|
||||
export const exportAppApi = (params) => {
|
||||
return defHttp.get({ url: '/pay/app/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/pay/app/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 根据商ID称搜索应用列表
|
||||
export const getAppListByMerchantIdApi = (merchantId: number) => {
|
||||
return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
|
||||
return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { ChannelVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付渠道
|
||||
export const getChannelPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<ChannelVO>>({ url: '/pay/channel/page', params })
|
||||
export const getChannelPageApi = (params) => {
|
||||
return request.get({ url: '/pay/channel/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付渠道
|
||||
@ -13,25 +15,25 @@ export const getChannelApi = (merchantId: number, appId: string, code: string) =
|
||||
appId: appId,
|
||||
code: code
|
||||
}
|
||||
return defHttp.get<ChannelVO>({ url: '/pay/channel/get-channel', params: params })
|
||||
return request.get({ url: '/pay/channel/get-channel', params: params })
|
||||
}
|
||||
|
||||
// 新增支付渠道
|
||||
export const createChannelApi = (params: ChannelVO) => {
|
||||
return defHttp.post({ url: '/pay/channel/create', params })
|
||||
export const createChannelApi = (data: ChannelVO) => {
|
||||
return request.post({ url: '/pay/channel/create', data })
|
||||
}
|
||||
|
||||
// 修改支付渠道
|
||||
export const updateChannelApi = (params: ChannelVO) => {
|
||||
return defHttp.put({ url: '/pay/channel/update', params })
|
||||
export const updateChannelApi = (data: ChannelVO) => {
|
||||
return request.put({ url: '/pay/channel/update', data })
|
||||
}
|
||||
|
||||
// 删除支付渠道
|
||||
export const deleteChannelApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/pay/channel/delete?id=' + id })
|
||||
return request.delete({ url: '/pay/channel/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付渠道
|
||||
export const exportChannelApi = (params) => {
|
||||
return defHttp.get({ url: '/pay/channel/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/pay/channel/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,19 +1,21 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { MerchantVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付商户
|
||||
export const getMerchantPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<MerchantVO>>({ url: '/pay/merchant/page', params })
|
||||
export const getMerchantPageApi = (params) => {
|
||||
return request.get({ url: '/pay/merchant/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付商户
|
||||
export const getMerchantApi = (id: number) => {
|
||||
return defHttp.get<MerchantVO>({ url: '/pay/merchant/get?id=' + id })
|
||||
return request.get({ url: '/pay/merchant/get?id=' + id })
|
||||
}
|
||||
|
||||
// 根据商户名称搜索商户列表
|
||||
export const getMerchantListByNameApi = (name: string) => {
|
||||
return defHttp.get<MerchantVO>({
|
||||
return request.get({
|
||||
url: '/pay/merchant/list-by-name?id=',
|
||||
params: {
|
||||
name: name
|
||||
@ -22,23 +24,23 @@ export const getMerchantListByNameApi = (name: string) => {
|
||||
}
|
||||
|
||||
// 新增支付商户
|
||||
export const createMerchantApi = (params: MerchantVO) => {
|
||||
return defHttp.post({ url: '/pay/merchant/create', params })
|
||||
export const createMerchantApi = (data: MerchantVO) => {
|
||||
return request.post({ url: '/pay/merchant/create', data })
|
||||
}
|
||||
|
||||
// 修改支付商户
|
||||
export const updateMerchantApi = (params: MerchantVO) => {
|
||||
return defHttp.put({ url: '/pay/merchant/update', params })
|
||||
export const updateMerchantApi = (data: MerchantVO) => {
|
||||
return request.put({ url: '/pay/merchant/update', data })
|
||||
}
|
||||
|
||||
// 删除支付商户
|
||||
export const deleteMerchantApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/pay/merchant/delete?id=' + id })
|
||||
return request.delete({ url: '/pay/merchant/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付商户
|
||||
export const exportMerchantApi = (params) => {
|
||||
return defHttp.get({ url: '/pay/merchant/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/pay/merchant/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
// 支付商户状态修改
|
||||
export const changeMerchantStatusApi = (id: number, status: number) => {
|
||||
@ -46,5 +48,5 @@ export const changeMerchantStatusApi = (id: number, status: number) => {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return defHttp.put({ url: '/pay/merchant/update-status', data: data })
|
||||
return request.put({ url: '/pay/merchant/update-status', data: data })
|
||||
}
|
||||
|
@ -1,32 +1,34 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { OrderVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付订单
|
||||
export const getOrderPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OrderVO>>({ url: '/pay/order/page', params })
|
||||
export const getOrderPageApi = async (params) => {
|
||||
return await request.get({ url: '/pay/order/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付订单
|
||||
export const getOrderApi = (id: number) => {
|
||||
return defHttp.get<OrderVO>({ url: '/pay/order/get?id=' + id })
|
||||
export const getOrderApi = async (id: number) => {
|
||||
return await request.get({ url: '/pay/order/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增支付订单
|
||||
export const createOrderApi = (params: OrderVO) => {
|
||||
return defHttp.post({ url: '/pay/order/create', params })
|
||||
export const createOrderApi = async (data: OrderVO) => {
|
||||
return await request.post({ url: '/pay/order/create', data })
|
||||
}
|
||||
|
||||
// 修改支付订单
|
||||
export const updateOrderApi = (params: OrderVO) => {
|
||||
return defHttp.put({ url: '/pay/order/update', params })
|
||||
export const updateOrderApi = async (data: OrderVO) => {
|
||||
return await request.put({ url: '/pay/order/update', data })
|
||||
}
|
||||
|
||||
// 删除支付订单
|
||||
export const deleteOrderApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/pay/order/delete?id=' + id })
|
||||
export const deleteOrderApi = async (id: number) => {
|
||||
return await request.delete({ url: '/pay/order/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付订单
|
||||
export const exportOrderApi = (params) => {
|
||||
return defHttp.get({ url: '/pay/order/export-excel', params, responseType: 'blob' })
|
||||
export const exportOrderApi = async (params) => {
|
||||
return await request.get({ url: '/pay/order/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,32 +1,34 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { RefundVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表退款订单
|
||||
export const getRefundPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<RefundVO>>({ url: '/pay/refund/page', params })
|
||||
export const getRefundPageApi = (params) => {
|
||||
return request.get({ url: '/pay/refund/page', params })
|
||||
}
|
||||
|
||||
// 查询详情退款订单
|
||||
export const getRefundApi = (id: number) => {
|
||||
return defHttp.get<RefundVO>({ url: '/pay/refund/get?id=' + id })
|
||||
return request.get({ url: '/pay/refund/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增退款订单
|
||||
export const createRefundApi = (params: RefundVO) => {
|
||||
return defHttp.post({ url: '/pay/refund/create', params })
|
||||
export const createRefundApi = (data: RefundVO) => {
|
||||
return request.post({ url: '/pay/refund/create', data })
|
||||
}
|
||||
|
||||
// 修改退款订单
|
||||
export const updateRefundApi = (params: RefundVO) => {
|
||||
return defHttp.put({ url: '/pay/refund/update', params })
|
||||
export const updateRefundApi = (data: RefundVO) => {
|
||||
return request.put({ url: '/pay/refund/update', data })
|
||||
}
|
||||
|
||||
// 删除退款订单
|
||||
export const deleteRefundApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/pay/refund/delete?id=' + id })
|
||||
return request.delete({ url: '/pay/refund/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出退款订单
|
||||
export const exportRefundApi = (params) => {
|
||||
return defHttp.get({ url: '/pay/refund/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/pay/refund/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,32 +1,34 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { DeptVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询部门(精简)列表
|
||||
export const listSimpleDeptApi = () => {
|
||||
return defHttp.get({ url: '/system/dept/list-all-simple' })
|
||||
return request.get({ url: '/system/dept/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询部门列表
|
||||
export const getDeptPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<DeptVO>>({ url: '/system/dept/list', params })
|
||||
export const getDeptPageApi = (params) => {
|
||||
return request.get({ url: '/system/dept/list', params })
|
||||
}
|
||||
|
||||
// 查询部门详情
|
||||
export const getDeptApi = (id: number) => {
|
||||
return defHttp.get<DeptVO>({ url: '/system/dept/get?id=' + id })
|
||||
return request.get({ url: '/system/dept/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增部门
|
||||
export const createDeptApi = (params: DeptVO) => {
|
||||
return defHttp.post({ url: '/system/dept/create', data: params })
|
||||
export const createDeptApi = (data: DeptVO) => {
|
||||
return request.post({ url: '/system/dept/create', data: data })
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
export const updateDeptApi = (params: DeptVO) => {
|
||||
return defHttp.put({ url: '/system/dept/update', data: params })
|
||||
return request.put({ url: '/system/dept/update', data: params })
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export const deleteDeptApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/dept/delete?id=' + id })
|
||||
return request.delete({ url: '/system/dept/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,36 +1,38 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { DictDataVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询字典数据(精简)列表
|
||||
export const listSimpleDictDataApi = () => {
|
||||
return defHttp.get({ url: '/system/dict-data/list-all-simple' })
|
||||
return request.get({ url: '/system/dict-data/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询字典数据列表
|
||||
export const getDictDataPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<DictDataVO>>({ url: '/system/dict-data/page', params })
|
||||
export const getDictDataPageApi = (params) => {
|
||||
return request.get({ url: '/system/dict-data/page', params })
|
||||
}
|
||||
|
||||
// 查询字典数据详情
|
||||
export const getDictDataApi = (id: number) => {
|
||||
return defHttp.get({ url: '/system/dict-data/get?id=' + id })
|
||||
return request.get({ url: '/system/dict-data/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export const createDictDataApi = (params: DictDataVO) => {
|
||||
return defHttp.post({ url: '/system/dict-data/create', params })
|
||||
export const createDictDataApi = (data: DictDataVO) => {
|
||||
return request.post({ url: '/system/dict-data/create', data })
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export const updateDictDataApi = (params: DictDataVO) => {
|
||||
return defHttp.put({ url: '/system/dict-data/update', params })
|
||||
export const updateDictDataApi = (data: DictDataVO) => {
|
||||
return request.put({ url: '/system/dict-data/update', data })
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export const deleteDictDataApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/dict-data/delete?id=' + id })
|
||||
return request.delete({ url: '/system/dict-data/delete?id=' + id })
|
||||
}
|
||||
// 导出字典类型数据
|
||||
export const exportDictDataApi = (params: DictDataVO) => {
|
||||
return defHttp.get({ url: '/system/dict-data/export', params })
|
||||
return request.get({ url: '/system/dict-data/export', params })
|
||||
}
|
||||
|
@ -1,36 +1,38 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { DictTypeVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询字典(精简)列表
|
||||
export const listSimpleDictTypeApi = () => {
|
||||
return defHttp.get({ url: '/system/dict-type/list-all-simple' })
|
||||
return request.get({ url: '/system/dict-type/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询字典列表
|
||||
export const getDictTypePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<DictTypeVO>>({ url: '/system/dict-type/page', params })
|
||||
export const getDictTypePageApi = (params) => {
|
||||
return request.get({ url: '/system/dict-type/page', params })
|
||||
}
|
||||
|
||||
// 查询字典详情
|
||||
export const getDictTypeApi = (id: number) => {
|
||||
return defHttp.get({ url: '/system/dict-type/get?id=' + id })
|
||||
return request.get({ url: '/system/dict-type/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增字典
|
||||
export const createDictTypeApi = (params: DictTypeVO) => {
|
||||
return defHttp.post({ url: '/system/dict-type/create', params })
|
||||
export const createDictTypeApi = (data: DictTypeVO) => {
|
||||
return request.post({ url: '/system/dict-type/create', data })
|
||||
}
|
||||
|
||||
// 修改字典
|
||||
export const updateDictTypeApi = (params: DictTypeVO) => {
|
||||
return defHttp.put({ url: '/system/dict-type/update', params })
|
||||
export const updateDictTypeApi = (data: DictTypeVO) => {
|
||||
return request.put({ url: '/system/dict-type/update', data })
|
||||
}
|
||||
|
||||
// 删除字典
|
||||
export const deleteDictTypeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/dict-type/delete?id=' + id })
|
||||
return request.delete({ url: '/system/dict-type/delete?id=' + id })
|
||||
}
|
||||
// 导出字典类型
|
||||
export const exportDictTypeApi = (params: DictTypeVO) => {
|
||||
return defHttp.get({ url: '/system/dict-type/export', params })
|
||||
return request.get({ url: '/system/dict-type/export', params })
|
||||
}
|
||||
|
@ -1,31 +1,33 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { ErrorCodeVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询错误码列表
|
||||
export const getErrorCodePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<ErrorCodeVO>>({ url: '/system/error-code/page', params })
|
||||
export const getErrorCodePageApi = (params) => {
|
||||
return request.get({ url: '/system/error-code/page', params })
|
||||
}
|
||||
|
||||
// 查询错误码详情
|
||||
export const getErrorCodeApi = (id: number) => {
|
||||
return defHttp.get<ErrorCodeVO>({ url: '/system/error-code/get?id=' + id })
|
||||
return request.get({ url: '/system/error-code/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增错误码
|
||||
export const createErrorCodeApi = (params: ErrorCodeVO) => {
|
||||
return defHttp.post({ url: '/system/error-code/create', params })
|
||||
export const createErrorCodeApi = (data: ErrorCodeVO) => {
|
||||
return request.post({ url: '/system/error-code/create', data })
|
||||
}
|
||||
|
||||
// 修改错误码
|
||||
export const updateErrorCodeApi = (params: ErrorCodeVO) => {
|
||||
return defHttp.put({ url: '/system/error-code/update', params })
|
||||
export const updateErrorCodeApi = (data: ErrorCodeVO) => {
|
||||
return request.put({ url: '/system/error-code/update', data })
|
||||
}
|
||||
|
||||
// 删除错误码
|
||||
export const deleteErrorCodeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/error-code/delete?id=' + id })
|
||||
return request.delete({ url: '/system/error-code/delete?id=' + id })
|
||||
}
|
||||
// 导出错误码
|
||||
export const excelErrorCodeApi = (params) => {
|
||||
return defHttp.get({ url: '/system/error-code/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/error-code/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { LoginLogVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询登录日志列表
|
||||
export const getLoginLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<LoginLogVO>>({ url: '/system/login-log/page', params })
|
||||
export const getLoginLogPageApi = (params) => {
|
||||
return request.get({ url: '/system/login-log/page', params })
|
||||
}
|
||||
// 导出登录日志
|
||||
export const exportLoginLogApi = (params) => {
|
||||
return defHttp.get({ url: '/system/login-log/export', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/login-log/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,31 +1,33 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { MenuVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询菜单(精简)列表
|
||||
export const listSimpleMenusApi = () => {
|
||||
return defHttp.get({ url: '/system/menu/list-all-simple' })
|
||||
return request.get({ url: '/system/menu/list-all-simple' })
|
||||
}
|
||||
// 查询菜单列表
|
||||
export const getMenuListApi = (params) => {
|
||||
return defHttp.get({ url: '/system/menu/list', params })
|
||||
return request.get({ url: '/system/menu/list', params })
|
||||
}
|
||||
|
||||
// 获取菜单详情
|
||||
export const getMenuApi = (id: number) => {
|
||||
return defHttp.get<MenuVO>({ url: '/system/menu/get?id=' + id })
|
||||
return request.get({ url: '/system/menu/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增菜单
|
||||
export const createMenuApi = (params: MenuVO) => {
|
||||
return defHttp.post({ url: '/system/menu/create', params })
|
||||
export const createMenuApi = (data: MenuVO) => {
|
||||
return request.post({ url: '/system/menu/create', data })
|
||||
}
|
||||
|
||||
// 修改菜单
|
||||
export const updateMenuApi = (params: MenuVO) => {
|
||||
return defHttp.put({ url: '/system/menu/update', params })
|
||||
export const updateMenuApi = (data: MenuVO) => {
|
||||
return request.put({ url: '/system/menu/update', data })
|
||||
}
|
||||
|
||||
// 删除菜单
|
||||
export const deleteMenuApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/menu/delete?id=' + id })
|
||||
return request.delete({ url: '/system/menu/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,27 +1,29 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { NoticeVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询公告列表
|
||||
export const getNoticePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<NoticeVO>>({ url: '/system/notice/page', params })
|
||||
export const getNoticePageApi = (params) => {
|
||||
return request.get({ url: '/system/notice/page', params })
|
||||
}
|
||||
|
||||
// 查询公告详情
|
||||
export const getNoticeApi = (id: number) => {
|
||||
return defHttp.get<NoticeVO>({ url: '/system/notice/get?id=' + id })
|
||||
return request.get({ url: '/system/notice/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增公告
|
||||
export const createNoticeApi = (params: NoticeVO) => {
|
||||
return defHttp.post({ url: '/system/notice/create', params })
|
||||
export const createNoticeApi = (data: NoticeVO) => {
|
||||
return request.post({ url: '/system/notice/create', data })
|
||||
}
|
||||
|
||||
// 修改公告
|
||||
export const updateNoticeApi = (params: NoticeVO) => {
|
||||
return defHttp.put({ url: '/system/notice/update', params })
|
||||
export const updateNoticeApi = (data: NoticeVO) => {
|
||||
return request.put({ url: '/system/notice/update', data })
|
||||
}
|
||||
|
||||
// 删除公告
|
||||
export const deleteNoticeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/notice/delete?id=' + id })
|
||||
return request.delete({ url: '/system/notice/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,27 +1,29 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import { OAuth2ClientVo } from './client.types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询 OAuth2列表
|
||||
export const getOAuth2ClientPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OAuth2ClientVo>>({ url: '/system/oauth2-client/page', params })
|
||||
export const getOAuth2ClientPageApi = (params) => {
|
||||
return request.get({ url: '/system/oauth2-client/page', params })
|
||||
}
|
||||
|
||||
// 查询 OAuth2详情
|
||||
export const getOAuth2ClientApi = (id: number) => {
|
||||
return defHttp.get<OAuth2ClientVo>({ url: '/system/oauth2-client/get?id=' + id })
|
||||
return request.get({ url: '/system/oauth2-client/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增 OAuth2
|
||||
export const createOAuth2ClientApi = (params: OAuth2ClientVo) => {
|
||||
return defHttp.post({ url: '/system/oauth2-client/create', params })
|
||||
export const createOAuth2ClientApi = (data: OAuth2ClientVo) => {
|
||||
return request.post({ url: '/system/oauth2-client/create', data })
|
||||
}
|
||||
|
||||
// 修改 OAuth2
|
||||
export const updateOAuth2ClientApi = (params: OAuth2ClientVo) => {
|
||||
return defHttp.put({ url: '/system/oauth2-client/update', params })
|
||||
export const updateOAuth2ClientApi = (data: OAuth2ClientVo) => {
|
||||
return request.put({ url: '/system/oauth2-client/update', data })
|
||||
}
|
||||
|
||||
// 删除 OAuth2
|
||||
export const deleteOAuth2ClientApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id })
|
||||
return request.delete({ url: '/system/oauth2-client/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { OAuth2TokenVo } from './token.types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询 token列表
|
||||
export const getAccessTokenPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OAuth2TokenVo>>({ url: '/system/oauth2-token/page', params })
|
||||
export const getAccessTokenPageApi = (params) => {
|
||||
return request.get({ url: '/system/oauth2-token/page', params })
|
||||
}
|
||||
|
||||
// 删除 token
|
||||
export const deleteAccessTokenApi = (accessToken: number) => {
|
||||
return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
|
||||
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { OperateLogVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询操作日志列表
|
||||
export const getOperateLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OperateLogVO>>({ url: '/system/operate-log/page', params })
|
||||
export const getOperateLogPageApi = (params) => {
|
||||
return request.get({ url: '/system/operate-log/page', params })
|
||||
}
|
||||
// 导出操作日志
|
||||
export const exportOperateLogApi = (params) => {
|
||||
return defHttp.get({ url: '/system/operate-log/export', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/operate-log/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,36 +1,38 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { PostVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询岗位列表
|
||||
export const getPostPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params })
|
||||
export const getPostPageApi = async (params) => {
|
||||
return await request.get({ url: '/system/post/page', params })
|
||||
}
|
||||
|
||||
// 获取岗位精简信息列表
|
||||
export const listSimplePostsApi = () => {
|
||||
return defHttp.get<PostVO[]>({ url: '/system/post/list-all-simple' })
|
||||
export const listSimplePostsApi = async () => {
|
||||
return await request.get({ url: '/system/post/list-all-simple' })
|
||||
}
|
||||
// 查询岗位详情
|
||||
export const getPostApi = (id: number) => {
|
||||
return defHttp.get<PostVO>({ url: '/system/post/get?id=' + id })
|
||||
export const getPostApi = async (id: number) => {
|
||||
return await request.get({ url: '/system/post/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export const createPostApi = (params: PostVO) => {
|
||||
return defHttp.post({ url: '/system/post/create', params })
|
||||
export const createPostApi = async (data: PostVO) => {
|
||||
return await request.post({ url: '/system/post/create', data })
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export const updatePostApi = (params: PostVO) => {
|
||||
return defHttp.put({ url: '/system/post/update', params })
|
||||
export const updatePostApi = async (data: PostVO) => {
|
||||
return await request.put({ url: '/system/post/update', data })
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export const deletePostApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/post/delete?id=' + id })
|
||||
export const deletePostApi = async (id: number) => {
|
||||
return await request.delete({ url: '/system/post/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出岗位
|
||||
export const exportPostApi = (params) => {
|
||||
return defHttp.get({ url: '/system/post/export', params, responseType: 'blob' })
|
||||
export const exportPostApi = async (params) => {
|
||||
return await request.get({ url: '/system/post/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,32 +1,34 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { RoleVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询角色列表
|
||||
export const getRolePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<RoleVO>>({ url: '/system/role/page', params })
|
||||
export const getRolePageApi = (params) => {
|
||||
return request.get({ url: '/system/role/page', params })
|
||||
}
|
||||
|
||||
// 查询角色详情
|
||||
export const getRoleApi = (id: number) => {
|
||||
return defHttp.get<RoleVO>({ url: '/system/role/get?id=' + id })
|
||||
return request.get({ url: '/system/role/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增角色
|
||||
export const createRoleApi = (params: RoleVO) => {
|
||||
return defHttp.post({ url: '/system/role/create', params })
|
||||
export const createRoleApi = (data: RoleVO) => {
|
||||
return request.post({ url: '/system/role/create', data })
|
||||
}
|
||||
|
||||
// 修改角色
|
||||
export const updateRoleApi = (params: RoleVO) => {
|
||||
return defHttp.put({ url: '/system/role/update', params })
|
||||
export const updateRoleApi = (data: RoleVO) => {
|
||||
return request.put({ url: '/system/role/update', data })
|
||||
}
|
||||
|
||||
// 修改角色状态
|
||||
export const updateRoleStatusApi = (params: RoleVO) => {
|
||||
return defHttp.put({ url: '/system/role/update-status', params })
|
||||
export const updateRoleStatusApi = (data: RoleVO) => {
|
||||
return request.put({ url: '/system/role/update-status', data })
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
export const deleteRoleApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/role/delete?id=' + id })
|
||||
return request.delete({ url: '/system/role/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,42 +1,44 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { SensitiveWordVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询敏感词列表
|
||||
export const getSensitiveWordPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SensitiveWordVO>>({ url: '/system/sensitive-word/page', params })
|
||||
export const getSensitiveWordPageApi = (params) => {
|
||||
return request.get({ url: '/system/sensitive-word/page', params })
|
||||
}
|
||||
|
||||
// 查询敏感词详情
|
||||
export const getSensitiveWordApi = (id: number) => {
|
||||
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/get?id=' + id })
|
||||
return request.get({ url: '/system/sensitive-word/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增敏感词
|
||||
export const createSensitiveWordApi = (params: SensitiveWordVO) => {
|
||||
return defHttp.post({ url: '/system/sensitive-word/create', params })
|
||||
export const createSensitiveWordApi = (data: SensitiveWordVO) => {
|
||||
return request.post({ url: '/system/sensitive-word/create', data })
|
||||
}
|
||||
|
||||
// 修改敏感词
|
||||
export const updateSensitiveWordApi = (params: SensitiveWordVO) => {
|
||||
return defHttp.put({ url: '/system/sensitive-word/update', params })
|
||||
export const updateSensitiveWordApi = (data: SensitiveWordVO) => {
|
||||
return request.put({ url: '/system/sensitive-word/update', data })
|
||||
}
|
||||
|
||||
// 删除敏感词
|
||||
export const deleteSensitiveWordApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id })
|
||||
return request.delete({ url: '/system/sensitive-word/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出敏感词
|
||||
export const exportSensitiveWordApi = (params) => {
|
||||
return defHttp.get({ url: '/system/sensitive-word/export', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/sensitive-word/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 获取所有敏感词的标签数组
|
||||
export const getSensitiveWordTagsApi = () => {
|
||||
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/get-tags' })
|
||||
return request.get({ url: '/system/sensitive-word/get-tags' })
|
||||
}
|
||||
|
||||
// 获得文本所包含的不合法的敏感词数组
|
||||
export const validateTextApi = (id: number) => {
|
||||
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/validate-text?' + id })
|
||||
return request.get({ url: '/system/sensitive-word/validate-text?' + id })
|
||||
}
|
||||
|
@ -1,32 +1,34 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { SmsChannelVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询短信渠道列表
|
||||
export const getSmsChannelPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SmsChannelVO>>({ url: '/system/sms-channel/page', params })
|
||||
export const getSmsChannelPageApi = (params) => {
|
||||
return request.get({ url: '/system/sms-channel/page', params })
|
||||
}
|
||||
|
||||
// 获得短信渠道精简列表
|
||||
export function getSimpleSmsChannels() {
|
||||
return defHttp.get({ url: '/system/sms-channel/list-all-simple' })
|
||||
return request.get({ url: '/system/sms-channel/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询短信渠道详情
|
||||
export const getSmsChannelApi = (id: number) => {
|
||||
return defHttp.get<SmsChannelVO>({ url: '/system/sms-channel/get?id=' + id })
|
||||
return request.get({ url: '/system/sms-channel/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增短信渠道
|
||||
export const createSmsChannelApi = (params: SmsChannelVO) => {
|
||||
return defHttp.post({ url: '/system/sms-channel/create', params })
|
||||
export const createSmsChannelApi = (data: SmsChannelVO) => {
|
||||
return request.post({ url: '/system/sms-channel/create', data })
|
||||
}
|
||||
|
||||
// 修改短信渠道
|
||||
export const updateSmsChannelApi = (params: SmsChannelVO) => {
|
||||
return defHttp.put({ url: '/system/sms-channel/update', params })
|
||||
export const updateSmsChannelApi = (data: SmsChannelVO) => {
|
||||
return request.put({ url: '/system/sms-channel/update', data })
|
||||
}
|
||||
|
||||
// 删除短信渠道
|
||||
export const deleteSmsChannelApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id })
|
||||
return request.delete({ url: '/system/sms-channel/delete?id=' + id })
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { SmsLogVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询短信日志列表
|
||||
export const getSmsLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SmsLogVO>>({ url: '/system/sms-log/page', params })
|
||||
export const getSmsLogPageApi = (params) => {
|
||||
return request.get({ url: '/system/sms-log/page', params })
|
||||
}
|
||||
|
||||
// 导出短信日志
|
||||
export const exportSmsLogApi = (params) => {
|
||||
return defHttp.get({ url: '/system/sms-log/export', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/sms-log/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,37 +1,39 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { SmsTemplateVO, SmsSendVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询短信模板列表
|
||||
export const getSmsTemplatePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SmsTemplateVO>>({ url: '/system/sms-template/page', params })
|
||||
export const getSmsTemplatePageApi = (params) => {
|
||||
return request.get({ url: '/system/sms-template/page', params })
|
||||
}
|
||||
|
||||
// 查询短信模板详情
|
||||
export const getSmsTemplateApi = (id: number) => {
|
||||
return defHttp.get<SmsTemplateVO>({ url: '/system/sms-template/get?id=' + id })
|
||||
return request.get({ url: '/system/sms-template/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增短信模板
|
||||
export const createSmsTemplateApi = (params: SmsTemplateVO) => {
|
||||
return defHttp.post({ url: '/system/sms-template/create', params })
|
||||
export const createSmsTemplateApi = (data: SmsTemplateVO) => {
|
||||
return request.post({ url: '/system/sms-template/create', data })
|
||||
}
|
||||
|
||||
// 修改短信模板
|
||||
export const updateSmsTemplateApi = (params: SmsTemplateVO) => {
|
||||
return defHttp.put({ url: '/system/sms-template/update', params })
|
||||
export const updateSmsTemplateApi = (data: SmsTemplateVO) => {
|
||||
return request.put({ url: '/system/sms-template/update', data })
|
||||
}
|
||||
|
||||
// 删除短信模板
|
||||
export const deleteSmsTemplateApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/sms-template/delete?id=' + id })
|
||||
return request.delete({ url: '/system/sms-template/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 发送短信
|
||||
export function sendSms(params: SmsSendVO) {
|
||||
return defHttp.post({ url: '/system/sms-template/send-sms', params })
|
||||
export function sendSms(data: SmsSendVO) {
|
||||
return request.post({ url: '/system/sms-template/send-sms', data })
|
||||
}
|
||||
|
||||
// 导出短信模板
|
||||
export const exportPostApi = (params) => {
|
||||
return defHttp.get({ url: '/system/sms-template/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/sms-template/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,32 +1,34 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { TenantVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询租户列表
|
||||
export const getTenantPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<TenantVO>>({ url: '/system/tenant/page', params })
|
||||
export const getTenantPageApi = (params) => {
|
||||
return request.get({ url: '/system/tenant/page', params })
|
||||
}
|
||||
|
||||
// 查询租户详情
|
||||
export const getTenantApi = (id: number) => {
|
||||
return defHttp.get<TenantVO>({ url: '/system/tenant/get?id=' + id })
|
||||
return request.get({ url: '/system/tenant/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增租户
|
||||
export const createTenantApi = (params: TenantVO) => {
|
||||
return defHttp.post({ url: '/system/tenant/create', params })
|
||||
export const createTenantApi = (data: TenantVO) => {
|
||||
return request.post({ url: '/system/tenant/create', data })
|
||||
}
|
||||
|
||||
// 修改租户
|
||||
export const updateTenantApi = (params: TenantVO) => {
|
||||
return defHttp.put({ url: '/system/tenant/update', params })
|
||||
export const updateTenantApi = (data: TenantVO) => {
|
||||
return request.put({ url: '/system/tenant/update', data })
|
||||
}
|
||||
|
||||
// 删除租户
|
||||
export const deleteTenantApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/tenant/delete?id=' + id })
|
||||
return request.delete({ url: '/system/tenant/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出租户
|
||||
export const exportTenantApi = (params) => {
|
||||
return defHttp.get({ url: '/system/tenant/export-excel', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/tenant/export-excel', params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -1,33 +1,33 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { TenantPackageVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询租户套餐列表
|
||||
export const getTenantPackageTypePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<TenantPackageVO>>({ url: '/system/tenant-package/page', params })
|
||||
export const getTenantPackageTypePageApi = (params) => {
|
||||
return request.get({ url: '/system/tenant-package/page', params })
|
||||
}
|
||||
|
||||
// 获得租户
|
||||
export const getTenantPackageApi = (id: number) => {
|
||||
return defHttp.get<TenantPackageVO>({ url: '/system/tenant-package/get?id=' + id })
|
||||
return request.get({ url: '/system/tenant-package/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增租户套餐
|
||||
export const createTenantPackageTypeApi = (params: TenantPackageVO) => {
|
||||
return defHttp.post({ url: '/system/tenant-package/create', params })
|
||||
export const createTenantPackageTypeApi = (data: TenantPackageVO) => {
|
||||
return request.post({ url: '/system/tenant-package/create', data })
|
||||
}
|
||||
|
||||
// 修改租户套餐
|
||||
export const updateTenantPackageTypeApi = (params: TenantPackageVO) => {
|
||||
return defHttp.put({ url: '/system/tenant-package/update', params })
|
||||
export const updateTenantPackageTypeApi = (data: TenantPackageVO) => {
|
||||
return request.put({ url: '/system/tenant-package/update', data })
|
||||
}
|
||||
|
||||
// 删除租户套餐
|
||||
export const deleteTenantPackageTypeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id })
|
||||
return request.delete({ url: '/system/tenant-package/delete?id=' + id })
|
||||
}
|
||||
// // 获取租户套餐精简信息列表
|
||||
export const getTenantPackageList = () => {
|
||||
return defHttp.get({
|
||||
url: '/system/tenant-package/get-simple-list'
|
||||
})
|
||||
return request.get({ url: '/system/tenant-package/get-simple-list' })
|
||||
}
|
||||
|
@ -1,51 +1,50 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { UserVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询用户管理列表
|
||||
export const getUserPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<UserVO>>({ url: '/system/user/page', params })
|
||||
export const getUserPageApi = (params) => {
|
||||
return request.get({ url: '/system/user/page', params })
|
||||
}
|
||||
|
||||
// 查询用户详情
|
||||
export const getUserApi = (id: number) => {
|
||||
return defHttp.get<UserVO>({ url: '/system/user/get?id=' + id })
|
||||
return request.get({ url: '/system/user/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增用户
|
||||
export const createUserApi = (params: UserVO) => {
|
||||
return defHttp.post({ url: '/system/user/create', params })
|
||||
export const createUserApi = (data: UserVO) => {
|
||||
return request.post({ url: '/system/user/create', data })
|
||||
}
|
||||
|
||||
// 修改用户
|
||||
export const updateUserApi = (params: UserVO) => {
|
||||
return defHttp.put({ url: '/system/user/update', params })
|
||||
export const updateUserApi = (data: UserVO) => {
|
||||
return request.put({ url: '/system/user/update', data })
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
export const deleteUserApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/user/delete?id=' + id })
|
||||
return request.delete({ url: '/system/user/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出用户
|
||||
export const exportUserApi = (params) => {
|
||||
return defHttp.get({ url: '/system/user/export', params, responseType: 'blob' })
|
||||
return request.get({ url: '/system/user/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 下载用户导入模板
|
||||
export const importUserTemplateApi = () => {
|
||||
return defHttp.get({ url: '/system/user/get-import-template', responseType: 'blob' })
|
||||
return request.get({ url: '/system/user/get-import-template', responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export const resetUserPwdApi = (userId: number, password: number) => {
|
||||
export const resetUserPwdApi = (id: number, password: string) => {
|
||||
const data = {
|
||||
userId,
|
||||
id,
|
||||
password
|
||||
}
|
||||
return defHttp.put({
|
||||
url: '/system/user/resetPwd',
|
||||
data: data
|
||||
})
|
||||
return request.put({ url: '/system/user/update-password', data: data })
|
||||
}
|
||||
|
||||
// 用户状态修改
|
||||
@ -54,15 +53,5 @@ export const updateUserStatusApi = (id: number, status: number) => {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return defHttp.put({ url: '/system/user/update-status', data: data })
|
||||
}
|
||||
|
||||
// 查询授权角色
|
||||
export const getAuthRoleApi = (userId: string) => {
|
||||
return defHttp.get({ url: '/system/user/authRole/' + userId })
|
||||
}
|
||||
|
||||
// 保存授权角色
|
||||
export const updateAuthRoleApi = (data: any) => {
|
||||
return defHttp.put({ url: '/system/user/authRole', params: data })
|
||||
return request.put({ url: '/system/user/update-status', data: data })
|
||||
}
|
||||
|
@ -1,19 +1,20 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { ProfileVO } from './types'
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询用户个人信息
|
||||
export const getUserProfileApi = () => {
|
||||
return defHttp.get<ProfileVO>({ url: '/system/user/profile/get' })
|
||||
return request.get({ url: '/system/user/profile/get' })
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export const updateUserProfileApi = ({ params }) => {
|
||||
return defHttp.put({ url: '/system/user/profile/update', params })
|
||||
export const updateUserProfileApi = (params) => {
|
||||
return request.put({ url: '/system/user/profile/update', params })
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
|
||||
return defHttp.put({
|
||||
return request.put({
|
||||
url: '/system/user/profile/update-password',
|
||||
params: {
|
||||
oldPassword: oldPassword,
|
||||
@ -24,5 +25,5 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
|
||||
|
||||
// 用户头像上传
|
||||
export const uploadAvatarApi = (data) => {
|
||||
return defHttp.put({ url: '/system/user/profile/update-avatar', data: data })
|
||||
return request.put({ url: '/system/user/profile/update-avatar', data: data })
|
||||
}
|
||||
|
Reference in New Issue
Block a user