Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dbb48ad90 | ||
|
|
88af4a2d96 | ||
|
|
9e44c6fcaf |
+5
-5
@@ -84,7 +84,7 @@ export class SimApiCore {
|
||||
logout_url: '/auth/logout',
|
||||
login_url: '/auth/login',
|
||||
}
|
||||
webConfig: Map<string, Record<string, object>> = new Map();
|
||||
private webConfig: Map<string, Record<string, object>> = new Map();
|
||||
|
||||
private api: SimApiApiConfig = {
|
||||
endpoints: {default: ''},
|
||||
@@ -225,7 +225,7 @@ export class SimApiCore {
|
||||
};
|
||||
const resp = await this.query<any>('/config', {}, endpointName)
|
||||
if (resp?.data) {
|
||||
const d = resp.data.versions;
|
||||
const d = resp.data.Versions;
|
||||
versions.apiApp = d.App?.split('+')[0] ?? '0.0.0';
|
||||
versions.apiSimApi = d.SimApi?.split('+')[0] ?? '0.0.0';
|
||||
versions.apiAppFull = d.App ?? '0.0.0';
|
||||
@@ -233,9 +233,9 @@ export class SimApiCore {
|
||||
if (this.debug) {
|
||||
console.log(`UI主应用版本: ${versions.uiApp}\nUISimApi版本: ${versions.uiSimApi}\nAPI主应用版本: ${versions.apiApp}\nAPISimApi版本: ${versions.apiSimApi}`)
|
||||
}
|
||||
resp.data.versions = versions;
|
||||
this.webConfig.set(endpointName, resp.data);
|
||||
|
||||
const conf = JSON.parse(JSON.stringify(resp.data));
|
||||
conf.Versions = versions;
|
||||
this.webConfig.set(endpointName, conf);
|
||||
}
|
||||
}
|
||||
return this.webConfig.get(endpointName)!;
|
||||
|
||||
@@ -11,7 +11,6 @@ export const useSimApi = defineStore('simapi', {
|
||||
_core: new SimApiCore(),
|
||||
}),
|
||||
getters: {
|
||||
webConfig: state => state._core.webConfig,
|
||||
IsDebug: state => state._core.isDebug
|
||||
},
|
||||
actions: {
|
||||
|
||||
Reference in New Issue
Block a user