2 changed files with 25 additions and 54 deletions
@ -1,60 +1,30 @@ |
|||||
import request from '@/utils/request' |
import request from '@/config/axios' |
||||
|
|
||||
// 查询参数列表
|
// 查询参数列表
|
||||
export function listConfig(query) { |
export const listConfig = (params) => { |
||||
return request({ |
return request.get({ url: '/system/config/list', params }) |
||||
url: '/system/config/list', |
|
||||
method: 'get', |
|
||||
params: query |
|
||||
}) |
|
||||
} |
} |
||||
|
|
||||
// 查询参数详细
|
// 查询参数详细
|
||||
export function getConfig(configId) { |
export const getConfig = (configId) => { |
||||
return request({ |
return request.get({ url: '/system/config/'+ configId }) |
||||
url: '/system/config/' + configId, |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
} |
||||
|
export const getConfigKey = (configKey) => { |
||||
// 根据参数键名查询参数值
|
return request.get({ url: '/system/config/configKey/' + configKey}) |
||||
export function getConfigKey(configKey) { |
|
||||
return request({ |
|
||||
url: '/system/config/configKey/' + configKey, |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
} |
||||
|
|
||||
// 新增参数配置
|
export const addConfig = (data) => { |
||||
export function addConfig(data) { |
return request.post({ url: '/system/config',data }) |
||||
return request({ |
|
||||
url: '/system/config', |
|
||||
method: 'post', |
|
||||
data: data |
|
||||
}) |
|
||||
} |
} |
||||
|
|
||||
// 修改参数配置
|
export const updateConfig = (data) => { |
||||
export function updateConfig(data) { |
return request.put({ url: '/system/config',data }) |
||||
return request({ |
|
||||
url: '/system/config', |
|
||||
method: 'put', |
|
||||
data: data |
|
||||
}) |
|
||||
} |
} |
||||
|
|
||||
// 删除参数配置
|
export const delConfig = (configId) => { |
||||
export function delConfig(configId) { |
return request.delete({ url:'/system/config/' + configId }) |
||||
return request({ |
|
||||
url: '/system/config/' + configId, |
|
||||
method: 'delete' |
|
||||
}) |
|
||||
} |
} |
||||
|
|
||||
// 刷新参数缓存
|
export const refreshCache = () => { |
||||
export function refreshCache() { |
return request.delete({ url:'/system/config/refreshCache'}) |
||||
return request({ |
|
||||
url: '/system/config/refreshCache', |
|
||||
method: 'delete' |
|
||||
}) |
|
||||
} |
} |
Loading…
Reference in new issue