| 123456789101112131415161718192021222324252627282930313233343536373839 |
- import microRequest from '../../utils/micro_request';
- // 微服务
- const basePath = import.meta.env.VITE_ADMIN
- /**
- * API 层: 声明请求,使用 micro_request,不处理业务状态存储
- */
- // 登录接口
- export function useSystemApi() {
- return {
- // 查询系统参数
- getEntityMapByKeys(query?: object) {
- return microRequest.postRequest(basePath, 'Config', 'GetEntityMapByKeys', query)
- },
- // 根据字典类型获取字典项明细
- getDictDataByType(str: string) {
- return microRequest.postRequest(basePath, 'Dict', 'GetDictDataByType', { dictType: str })
- },
- // 获取通知列表
- getNoticeList(query?: object) {
- return microRequest.postRequest(basePath, 'Notice', 'GetList', query)
- },
- // 获取通知详情
- getNoticeDetail(id: number | string) {
- return microRequest.postRequest(basePath, 'Notice', 'GetEntityById', { id: Number(id) })
- }
- }
- }
|