feat:更新运动健康模块
This commit is contained in:
16
src/apis/health.ts
Normal file
16
src/apis/health.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { cloudService } from './index'
|
||||
import { IHealth, IHealthQuery } from '@/types/health'
|
||||
|
||||
export const updateHealthApi = (id: number, health: IHealth): Promise<boolean> =>
|
||||
cloudService({
|
||||
url: `/home-api/health/${id}`,
|
||||
method: 'put',
|
||||
data: health
|
||||
})
|
||||
|
||||
export const queryHealthApi = (query: IHealthQuery): Promise<IHealth[]> =>
|
||||
cloudService({
|
||||
url: '/home-api/health',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
Reference in New Issue
Block a user