diff --git a/src/api/system/sysconfig/index.ts b/src/api/system/sysconfig/index.ts index 148748e..529a7c1 100644 --- a/src/api/system/sysconfig/index.ts +++ b/src/api/system/sysconfig/index.ts @@ -1,60 +1,30 @@ -import request from '@/utils/request' +import request from '@/config/axios' // 查询参数列表 -export function listConfig(query) { - return request({ - url: '/system/config/list', - method: 'get', - params: query - }) +export const listConfig = (params) => { + return request.get({ url: '/system/config/list', params }) } // 查询参数详细 -export function getConfig(configId) { - return request({ - url: '/system/config/' + configId, - method: 'get' - }) +export const getConfig = (configId) => { + return request.get({ url: '/system/config/'+ configId }) } - -// 根据参数键名查询参数值 -export function getConfigKey(configKey) { - return request({ - url: '/system/config/configKey/' + configKey, - method: 'get' - }) +export const getConfigKey = (configKey) => { + return request.get({ url: '/system/config/configKey/' + configKey}) } -// 新增参数配置 -export function addConfig(data) { - return request({ - url: '/system/config', - method: 'post', - data: data - }) +export const addConfig = (data) => { + return request.post({ url: '/system/config',data }) } -// 修改参数配置 -export function updateConfig(data) { - return request({ - url: '/system/config', - method: 'put', - data: data - }) +export const updateConfig = (data) => { + return request.put({ url: '/system/config',data }) } -// 删除参数配置 -export function delConfig(configId) { - return request({ - url: '/system/config/' + configId, - method: 'delete' - }) +export const delConfig = (configId) => { + return request.delete({ url:'/system/config/' + configId }) } -// 刷新参数缓存 -export function refreshCache() { - return request({ - url: '/system/config/refreshCache', - method: 'delete' - }) -} \ No newline at end of file +export const refreshCache = () => { + return request.delete({ url:'/system/config/refreshCache'}) +} diff --git a/src/views/system/sysconfig/index.vue b/src/views/system/sysconfig/index.vue index 8229e58..1a247ee 100644 --- a/src/views/system/sysconfig/index.vue +++ b/src/views/system/sysconfig/index.vue @@ -37,7 +37,7 @@ range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" - > + /> 搜索 @@ -81,7 +81,7 @@ @click="handleRefreshCache" >刷新缓存 - + @@ -130,7 +130,7 @@ - + @@ -154,10 +154,11 @@