新增管理师移动端前端模块
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { adminApi } from '@/api/client'
|
||||
import type { IdType, UserInfo } from '@/types/common'
|
||||
import type { CustomerCreateRequest, CustomerPage } from '@/types/manager'
|
||||
|
||||
export interface CustomerListParams {
|
||||
page: number
|
||||
size: number
|
||||
keyword?: string
|
||||
hasOrder?: boolean
|
||||
}
|
||||
|
||||
export const managerCustomersApi = {
|
||||
list(params: CustomerListParams): Promise<CustomerPage> {
|
||||
return adminApi.get('/manager/customers', { params })
|
||||
},
|
||||
detail(id: IdType): Promise<UserInfo> {
|
||||
return adminApi.get(`/manager/customers/${id}`)
|
||||
},
|
||||
create(data: CustomerCreateRequest): Promise<IdType> {
|
||||
return adminApi.post('/manager/customers', data)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user