Centralize typed resource functions under common/apis and return complete JSON envelopes while preserving raw responses, bearer session isolation, and single-owner errors. Keep settings state and queues inside the setup store. Use Element Plus forms and dialogs for login, settings, imports, moves, and images; preserve editor interactions and themes. Update callers, tests, generated declarations, and request import constraints together.
22 lines
481 B
TypeScript
22 lines
481 B
TypeScript
import type * as Tree from './type'
|
|
import { request } from '@/http/axios'
|
|
|
|
/** 读取目录树。 */
|
|
export function getTreeApi() {
|
|
return request<Tree.TreeResponseData>({
|
|
url: 'tree',
|
|
method: 'get',
|
|
errorOwner: 'caller',
|
|
})
|
|
}
|
|
|
|
/** 设置或重置目录项图标。 */
|
|
export function setTreeIconApi(data: Tree.TreeIconRequestData) {
|
|
return request<Tree.TreeIconResponseData>({
|
|
url: 'tree-icon',
|
|
method: 'put',
|
|
data,
|
|
errorOwner: 'caller',
|
|
})
|
|
}
|