feat:重构模块
This commit is contained in:
@@ -4,33 +4,33 @@ import { IStatsChart } from 'vue3-common/types'
|
||||
|
||||
export const addAnniversaryApi = (anniversary: IAnniversary): Promise<boolean> =>
|
||||
cloudService({
|
||||
url: '/home-service/anniversary',
|
||||
url: '/home-api/anniversary',
|
||||
method: 'post',
|
||||
data: anniversary
|
||||
})
|
||||
|
||||
export const updateAnniversaryApi = (id: number, anniversary: IAnniversary): Promise<boolean> =>
|
||||
cloudService({
|
||||
url: `/home-service/anniversary/${id}`,
|
||||
url: `/home-api/anniversary/${id}`,
|
||||
method: 'put',
|
||||
data: anniversary
|
||||
})
|
||||
|
||||
export const deleteAnniversaryApi = (id: number): Promise<boolean> =>
|
||||
cloudService({
|
||||
url: `/home-service/anniversary/${id}`,
|
||||
url: `/home-api/anniversary/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
|
||||
export const queryAnniversaryApi = (category: string): Promise<IAnniversary[]> =>
|
||||
cloudService({
|
||||
url: '/home-service/anniversary',
|
||||
url: '/home-api/anniversary',
|
||||
method: 'get',
|
||||
params: { category }
|
||||
})
|
||||
|
||||
export const queryAnniversaryCategoryApi = (): Promise<IStatsChart[]> =>
|
||||
cloudService({
|
||||
url: '/home-service/anniversary/category',
|
||||
url: '/home-api/anniversary/category',
|
||||
method: 'get'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user