feat: add orders

This commit is contained in:
yanghao05
2025-04-10 21:42:13 +08:00
parent 5a63eee1ce
commit 8baab46132
20 changed files with 979 additions and 1 deletions

View 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}`);
}
}

View 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": {}
}
]
}