feat: 修复部分功能(健康信息、VIP、医生端健康信息导入)
This commit is contained in:
19
request/api/medicalRecord.js
Normal file
19
request/api/medicalRecord.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { post, get } from './http'
|
||||
|
||||
/**
|
||||
* 我的病历列表(xk-api POST /medical-record/list)
|
||||
* 取值:unwrapXkApi → code/result/message
|
||||
* @param {{ user_patient_id: number, page?: number, pageSize?: number }} params
|
||||
*/
|
||||
export async function getMedicalRecordListApi(params) {
|
||||
return await post('/medical-record/list', params, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的病历详情(xk-api GET /medical-record/detail)
|
||||
* 取值:unwrapXkApi → code/result/message
|
||||
* @param {{ id: number }} params
|
||||
*/
|
||||
export async function getMedicalRecordDetailApi(params) {
|
||||
return await get('/medical-record/detail', params, 3)
|
||||
}
|
||||
41
request/api/patient.js
Normal file
41
request/api/patient.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import { post, get } from './http'
|
||||
|
||||
/**
|
||||
* 就诊人相关接口统一走 xk-api(type=3)
|
||||
* 取值:unwrapXkApi → code / result / message
|
||||
*/
|
||||
|
||||
/** 就诊人列表 POST /patient/list → { list, latest_register_user_patient_id } */
|
||||
export async function getPatientListApi(params = {}) {
|
||||
return await post('/patient/list', params, 3)
|
||||
}
|
||||
|
||||
/** 就诊人保存(新增/编辑)POST /patient/save */
|
||||
export async function savePatientApi(params = {}) {
|
||||
return await post('/patient/save', params, 3)
|
||||
}
|
||||
|
||||
/** 删除就诊人 POST /patient/delete */
|
||||
export async function deletePatientApi(params = {}) {
|
||||
return await post('/patient/delete', params, 3)
|
||||
}
|
||||
|
||||
/** 监护人信息 GET /patient/guardian-info */
|
||||
export async function getPatientGuardianInfoApi(params = {}) {
|
||||
return await get('/patient/guardian-info', params, 3)
|
||||
}
|
||||
|
||||
/** 关系枚举 GET /patient/relation */
|
||||
export async function getPatientRelationApi(params = {}) {
|
||||
return await get('/patient/relation', params, 3)
|
||||
}
|
||||
|
||||
/** 设为默认就诊人 POST /patient/change-default,传 up_id */
|
||||
export async function changePatientDefaultApi(params = {}) {
|
||||
return await post('/patient/change-default', params, 3)
|
||||
}
|
||||
|
||||
/** 健康问诊详情 POST /patient/health-info,传 user_patient_id */
|
||||
export async function getPatientHealthInfoApi(params = {}) {
|
||||
return await post('/patient/health-info', params, 3)
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import {post} from './http'
|
||||
import { unwrapXkApi } from '@/utils/api-response.js'
|
||||
|
||||
/**
|
||||
* 获取挂号记录列表
|
||||
@@ -21,9 +22,11 @@ export async function fetchUnpaidRegisterListApi(params = {}) {
|
||||
page: 1,
|
||||
...params,
|
||||
}, 3);
|
||||
if (res.data?.code !== 0 && res.data?.code !== '0') {
|
||||
// /register/list → xk-api
|
||||
const { ok, payload } = unwrapXkApi(res)
|
||||
if (!ok) {
|
||||
return [];
|
||||
}
|
||||
const list = res.data?.result?.list || [];
|
||||
const list = (payload && payload.list) || [];
|
||||
return list.filter((item) => item.status === 0 && item.is_cancel !== 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user