chore(config): 添加项目配置文件和隐私协议
- 添加 .editorconfig 文件统一代码风格 - 添加 .env.development 和 .env.example 环境配置文件 - 添加 .eslintignore 和 .eslintrc.js 代码检查配置 - 添加 .gitignore 版本控制忽略文件配置 - 添加 .prettierignore 格式化忽略配置 - 添加隐私协议HTML文件 - 添加API密钥管理组件基础结构
This commit is contained in:
107
src/api/clinic/clinicDoctorApply/index.ts
Normal file
107
src/api/clinic/clinicDoctorApply/index.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicDoctorApply, ClinicDoctorApplyParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询医生入驻申请
|
||||
*/
|
||||
export async function pageClinicDoctorApply(params: ClinicDoctorApplyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicDoctorApply>>>(
|
||||
'/clinic/clinic-doctor-apply/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询医生入驻申请列表
|
||||
*/
|
||||
export async function listClinicDoctorApply(params?: ClinicDoctorApplyParam) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorApply[]>>(
|
||||
'/clinic/clinic-doctor-apply',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加医生入驻申请
|
||||
*/
|
||||
export async function addClinicDoctorApply(data: ClinicDoctorApply) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改医生入驻申请
|
||||
*/
|
||||
export async function updateClinicDoctorApply(data: ClinicDoctorApply) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除医生入驻申请
|
||||
*/
|
||||
export async function removeClinicDoctorApply(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除医生入驻申请
|
||||
*/
|
||||
export async function removeBatchClinicDoctorApply(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询医生入驻申请
|
||||
*/
|
||||
export async function getClinicDoctorApply(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorApply>>(
|
||||
'/clinic/clinic-doctor-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
Reference in New Issue
Block a user