feat: update page list show
This commit is contained in:
52
frontend/admin/src/api/get_medias.json
Normal file
52
frontend/admin/src/api/get_medias.json
Normal 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": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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',
|
||||
|
||||
9
frontend/admin/src/api/mediaService.js
Normal file
9
frontend/admin/src/api/mediaService.js
Normal 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 }
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user