后台管理页面权限管理优化,权限管理细化
This commit is contained in:
@@ -146,7 +146,7 @@ export const adminDashboardApi = {
|
||||
}
|
||||
|
||||
export const adminProductApi = {
|
||||
listProducts: (params: { page: number; size: number; keyword?: string }) => {
|
||||
listProducts: (params: { page: number; size: number; keyword?: string; shopId?: number }) => {
|
||||
return adminApi.get<ProductListResponse>('/admin/product/list', { params })
|
||||
},
|
||||
createProduct: (data: CreateProductRequest) => {
|
||||
@@ -188,7 +188,7 @@ export interface CreateShopRequest {
|
||||
}
|
||||
|
||||
export const adminShopApi = {
|
||||
listShops: (params: { page: number; size: number; keyword?: string }) => {
|
||||
listShops: (params: { page: number; size: number; keyword?: string; shopId?: number }) => {
|
||||
return adminApi.get<ShopListResponse>('/admin/shops/list', { params })
|
||||
},
|
||||
createShop: (data: CreateShopRequest) => {
|
||||
|
||||
@@ -29,7 +29,7 @@ export const permissionApi = {
|
||||
if (userId) {
|
||||
return api.get<PermissionVO[]>(`/admin/permission/user/${userId}`)
|
||||
}
|
||||
return api.get<PermissionVO[]>('/permission/list/user/current')
|
||||
return api.get<PermissionVO[]>('/admin/permission/user/current')
|
||||
},
|
||||
|
||||
listAllPermissions: () => {
|
||||
|
||||
@@ -28,6 +28,7 @@ export interface ListUsersParams {
|
||||
page: number
|
||||
size: number
|
||||
keyword?: string
|
||||
shopId?: number
|
||||
}
|
||||
|
||||
export interface CreateUserRequest {
|
||||
|
||||
Reference in New Issue
Block a user