This commit is contained in:
@@ -9,9 +9,11 @@
|
||||
**API端点**: `GET /api/admin/shops/{shop_id}/roles`
|
||||
|
||||
**路径参数**:
|
||||
|
||||
- `shop_id` (integer, required): 店铺ID
|
||||
|
||||
**响应数据**:
|
||||
|
||||
```typescript
|
||||
{
|
||||
shop_id: number // 店铺ID
|
||||
@@ -54,9 +56,11 @@ interface ShopRole {
|
||||
**API端点**: `POST /api/admin/shops/{shop_id}/roles`
|
||||
|
||||
**路径参数**:
|
||||
|
||||
- `shop_id` (integer, required): 店铺ID
|
||||
|
||||
**请求体**:
|
||||
|
||||
```typescript
|
||||
{
|
||||
role_ids: number[] | null // 角色ID列表
|
||||
@@ -106,6 +110,7 @@ interface ShopRole {
|
||||
**API端点**: `DELETE /api/admin/shops/{shop_id}/roles/{role_id}`
|
||||
|
||||
**路径参数**:
|
||||
|
||||
- `shop_id` (integer, required): 店铺ID
|
||||
- `role_id` (integer, required): 角色ID
|
||||
|
||||
|
||||
@@ -36,11 +36,13 @@
|
||||
### 完成的功能
|
||||
|
||||
1. **类型定义** - 已在 `src/types/api/shop.ts` 添加了三个接口:
|
||||
|
||||
- `ShopRoleResponse`: 店铺角色响应实体
|
||||
- `ShopRolesResponse`: 店铺角色列表响应
|
||||
- `AssignShopRolesRequest`: 分配角色请求
|
||||
|
||||
2. **API 服务层** - 已在 `src/api/modules/shop.ts` 的 `ShopService` 类中添加:
|
||||
|
||||
- `getShopRoles(shopId)`: 获取店铺默认角色列表
|
||||
- `assignShopRoles(shopId, data)`: 分配店铺默认角色
|
||||
- `deleteShopRole(shopId, roleId)`: 删除店铺默认角色
|
||||
@@ -56,6 +58,7 @@
|
||||
### 待测试项
|
||||
|
||||
所有开发任务已完成,现在需要进行功能测试以确保:
|
||||
|
||||
- API 调用正常工作
|
||||
- UI 交互符合预期
|
||||
- 边界情况处理正确
|
||||
|
||||
Reference in New Issue
Block a user