feat(r3): complete order and payment flow

This commit is contained in:
2026-09-13 13:56:59 +08:00
parent 63c0013076
commit 16e625aefb
20 changed files with 454 additions and 126 deletions
+5 -10
View File
@@ -35,15 +35,10 @@
```json
{
"accessToken": "jwt",
"isNewUser": true,
"nickname": null,
"avatar": null
"accessToken": "jwt"
}
```
`isNewUser=true` 时前端引导补全昵称/头像。
### POST /api/auth/register
公开接口。企业主体可选:换手机号注册,返回 `{ accessToken }`
@@ -56,7 +51,7 @@
更新当前用户资料。请求体:`{ nickname?: string, avatar?: string }`
## 3. 商品与分类(R1实现)
## 3. 商品与分类(R1实现)
### GET /api/categories
@@ -104,7 +99,7 @@
}
```
## 4. 收货地址(R2实现完整 CRUD
## 4. 收货地址(R2实现 CRUD
### GET /api/addresses
@@ -143,7 +138,7 @@
注意:前端 `AddressItem.region: string[]` 与后端 `province/city/district` 的转换
只允许出现在前端 `src/utils/api/address.ts`
## 5. 设计清单(R2实现完整 CRUD
## 5. 设计清单(R2实现 CRUD
### GET /api/design-list
@@ -212,7 +207,7 @@
`ordered``orderId != null` 派生,前端不提交该状态。
## 6. 订单(R3实现)
## 6. 订单(R3实现)
### POST /api/orders