mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-06 10:01:26 +08:00
重构项目中所有使用requestClient的API调用,替换为alovaInstance 移除已废弃的旧版上传组件及相关代码 调整上传组件类型定义以适配antdv-next更新 优化上传逻辑,移除不必要的进度事件和取消信号 更新类型定义文件,迁移axios配置到alova类型
51 lines
1.0 KiB
TypeScript
Executable File
51 lines
1.0 KiB
TypeScript
Executable File
import type { TreeForm, TreeQuery, TreeVO } from './model';
|
|
|
|
import type { ID, IDS } from '#/api/common';
|
|
|
|
import { alovaInstance } from '#/utils/http';
|
|
|
|
/**
|
|
* 查询测试树列表
|
|
* @param params
|
|
* @returns 测试树列表
|
|
*/
|
|
export function treeList(params?: TreeQuery) {
|
|
return alovaInstance.get<TreeVO[]>('/demo/tree/list', { params });
|
|
}
|
|
|
|
/**
|
|
* 查询测试树详情
|
|
* @param id id
|
|
* @returns 测试树详情
|
|
*/
|
|
export function treeInfo(id: ID) {
|
|
return alovaInstance.get<TreeVO>(`/demo/tree/${id}`);
|
|
}
|
|
|
|
/**
|
|
* 新增测试树
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function treeAdd(data: TreeForm) {
|
|
return alovaInstance.postWithMsg<void>('/demo/tree', data);
|
|
}
|
|
|
|
/**
|
|
* 更新测试树
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function treeUpdate(data: TreeForm) {
|
|
return alovaInstance.putWithMsg<void>('/demo/tree', data);
|
|
}
|
|
|
|
/**
|
|
* 删除测试树
|
|
* @param id id
|
|
* @returns void
|
|
*/
|
|
export function treeRemove(id: ID | IDS) {
|
|
return alovaInstance.deleteWithMsg<void>(`/demo/tree/${id}`);
|
|
}
|