This commit is contained in:
lzcode
2026-10-16 16:05:01 +08:00
parent 24d63e6702
commit 9962136fc8
19 changed files with 1425 additions and 208 deletions
+5 -5
View File
@@ -138,7 +138,7 @@ async function uploadCover(file) {
url: '/admin/upload/image', method: 'post', data: fd,
headers: { 'Content-Type': 'multipart/form-data' },
})
form.cover_url = r.data.url
form.cover_url = r.url
ElMessage.success('封面上传成功')
} catch (e) {
ElMessage.error(e?.message || '上传失败')
@@ -150,8 +150,8 @@ async function uploadCover(file) {
onMounted(async () => {
load()
try {
const r = await request({ url: '/categories', method: 'get' })
categories.value = r.data || []
const r = await request({ url: '/admin/categories', method: 'get' })
categories.value = r || []
} catch (e) {}
})
@@ -162,8 +162,8 @@ async function load() {
url: '/admin/series', method: 'get',
params: { keyword: keyword.value, page: page.value, page_size: pageSize },
})
list.value = r.data.list
total.value = r.data.total
list.value = r.list
total.value = r.total
} catch (e) {} finally {
loading.value = false
}