9 changed files with 34 additions and 62 deletions
@ -1,43 +0,0 @@ |
|||||
/** |
|
||||
* 自动生成 API |
|
||||
* 负责调用后端接口 |
|
||||
*/ |
|
||||
|
|
||||
import { requestClient } from '#/api/request'; |
|
||||
import { useAppConfig } from '@vben/hooks'; |
|
||||
|
|
||||
export namespace userApi { |
|
||||
|
|
||||
const applicationConfig = useAppConfig(import.meta.env, import.meta.env.PROD); |
|
||||
|
|
||||
console.log('=== 接口域名 ===', applicationConfig.javaURL + '/health-user/page') |
|
||||
/** |
|
||||
* 分页查询 |
|
||||
*/ |
|
||||
export function page(params: any) { |
|
||||
return requestClient.post(applicationConfig.javaURL + '/health-user/page', params , |
|
||||
{ headers: {'Content-Type': 'application/json', Token: 'ded93460-0cf5-45db-81ae-7608dbd3f51e', version: '1.0.1'} }); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 获取详情 |
|
||||
*/ |
|
||||
export function get(id: number) { |
|
||||
return requestClient.get(applicationConfig.javaURL + '/health_user/' + id); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增 / 修改 |
|
||||
*/ |
|
||||
export function save(data: any) { |
|
||||
return requestClient.post(applicationConfig.javaURL + '/health_user', data); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除 |
|
||||
*/ |
|
||||
export function remove(id: number) { |
|
||||
return requestClient.delete(applicationConfig.javaURL + '/health_user/' + id); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
Loading…
Reference in new issue