优化预约作品选择和日期时间选择
This commit is contained in:
@@ -1,9 +1,25 @@
|
||||
import { adminApi } from '@/api/client'
|
||||
import type { PageResult } from '@/types/common'
|
||||
import type { IdType, PageResult } from '@/types/common'
|
||||
import type { Product } from '@/types/manager'
|
||||
|
||||
export interface ProductCreateRequest {
|
||||
title: string
|
||||
description?: string
|
||||
targetAudience?: string
|
||||
precautions?: string
|
||||
imageFileIds?: string
|
||||
price: number
|
||||
tags?: string
|
||||
approximateDuration?: string
|
||||
bookableArtists?: string
|
||||
frontVisible: number
|
||||
}
|
||||
|
||||
export const managerProductsApi = {
|
||||
list(params: { page: number; size: number; keyword?: string }): Promise<PageResult<Product> | Product[]> {
|
||||
return adminApi.get('/manager/products', { params })
|
||||
},
|
||||
create(data: ProductCreateRequest): Promise<IdType> {
|
||||
return adminApi.post('/product/create', data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { adminApi } from '@/api/client'
|
||||
import type { IdType } from '@/types/common'
|
||||
|
||||
export interface ManagerTag {
|
||||
id: IdType
|
||||
tagName: string
|
||||
displayName?: string
|
||||
textColor?: string
|
||||
bgColor?: string
|
||||
borderColor?: string
|
||||
}
|
||||
|
||||
export const managerTagsApi = {
|
||||
listAll(): Promise<ManagerTag[]> {
|
||||
return adminApi.get('/tag/list/all')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user