feat(website): 优化新闻轮播功能并更新导航链接
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
POST /products
|
||||
```
|
||||
|
||||
**请求参数**:
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|--------------|--------|------|--------------------|
|
||||
| name | string | 是 | 商品名称 |
|
||||
@@ -40,11 +41,29 @@ POST /products
|
||||
| stock | number | 是 | 库存数量 |
|
||||
| category | string | 是 | 商品分类 |
|
||||
|
||||
**响应示例**:
|
||||
```json
|
||||
{
|
||||
"status": "success",
|
||||
"data": {
|
||||
"product_id": "prod_001",
|
||||
"name": "优质牛肉",
|
||||
"price": 98.5,
|
||||
"stock": 100,
|
||||
"category": "生鲜",
|
||||
"seller_id": "seller_001",
|
||||
"created_at": "2024-01-20T10:00:00Z",
|
||||
"status": "上架中"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2.2 创建订单
|
||||
```
|
||||
POST /orders
|
||||
```
|
||||
|
||||
**请求参数**:
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|--------------|--------|------|--------------------|
|
||||
| product_id | number | 是 | 商品ID |
|
||||
@@ -53,11 +72,65 @@ POST /orders
|
||||
| payment_method | string | 是 | 支付方式(微信/支付宝)|
|
||||
| coupon_code | string | 否 | 优惠券码 |
|
||||
|
||||
**响应示例**:
|
||||
```json
|
||||
{
|
||||
"status": "success",
|
||||
"data": {
|
||||
"order_id": "order_001",
|
||||
"product_id": "prod_001",
|
||||
"quantity": 2,
|
||||
"total_amount": 197.0,
|
||||
"discount_amount": 0.0,
|
||||
"final_amount": 197.0,
|
||||
"payment_method": "微信支付",
|
||||
"order_status": "待支付",
|
||||
"created_at": "2024-01-20T10:00:00Z",
|
||||
"payment_expiry": "2024-01-20T10:30:00Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2.3 物流跟踪
|
||||
```
|
||||
GET /logistics/:order_id
|
||||
```
|
||||
|
||||
**请求参数**:
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
|-------------|--------|------|--------------------|
|
||||
| order_id | string | 是 | 订单ID |
|
||||
|
||||
**响应示例**:
|
||||
```json
|
||||
{
|
||||
"status": "success",
|
||||
"data": {
|
||||
"order_id": "order_001",
|
||||
"logistics": [
|
||||
{
|
||||
"tracking_number": "SF1234567890",
|
||||
"status": "已发货",
|
||||
"current_location": "北京市朝阳区",
|
||||
"estimated_delivery": "2024-01-22T10:00:00Z",
|
||||
"history": [
|
||||
{
|
||||
"time": "2024-01-20T10:00:00Z",
|
||||
"status": "商家已接单",
|
||||
"location": "北京市朝阳区"
|
||||
},
|
||||
{
|
||||
"time": "2024-01-20T12:00:00Z",
|
||||
"status": "已发货",
|
||||
"location": "北京市朝阳区"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 3. 状态流转
|
||||
```mermaid
|
||||
stateDiagram
|
||||
|
||||
Reference in New Issue
Block a user