|
@@ -5,22 +5,26 @@ interface ProductState {
|
|
|
productName: 'DROS' | 'VETDROS';
|
|
|
language: string;
|
|
|
source: 'Electron' | 'Browser' | 'Android';
|
|
|
+ guest: string;
|
|
|
}
|
|
|
|
|
|
const initialState: ProductState = {
|
|
|
productName: 'DROS',
|
|
|
language: 'en',
|
|
|
source: 'Browser',
|
|
|
+ guest: '',
|
|
|
};
|
|
|
|
|
|
export const initializeProductState = createAsyncThunk(
|
|
|
'product/initializeProductState',
|
|
|
async () => {
|
|
|
const softwareInfo = await fetchSoftwareInfo();
|
|
|
+ console.log(`加载软件系统信息:${JSON.stringify(softwareInfo)}`);
|
|
|
return {
|
|
|
productName: softwareInfo.product as 'DROS' | 'VETDROS',
|
|
|
language: softwareInfo.language[0],
|
|
|
source: 'Browser' as const,
|
|
|
+ guest: softwareInfo.guest,
|
|
|
};
|
|
|
}
|
|
|
);
|