转诊方功能
This commit is contained in:
@@ -153,7 +153,8 @@ function request(url, params, method = 0) {
|
||||
if (url.split('/').indexOf('xkApi') !== -1) {
|
||||
baseURL = envUrls.xkApi;
|
||||
// 如果是guest模式且是xkApi请求,添加/guest/前缀(但避免重复添加)
|
||||
if (isGuestRequest && url.indexOf('/guest/') === -1) {
|
||||
// 转诊相关接口需要登录,不转换为guest路由
|
||||
if (isGuestRequest && url.indexOf('/guest/') === -1 && url.indexOf('/transfer-prescription') === -1) {
|
||||
url = url.replace('/xkApi', '/guest/xkApi');
|
||||
}
|
||||
}
|
||||
|
||||
36
request/api/transferPrescription.js
Normal file
36
request/api/transferPrescription.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import {post, get} from './http'
|
||||
|
||||
/**
|
||||
* 获取转诊消息列表
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getTransferPrescriptionListApi() {
|
||||
return await post('/transfer-prescription/list', {}, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转诊详情
|
||||
* @param params { id: number }
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getTransferPrescriptionDetailApi(params) {
|
||||
return await get('/transfer-prescription/detail', params, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 同意转诊
|
||||
* @param params { id: number }
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function agreeTransferPrescriptionApi(params) {
|
||||
return await post('/transfer-prescription/agree', params, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 拒绝转诊
|
||||
* @param params { id: number, reason?: string }
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function rejectTransferPrescriptionApi(params) {
|
||||
return await post('/transfer-prescription/reject', params, 3)
|
||||
}
|
||||
Reference in New Issue
Block a user