import { http } from 'msw'; export const handlers = [ // Handler 1: 获取患者类型 http.get('/dr/api/v1/auth/protocol/patient_type', async () => { // 忽略eslint // eslint-disable-next-line return new Response( JSON.stringify({ code: '0x000000', description: 'Success', solution: '', data: { patient_type_list: [ { id: '1', patient_type_id: 'Human', patient_type_name: 'Human', patient_type_local: 'Human', patient_type_description: 'Human', sort: 1, is_enabled: true, product: 'DROC', is_pre_install: true, }, { id: '2', patient_type_id: 'SpecialType', patient_type_name: 'SpecialType', patient_type_local: 'SpecialType', patient_type_description: 'SpecialType', sort: 2, is_enabled: false, product: 'DROC', is_pre_install: true, }, ], }, }), { status: 200, headers: { 'Content-Type': 'application/json' }, // Simulate 500ms delay delay: 500, } ); }), ];