|
@@ -158,14 +158,23 @@ class HomeController extends GetxController {
|
|
// await Future.delayed(Duration(seconds: 3)); // 等待核心状态更新
|
|
// await Future.delayed(Duration(seconds: 3)); // 等待核心状态更新
|
|
if(globalController.selectedNode.value != null)
|
|
if(globalController.selectedNode.value != null)
|
|
{
|
|
{
|
|
- await connectionService.startConnectionWin();
|
|
|
|
|
|
+ if(Platform.isMacOS){
|
|
|
|
+ await connectionService.startConnectionMac();
|
|
|
|
+ } else {
|
|
|
|
+ await connectionService.startConnectionWin();
|
|
|
|
+ }
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
// 继续后面的逻辑
|
|
// 继续后面的逻辑
|
|
var error = await networkService.fetchAuthUser();
|
|
var error = await networkService.fetchAuthUser();
|
|
|
|
|
|
// 根据 error 的结果继续处理
|
|
// 根据 error 的结果继续处理
|
|
if (error == "") {
|
|
if (error == "") {
|
|
- await connectionService.startConnectionWin();
|
|
|
|
|
|
+ if(Platform.isMacOS){
|
|
|
|
+ await connectionService.startConnectionMac();
|
|
|
|
+ } else {
|
|
|
|
+ await connectionService.startConnectionWin();
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
connectionService.updateStatus(ConnectionStatus.disconnected);
|
|
connectionService.updateStatus(ConnectionStatus.disconnected);
|
|
globalController.updateMsg("验证失败,{$error}");
|
|
globalController.updateMsg("验证失败,{$error}");
|