diff --git a/admin/src/api/app.ts b/admin/src/api/app.ts index 156b7927..62d2138f 100644 --- a/admin/src/api/app.ts +++ b/admin/src/api/app.ts @@ -10,7 +10,7 @@ export function apiFileCateEdit(params: { id: number; name: string }) { // 文件分类删除 export function apiFileCateDelete(params: { id: number }) { - return request.post('/album/albumDel', params) + return request.post('/album/cateDel', params) } // 文件分类列表 diff --git a/admin/src/components/material-select/hook.ts b/admin/src/components/material-select/hook.ts index 029264c8..c8b98746 100644 --- a/admin/src/components/material-select/hook.ts +++ b/admin/src/components/material-select/hook.ts @@ -16,7 +16,7 @@ export function useCate(typeValue: Ref) { // 分组列表 const cateLists: Ref = ref([]) // 选中的分组id - const cateId = ref('') + const cateId = ref('0') // 添加分组 const handleAddCate = (val: string) => { apiFileCateAdd({ @@ -54,14 +54,14 @@ export function useCate(typeValue: Ref) { const item: any[] = [ { name: '全部', - id: '' + id: '0' }, { name: '未分组', id: 0 } ] - cateLists.value = res?.lists + cateLists.value = res ?? [] cateLists.value.unshift(...item) resolve(cateLists) }) @@ -114,7 +114,7 @@ export function useFile(cateId: Ref, type: Ref, limit: Ref) let ids = select.value.map((item: any) => item.id) apiFileMove({ ids, - cid: moveId.value || 0 + cid: moveId.value }).then(res => { moveId.value = 0 getFileList() diff --git a/admin/src/views/setting/system/cache.vue b/admin/src/views/setting/system/cache.vue index b96250c6..661472df 100644 --- a/admin/src/views/setting/system/cache.vue +++ b/admin/src/views/setting/system/cache.vue @@ -200,7 +200,10 @@ const getSystemCache = async () => { statisticalData.commandChartOption.series[0].data = res.commandStats statisticalData.memoryChartOption.series[0].data = res.info.used_memory_human - console.log(res.info.used_memory_human, '-------------------------') + console.log( + statisticalData.memoryChartOption.series[0].data, + '-------------------------+' + ) }) .catch((err: any) => { console.log('err', err)