mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 07:54:19 +00:00
feat: show version in sidebar
This commit is contained in:
@@ -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,如果使用未配置会走到这里
|
||||
|
||||
Reference in New Issue
Block a user