feat: show version in sidebar

This commit is contained in:
Junyan Qin
2025-05-10 18:31:10 +08:00
parent 055b389353
commit 11d94ae8c3
2 changed files with 11 additions and 1 deletions
+7
View File
@@ -54,6 +54,7 @@ class HttpClient {
private disableToken: boolean = false;
// 暂不需要SSR
// private ssrInstance: AxiosInstance | null = null
public systemInfo: ApiRespSystemInfo | null = null;
constructor(baseURL?: string, disableToken?: boolean) {
this.instance = axios.create({
@@ -65,6 +66,12 @@ class HttpClient {
});
this.disableToken = disableToken || false;
this.initInterceptors();
if (this.systemInfo === null) {
this.getSystemInfo().then((res) => {
this.systemInfo = res;
});
}
}
// 兜底URL,如果使用未配置会走到这里