Index: lib/pages/login/account_login_controller.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'dart:convert';\n\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter_smart_dialog/flutter_smart_dialog.dart';\nimport 'package:get/get.dart';\nimport 'package:tdesign_flutter/tdesign_flutter.dart';\nimport 'package:vosa_twyford/common/isar_key_value_model.dart';\nimport 'package:vosa_twyford/common/business_state.dart';\nimport 'package:vosa_twyford/net/api.dart';\nimport 'package:vosa_twyford/net/hi_http.dart';\nimport 'package:vosa_twyford/pages/hi_getcontroller.dart';\nimport 'package:vosa_twyford/pages/login/login.dart';\nimport 'package:vosa_twyford/pages/main_page.dart';\n\nimport '../../res/td_res_delegate.dart';\n\nclass AccountLoginController extends HiGetController{\n  final FocusNode focusNode=FocusNode();\n  RxBool pwdEntering=false.obs;\n  RxBool showPassword=false.obs;\n  RxBool remember=false.obs;\n  RxBool canLogin=false.obs;\n  List<Env> get list=>[\n    Env(name: \"正式环境\".tr, ip: \"https://tmsaf.sunda.com/\",apiKey: \"AC22AE74F5DD47649EDA60CEF64D334D\"),\n    Env(name: \"测试环境\".tr, ip: \"https://test-tms-cn.sunda.com:50443/\",apiKey: \"83330894D0554858B72FBFCF0F45DB54\"),\n  ];\n\n  RxInt selectIndex=0.obs;\n  TextEditingController accountTextEditController=TextEditingController();\n  TextEditingController passwordTextEditController=TextEditingController();\n  TextEditingController envTextEditingController=TextEditingController();\n\n  late Rx<Env> env;\n  RxString localeStr=\"\".obs;\n  late BusinessState businessState;\n  @override\n  void onInit() {\n    super.onInit();\n    focusNode.addListener(_focusChange);\n    accountTextEditController.addListener(_canLoginListener);\n    passwordTextEditController.addListener(_canLoginListener);\n    businessState=Get.find();\n    localeStr.value=businessState.locale!.languageCode??\"\";\n    //初始化环境选择\n    int index=list.indexWhere((element) => element.ip==businessState.baseUrl);\n    env=list[index].obs;\n    selectIndex.value=index;\n  }\n\n  @override\n  void onReady() {\n    super.onReady();\n    _canLoginListener();\n  }\n\n  void _canLoginListener() {\n    canLogin.value=accountTextEditController.text.isNotEmpty&&passwordTextEditController.text.isNotEmpty;\n  }\n\n  void _focusChange() {\n    pwdEntering.value=focusNode.hasFocus;\n  }\n\n  @override\n  void onClose() {\n    focusNode.removeListener(_focusChange);\n    accountTextEditController.removeListener(_canLoginListener);\n    passwordTextEditController.removeListener(_canLoginListener);\n    super.onClose();\n  }\n\n\n  void switchVisibility() {\n    showPassword.value=!showPassword.value;\n  }\n\n  void rememberChange() {\n    remember.value=!remember.value;\n  }\n\n  login() async{\n    // if(!validateForm()){\n    //   return;\n    // }\n    // _saveUserAccount();\n    // TDToast.showLoading(context: Get.context!);\n    SmartDialog.showLoading();\n    try {\n      await HiHttp.instance.httpPost(Api.login,data: {\n        \"UserId\":accountTextEditController.text,\n        \"UserPass\":passwordTextEditController.text,\n        \"lang\":\"${Get.locale?.languageCode}-${Get.locale?.countryCode??Get.locale?.languageCode}\",\n        \"baseUrl\":businessState.baseUrl,\n        \"apiKey\":businessState.apiKey,\n      }).then((response)async{\n        if(response.statusCode==200){\n          Login login=Login.fromJson(response.data);\n          if(login.resultCode==0){\n            businessState?.login=login;\n            await _getUserData();\n            // Get.offNamed(MainPage.routeName);\n          }else{\n            SmartDialog.showToast(login.msg??\"\");\n          }\n\n        }\n      });\n\n    } catch (e,s) {\n      // Log.e(e,s);\n      print(e.toString());\n    } finally {\n      SmartDialog.dismiss();\n      // TDToast.dismissLoading();\n    }\n\n  }\n\n  bool validateForm() {\n    if(accountTextEditController.text.isEmpty||passwordTextEditController.text.isEmpty){\n      return false;\n    }\n    return true;\n  }\n\n \n\n\n\n  _getUserData() async{\n    SmartDialog.showLoading();\n    try {\n      await HiHttp.instance.httpGet(Api.getUserByID,queryParam: {\n        \"userID\":accountTextEditController.text,\n        \"token\":businessState?.login?.token??\"\",\n      }).then((response)async{\n        if(response.statusCode==200){\n          GetUserInfo getUserInfo=GetUserInfo.fromJson(response.data);\n          if(getUserInfo.resultCode==0){\n            businessState?.userData=getUserInfo.data;\n            Get.offNamed(MainPage.routeName);\n          }else{\n            SmartDialog.showToast(getUserInfo.msg??\"\");\n          }\n\n        }\n      });\n\n    } catch (e,s) {\n      // Log.e(e,s);\n      print(e.toString());\n    } finally {\n      SmartDialog.dismiss();\n      // TDToast.dismissLoading();\n    }\n  }\n\n  void resetServer(int selectIndex) {\n    env.value=list.elementAt(selectIndex);\n    BusinessState state =Get.find();\n    state.baseUrl=env.value.ip;\n    state.apiKey=env.value.apiKey;\n    HiHttp.instance.resetServer();\n  }\n\n  void changeLocale(String? selectId) {\n    localeStr.value=selectId!;\n    IsarKeyValueModel.save(IsarKeyValueModel.create(IsarKeyValueModel.locale,selectId));\n    Get.updateLocale(Locale(selectId,countryCode[selectId]));\n    TDResourceManager.instance.setResourceBuilder((context) => langMap[selectId], true);\n    Navigator.pop(Get.context!);\n    Future.delayed(const Duration(seconds: 0),(){\n      resetServer(selectIndex.value);\n      envTextEditingController.text=env.value.name;\n    });\n  }\n\n  Map<String,TDResourceDelegate> langMap={\n    \"en\":EnResourceDelegate(),\n    \"zh\":ZhResourceDelegate(),\n    \"fr\":FrResourceDelegate(),\n    \"ru\":RuResourceDelegate(),\n    \"es\":EsResourceDelegate(),\n  };\n  Map<String,String> countryCode={\n    \"en\":\"us\",\n    \"zh\":\"cn\",\n    \"fr\":\"fr\",\n    \"ru\":\"ru\",\n    \"es\":\"es\",\n  };\n\n}\n\nclass Env{\n  final String name;\n  final String ip;\n  final String apiKey;\n\n  Env({required this.name,required this.ip,required this.apiKey});\n}\n\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/pages/login/account_login_controller.dart b/lib/pages/login/account_login_controller.dart
--- a/lib/pages/login/account_login_controller.dart	(revision 8bada54314ecc985abf0964ebfd9480d4cf1ecd2)
+++ b/lib/pages/login/account_login_controller.dart	(date 1733104643511)
@@ -26,8 +26,8 @@
   ];
 
   RxInt selectIndex=0.obs;
-  TextEditingController accountTextEditController=TextEditingController();
-  TextEditingController passwordTextEditController=TextEditingController();
+  TextEditingController accountTextEditController=TextEditingController()..text="0112633";
+  TextEditingController passwordTextEditController=TextEditingController()..text="0112633";
   TextEditingController envTextEditingController=TextEditingController();
 
   late Rx<Env> env;
