export default defineEventHandler(async (event) => { const baseUrl = import.meta.env.VITE_APP_BASE_URL // console.log('Base URL from env: ', baseUrl) if (event.method === 'GET') { const response = await fetch(baseUrl + '/country/baseCountry/getCountryCode') return response.ok ? response.json() : { msg: '获取国家信息错误' } } const response = await fetch(baseUrl + '/education/happyEntry/addHappyEntry', { method: 'post', headers: { 'Content-Type': 'application/json', project: '123' }, body: await readBody(event) }) return response.ok ? response.json() : { msg: '添加表单错误' } })