12345678910111213141516171819202122232425262728293031323334353637383940 |
- import axiosInstance from './interceptor';
- export interface SoftwareInfo {
- /** 平板探测器类型 - "Simulator": 模拟设备, "Physics": 物理设备 */
- FPD: string;
- /** 发生器类型 - "Simulator": 模拟设备, "Physics": 物理设备 */
- GEN: string;
- /** 当前系统语言,如 "zh_CN.UTF-8" */
- current_locale: string;
- /** 默认系统语言,如 "zh_CN.UTF-8" */
- default_locale: string;
- language: string[];
- product: string;
- guest: string; //目前只用于急诊访问数据
- sn: string;
- server: Record<
- string,
- {
- build: string;
- desc: string;
- submodule: string[];
- version: string;
- }
- >;
- }
- export interface SoftwareInfoResponse {
- code: string;
- description: string;
- solution: string;
- data: SoftwareInfo;
- }
- export async function fetchSoftwareInfo(): Promise<SoftwareInfo> {
- const response = await axiosInstance.get('/pub/software_info');
- if (response.data && response.data.code === '0x000000') {
- return response.data.data;
- }
- throw new Error('Failed to fetch software info');
- }
|