|
@@ -79,14 +79,14 @@ export const checkServerConnection = createAsyncThunk(
|
|
|
// 1. 加载本地配置
|
|
// 1. 加载本地配置
|
|
|
const config = await ConfigService.getServerConfig();
|
|
const config = await ConfigService.getServerConfig();
|
|
|
|
|
|
|
|
- // 2. 如果是默认配置(未配置过),需要配置
|
|
|
|
|
- const defaultConfig = ConfigService.getDefaultConfig();
|
|
|
|
|
- const isDefaultConfig = !config ||
|
|
|
|
|
- (config.ip === defaultConfig.ip && config.apiPort === defaultConfig.apiPort);
|
|
|
|
|
|
|
+ // // 2. 如果是默认配置(未配置过),需要配置
|
|
|
|
|
+ // const defaultConfig = ConfigService.getDefaultConfig();
|
|
|
|
|
+ // const isDefaultConfig = !config ||
|
|
|
|
|
+ // (config.ip === defaultConfig.ip && config.apiPort === defaultConfig.apiPort);
|
|
|
|
|
|
|
|
- if (isDefaultConfig) {
|
|
|
|
|
- return { needsConfig: true, config: null };
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (isDefaultConfig) {
|
|
|
|
|
+ // return { needsConfig: true, config: null };
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
// 3. 测试连接
|
|
// 3. 测试连接
|
|
|
const testResult = await ConfigService.testConnection(config.ip, config.apiPort);
|
|
const testResult = await ConfigService.testConnection(config.ip, config.apiPort);
|