diff --git a/src/api/system/config.ts b/src/api/system/config.ts index 2358eb7c..9b43f22f 100644 --- a/src/api/system/config.ts +++ b/src/api/system/config.ts @@ -23,7 +23,7 @@ export function exportConfig( */ export function listConfig(query: Record) { return request({ - url: '/system/config/list', + url: '/configManage/v1/configs', method: 'get', params: query, }); @@ -36,7 +36,7 @@ export function listConfig(query: Record) { */ export function getConfig(configId: string | number) { return request({ - url: `/system/config/${configId}`, + url: `/configManage/v1/config/${configId}`, method: 'get', }); } @@ -48,7 +48,7 @@ export function getConfig(configId: string | number) { */ export function getConfigKey(configKey: string) { return request({ - url: `/system/config/configKey/${configKey}`, + url: `/configManage/v1/config/${configKey}`, method: 'get', }); } @@ -60,7 +60,7 @@ export function getConfigKey(configKey: string) { */ export function addConfig(data: Record) { return request({ - url: '/system/config', + url: '/configManage/v1/config', method: 'post', data: data, }); @@ -73,7 +73,7 @@ export function addConfig(data: Record) { */ export function updateConfig(data: Record) { return request({ - url: '/system/config', + url: '/configManage/v1/config', method: 'put', data: data, }); @@ -86,7 +86,7 @@ export function updateConfig(data: Record) { */ export function delConfig(configId: string | number) { return request({ - url: `/system/config/${configId}`, + url: `/configManage/v1/config/${configId}`, method: 'delete', }); } @@ -97,7 +97,7 @@ export function delConfig(configId: string | number) { */ export function refreshCache() { return request({ - url: '/system/config/refreshCache', + url: '/configManage/v1/config/refreshCache', method: 'put', }); } diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index 5b72c333..0d3acc8b 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -239,7 +239,7 @@ function fnModalVisibleByVive(configId: string | number) { return; } getConfig(configId).then(res => { - if (res.code === 200 && res.data) { + if (res.code === 1 && res.data) { modalState.from = Object.assign(modalState.from, res.data); modalState.title = '参数配置信息'; modalState.visibleByView = true; @@ -265,7 +265,7 @@ function fnModalVisibleByEdit(configId?: string | number) { getConfig(configId).then(res => { modalState.confirmLoading = false; hide(); - if (res.code === 200 && res.data) { + if (res.code === 1 && res.data) { modalState.from = Object.assign(modalState.from, res.data); modalState.title = '修改参数配置'; modalState.visibleByEdit = true; @@ -291,7 +291,7 @@ function fnModalOk() { message.loading({ content: '请稍等...', key }); config .then(res => { - if (res.code === 200) { + if (res.code === 1) { message.success({ content: `${modalState.title}成功`, key, @@ -342,7 +342,7 @@ function fnRecordDelete(configId: string = '0') { const key = 'delConfig'; message.loading({ content: '请稍等...', key }); delConfig(configId).then(res => { - if (res.code === 200) { + if (res.code === 1) { message.success({ content: `删除成功`, key, @@ -370,7 +370,7 @@ function fnExportList() { const key = 'exportConfig'; message.loading({ content: '请稍等...', key }); exportConfig(toRaw(queryParams)).then(res => { - if (res.code === 200) { + if (res.code === 1) { message.success({ content: `已完成导出`, key, @@ -400,7 +400,7 @@ function fnRefreshCache() { const key = 'refreshCache'; message.loading({ content: '请稍等...', key }); refreshCache().then(res => { - if (res.code === 200) { + if (res.code === 1) { message.success({ content: `刷新缓存成功`, key, @@ -425,7 +425,7 @@ function fnGetList() { queryParams.beginTime = queryRangePicker.value[0]; queryParams.endTime = queryRangePicker.value[1]; listConfig(toRaw(queryParams)).then(res => { - if (res.code === 200 && Array.isArray(res.rows)) { + if (res.code === 1 && Array.isArray(res.rows)) { // 取消勾选 if (tableState.selectedRowKeys.length > 0) { tableState.selectedRowKeys = [];