mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-14 20:32:08 +08:00
23 lines
607 B
TypeScript
23 lines
607 B
TypeScript
import { http } from '@/api/http'
|
|
import { httpErrorHandle } from '@/utils'
|
|
import { RequestHttpEnum, ModuleTypeEnum } from '@/enums/httpEnum'
|
|
|
|
// * 项目列表
|
|
export const projectListApi = async (data: object) => {
|
|
try {
|
|
const res = await http(RequestHttpEnum.GET)(`${ModuleTypeEnum.PROJECT}/list`, data);
|
|
return res;
|
|
} catch {
|
|
httpErrorHandle();
|
|
}
|
|
}
|
|
|
|
// * 新增项目
|
|
export const createProjectApi = async (data: object) => {
|
|
try {
|
|
const res = await http(RequestHttpEnum.POST)(`${ModuleTypeEnum.PROJECT}/create`, data);
|
|
return res;
|
|
} catch {
|
|
httpErrorHandle();
|
|
}
|
|
} |