modify
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m13s

This commit is contained in:
sexygoat
2026-04-02 13:42:57 +08:00
parent 411206e039
commit 8df7024a45
83 changed files with 1830 additions and 1865 deletions

View File

@@ -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

View File

@@ -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 交互符合预期
- 边界情况处理正确