feat: add orders
This commit is contained in:
16
frontend/admin/src/api/orderService.js
Normal file
16
frontend/admin/src/api/orderService.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import httpClient from './httpClient';
|
||||
|
||||
export const orderService = {
|
||||
getOrders({ page = 1, limit = 10, keyword = '' } = {}) {
|
||||
return httpClient.get('/admin/orders', {
|
||||
params: {
|
||||
page,
|
||||
limit,
|
||||
keyword: keyword.trim()
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteOrder(id) {
|
||||
return httpClient.delete(`/admin/orders/${id}`);
|
||||
}
|
||||
}
|
||||
24
frontend/admin/src/api/order_list.json
Normal file
24
frontend/admin/src/api/order_list.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"page": 1,
|
||||
"limit": 10,
|
||||
"total": 1,
|
||||
"items": [
|
||||
{
|
||||
"id": 1,
|
||||
"created_at": "2025-04-10T21:30:27.585874Z",
|
||||
"updated_at": "2025-04-10T21:30:27.585877Z",
|
||||
"order_no": "20250410213027",
|
||||
"sub_order_no": "20250410213027",
|
||||
"transaction_id": "",
|
||||
"refund_transaction_id": "",
|
||||
"price": 325,
|
||||
"discount": 58,
|
||||
"currency": "",
|
||||
"payment_method": "",
|
||||
"post_id": 1,
|
||||
"user_id": 1,
|
||||
"status": 0,
|
||||
"meta": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user