feat: update page list show

This commit is contained in:
yanghao05
2025-04-08 15:35:58 +08:00
parent 7d28dff65b
commit cf8bb5f192
13 changed files with 280 additions and 102 deletions

View File

@@ -0,0 +1,52 @@
{
"page": 0,
"limit": 0,
"total": 5,
"items": [
{
"id": 5,
"name": "test 05",
"upload_time": "2025-04-07 16:44:26",
"file_size": 100,
"media_type": "application/zip",
"file_type": "archive",
"thumbnail_url": ""
},
{
"id": 4,
"name": "test 04",
"upload_time": "2025-04-07 16:44:26",
"file_size": 100,
"media_type": "image/jpeg",
"file_type": "image",
"thumbnail_url": ""
},
{
"id": 3,
"name": "test 03",
"upload_time": "2025-04-07 16:44:26",
"file_size": 100,
"media_type": "application/pdf",
"file_type": "pdf",
"thumbnail_url": ""
},
{
"id": 2,
"name": "test 02",
"upload_time": "2025-04-07 16:44:26",
"file_size": 100,
"media_type": "audio/mp3",
"file_type": "unknown",
"thumbnail_url": ""
},
{
"id": 1,
"name": "test 01",
"upload_time": "2025-04-07 16:44:26",
"file_size": 100,
"media_type": "video/mp4",
"file_type": "video",
"thumbnail_url": ""
}
]
}

View File

@@ -2,7 +2,7 @@ import axios from 'axios';
// Create axios instance with default config
const httpClient = axios.create({
baseURL: '/api',
baseURL: '/v1',
timeout: 10000,
headers: {
'Content-Type': 'application/json',

View File

@@ -0,0 +1,9 @@
import httpClient from './httpClient';
export const mediaService = {
getMedias({ page = 1, limit = 10 } = {}) {
return httpClient.get('/admin/medias', {
params: { page, limit }
});
},
};