feat:移植工程
This commit is contained in:
36
src/apis/anniversary.ts
Normal file
36
src/apis/anniversary.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { cloudService } from './index'
|
||||
import { IAnniversary } from '@/types/anniversary'
|
||||
import { IStatsChart } from 'vue3-common/types'
|
||||
|
||||
export const addAnniversaryApi = (anniversary: IAnniversary): Promise<boolean> =>
|
||||
cloudService({
|
||||
url: '/home-service/anniversary',
|
||||
method: 'post',
|
||||
data: anniversary
|
||||
})
|
||||
|
||||
export const updateAnniversaryApi = (id: number, anniversary: IAnniversary): Promise<boolean> =>
|
||||
cloudService({
|
||||
url: `/home-service/anniversary/${id}`,
|
||||
method: 'put',
|
||||
data: anniversary
|
||||
})
|
||||
|
||||
export const deleteAnniversaryApi = (id: number): Promise<boolean> =>
|
||||
cloudService({
|
||||
url: `/home-service/anniversary/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
|
||||
export const queryAnniversaryApi = (category: string): Promise<IAnniversary[]> =>
|
||||
cloudService({
|
||||
url: '/home-service/anniversary',
|
||||
method: 'get',
|
||||
params: { category }
|
||||
})
|
||||
|
||||
export const queryAnniversaryCategoryApi = (): Promise<IStatsChart[]> =>
|
||||
cloudService({
|
||||
url: '/home-service/anniversary/category',
|
||||
method: 'get'
|
||||
})
|
||||
Reference in New Issue
Block a user