From 8e4ab7acddbdb84fd755acf7e75cf471f50cba60 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期四, 31 十月 2024 10:16:47 +0800 Subject: [PATCH] 优化部分页面及配置 --- src/api/system/dict/dict.data.ts | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/api/system/dict/dict.data.ts b/src/api/system/dict/dict.data.ts index 41f62ab..d0cfd8f 100644 --- a/src/api/system/dict/dict.data.ts +++ b/src/api/system/dict/dict.data.ts @@ -1,4 +1,6 @@ import request from '@/config/axios' +import {config} from "@/config/axios/config"; +const { plat_url } = config export type DictDataVO = { id: number | undefined @@ -15,32 +17,32 @@ // 查询字典数据(精简)列表 export const getSimpleDictDataList = () => { - return request.get({ url: 'http://172.16.8.100:48080/admin-api/system/dict-data/simple-list' }) + return request.get({ url: plat_url + '/system/dict-data/simple-list' }) } // 查询字典数据列表 export const getDictDataPage = (params: PageParam) => { - return request.get({ url: 'http://172.16.8.100:48080/admin-api/system/dict-data/page', params }) + return request.get({ url: plat_url + '/system/dict-data/page', params }) } // 查询字典数据详情 export const getDictData = (id: number) => { - return request.get({ url: 'http://172.16.8.100:48080/admin-api/system/dict-data/get?id=' + id }) + return request.get({ url: plat_url + '/system/dict-data/get?id=' + id }) } // 新增字典数据 export const createDictData = (data: DictDataVO) => { - return request.post({ url: 'http://172.16.8.100:48080/admin-api/system/dict-data/create', data }) + return request.post({ url: plat_url + '/system/dict-data/create', data }) } // 修改字典数据 export const updateDictData = (data: DictDataVO) => { - return request.put({ url: 'http://172.16.8.100:48080/admin-api/system/dict-data/update', data }) + return request.put({ url: plat_url + '/system/dict-data/update', data }) } // 删除字典数据 export const deleteDictData = (id: number) => { - return request.delete({ url: 'http://172.16.8.100:48080/admin-api/system/dict-data/delete?id=' + id }) + return request.delete({ url: plat_url + '/system/dict-data/delete?id=' + id }) } // 导出字典类型数据 -- Gitblit v1.9.3