diff --git a/src/api/modules/role.ts b/src/api/modules/role.ts index 74037bb..209e95e 100644 --- a/src/api/modules/role.ts +++ b/src/api/modules/role.ts @@ -3,6 +3,7 @@ */ import { BaseService } from '../BaseService' +import request from '@/utils/http' import type { PlatformRole, RoleQueryParams, @@ -93,12 +94,16 @@ export class RoleService extends BaseService { } /** - * 移除角色的单个权限 - * DELETE /api/admin/roles/{role_id}/permissions/{perm_id} + * 移除角色的权限(支持批量) + * DELETE /api/admin/roles/{role_id}/permissions * @param roleId 角色ID - * @param permId 权限ID + * @param permIds 权限ID列表 */ - static removePermission(roleId: number, permId: number): Promise { - return this.delete(`/api/admin/roles/${roleId}/permissions/${permId}`) + static removePermissions(roleId: number, permIds: number[]): Promise { + // 直接使用 request.del,传递 data 到 Body + return request.del({ + url: `/api/admin/roles/${roleId}/permissions`, + data: { perm_ids: permIds } + }) } } diff --git a/src/api/modules/shop.ts b/src/api/modules/shop.ts index 5a58f67..0a01ea7 100644 --- a/src/api/modules/shop.ts +++ b/src/api/modules/shop.ts @@ -24,6 +24,34 @@ export class ShopService extends BaseService { return this.getPage('/api/admin/shops', params) } + /** + * 店铺级联查询(树结构) + * GET /api/admin/shops/cascade + * @param params 查询参数 + */ + static getShopsCascade(params?: { + shop_name?: string + parent_id?: number + }): Promise< + BaseResponse< + Array<{ + id: number + shop_name: string + has_children: boolean + }> + > + > { + return this.get< + BaseResponse< + Array<{ + id: number + shop_name: string + has_children: boolean + }> + > + >('/api/admin/shops/cascade', params) + } + /** * 创建店铺 * POST /api/admin/shops diff --git a/src/components/core/layouts/art-header-bar/index.vue b/src/components/core/layouts/art-header-bar/index.vue index 2d2600c..a413676 100644 --- a/src/components/core/layouts/art-header-bar/index.vue +++ b/src/components/core/layouts/art-header-bar/index.vue @@ -79,26 +79,26 @@ -
- -
- -
- -
-
+ + + + + + + + + + + + + + + + + + + +
@@ -162,7 +162,7 @@ {{ $t('topBar.user.lockScreen') }} -
+
{{ $t('topBar.user.logout') }}
@@ -180,7 +180,7 @@