处理咨询大屏图片地址问题

This commit is contained in:
2025-11-05 17:46:46 +08:00
parent 9407ba979c
commit cb8f23e9ab
@@ -45,9 +45,11 @@
import { Image as AImage } from 'ant-design-vue'; import { Image as AImage } from 'ant-design-vue';
import { getDocList } from '/@/views/healthConsultation/api/health'; import { getDocList } from '/@/views/healthConsultation/api/health';
import { getAppEnvConfig } from '/@/utils/env.ts';
const { VITE_GLOB_API_URL } = getAppEnvConfig();
function getFileUrl(path?: string) { function getFileUrl(path?: string) {
const GATEWAY_URL = import.meta.env.VITE_GLOB_API_URL; const GATEWAY_URL = VITE_GLOB_API_URL;
if (!path) return '/@/assets/health/default.png'; // 使用默认图片 if (!path) return '/@/assets/health/default.png'; // 使用默认图片
return `${GATEWAY_URL}/file/show/${path}`; return `${GATEWAY_URL}/file/show/${path}`;
} }