Index: lib/core/pub_lib/pub_base_getx.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'package:application/core/pub_lib/pub_base_list_model.dart';\nimport 'package:flutter/widgets.dart';\nimport 'package:get/get.dart';\nimport 'package:application/core/http/model/result_data.dart';\nimport 'package:pull_to_refresh/pull_to_refresh.dart';\n\n/// 将BaseController从public_lib库中剥离以便后续优化\n///Controller\nabstract class BaseController extends GetxController {\n  ///第一帧未回调的方法\n  ///这里尽可能只做数据传递\n  @override\n  void onInit() {\n    super.onInit();\n  }\n\n  ///第一帧已回调的方法\n  ///重的初始化操作放这里，可以避免路由跳转时卡顿一下\n  @override\n  void onReady() {\n    super.onReady();\n    debugPrint('BaseController onReady');\n  }\n\n  @override\n  void onClose() {\n    debugPrint('BaseController onClose ${Get.currentRoute}');\n    super.onClose();\n  }\n\n}\n\nabstract class BaseObserverController extends BaseController with WidgetsBindingObserver {\n  ///第一帧未回调的方法\n  ///这里尽可能只做数据传递\n  @override\n  void onInit() {\n    WidgetsBinding.instance.addObserver(this);\n    super.onInit();\n  }\n\n  ///生命周期变化时回调\n  //  resumed:应用可见并可响应用户操作\n  //  inactive:用户可见，但不可响应用户操作\n  //  paused:已经暂停了，用户不可见、不可操作\n  //  suspending：应用被挂起，此状态IOS永远不会回调\n  @override\n  void didChangeAppLifecycleState(AppLifecycleState state) {\n    super.didChangeAppLifecycleState(state);\n    debugPrint(\n        'BaseObserverController, didChangeAppLifecycleState $this,state=$state, isClosed=$isClosed');\n    if (isClosed) {\n      return;\n    }\n    if (state == AppLifecycleState.resumed) {\n      onResume();\n    } else if (state == AppLifecycleState.paused) {\n      onPause();\n    }\n  }\n\n  ///应用尺寸改变时回调，例如旋转\n  @override\n  void didChangeMetrics() {\n    super.didChangeMetrics();\n    final Size size = WidgetsBinding.instance.window.physicalSize;\n    debugPrint('BaseObserverController didChangeMetrics  ：宽：${size.width} 高：${size.height}');\n  }\n\n  void onResume() {}\n\n  void onPause() {}\n\n  @override\n  void onClose() {\n    WidgetsBinding.instance.removeObserver(this);\n    super.onClose();\n  }\n}\n\nabstract class BaseListController<M> extends BaseController {\n  RefreshController refreshController = RefreshController();\n  RxList<M> list = List<M>.empty(growable: true).obs;\n  int total = 0;\n  int page = 1;\n  bool hasLoadMore = false;\n\n  Future<ResultData> getList(int page);\n\n  void autoRefresh() {\n    Get.width;\n    refreshController.requestRefresh(duration: const Duration(milliseconds: 200));\n  }\n\n  Future<bool> onRefresh() async {\n    page = 1;\n    final ResultData resultData = await getList(page);\n    if (resultData.isSuccess()) {\n      final baseListModel = resultData.data;\n      if (baseListModel is BaseListModel) {\n        list.clear();\n        total = baseListModel.getTotal;\n        hasLoadMore = total > baseListModel.getList.length;\n        list.value = baseListModel.getList as List<M>;\n      } else {\n        debugPrint('model need to extends BaseListModel');\n      }\n    }\n\n    debugPrint('jeffrey, onRefresh finish===,page=$page,total=$total,hasLoadMore=$hasLoadMore,length=${list.length}');\n    return resultData.isSuccess();\n  }\n\n  Future<bool> loadMore() async {\n    page++;\n    final ResultData resultData = await getList(page);\n    if (resultData.isSuccess()) {\n      final baseListModel = resultData.data;\n      if (baseListModel is BaseListModel) {\n        total = baseListModel.getTotal;\n        list.addAll(baseListModel.list as List<M>);\n        hasLoadMore = total > list.length;\n      } else {\n        debugPrint('model need to extends BaseListModel');\n      }\n    } else {\n      ///重制\n      page--;\n    }\n    debugPrint('jeffrey, loadMore finish===,page=$page,total=$total,hasLoadMore=$hasLoadMore,length=${list.length}');\n    return resultData.isSuccess();\n  }\n}\n\n///Bindings\nabstract class BaseBindings extends Bindings {}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/core/pub_lib/pub_base_getx.dart b/lib/core/pub_lib/pub_base_getx.dart
--- a/lib/core/pub_lib/pub_base_getx.dart	(revision c126f46cce32a3f589e4ef175880a78c3fa53027)
+++ b/lib/core/pub_lib/pub_base_getx.dart	(date 1721897477348)
@@ -19,12 +19,12 @@
   @override
   void onReady() {
     super.onReady();
-    debugPrint('BaseController onReady');
+    // debugPrint('BaseController onReady');
   }
 
   @override
   void onClose() {
-    debugPrint('BaseController onClose ${Get.currentRoute}');
+    // debugPrint('BaseController onClose ${Get.currentRoute}');
     super.onClose();
   }
 
Index: lib/core/http/proxy.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'dart:convert';\n\nimport 'package:application/core/pub_lib/utils/print_utils.dart';\nimport 'package:application/init/log.dart';\nimport 'package:flutter_secure_storage/flutter_secure_storage.dart';\nimport 'package:application/core/pub_lib/config/core_config.dart';\n\nclass LocalProxy {\n  factory LocalProxy() => _getInstance();\n\n  static LocalProxy get instance => _getInstance();\n\n  static LocalProxy? _instance;\n\n  LocalProxy._internal();\n\n  static LocalProxy _getInstance() {\n    _instance ??= LocalProxy._internal();\n    return _instance!;\n  }\n\n  String host = \"192.168.16.24\";\n  String port = \"9090\";\n  bool enabled = false;\n\n  static FlutterSecureStorage storages = const FlutterSecureStorage();\n\n  static FlutterSecureStorage get storage => storages;\n\n  static String proxyHostKey = 'proxy_host_key';\n\n  static Future<void> setProxyHost() async {\n    Map<String, dynamic> map = {\"host\": LocalProxy().host, \"port\": LocalProxy().port, \"enabled\": LocalProxy().enabled};\n    storage.delete(key: proxyHostKey);\n    storage.write(key: proxyHostKey, value: json.encode(map));\n  }\n\n  static Future<void> getProxyHost() async {\n    if(!CoreConfig.DEBUG) return;\n    try {\n      Map<String, dynamic>? map = await storage\n          .read(key: proxyHostKey)\n          .then((value) => value == null ? null : Map<String, dynamic>.from(json.decode(value)));\n      if (map != null) {\n        LocalProxy().host = map[\"host\"] as String;\n        LocalProxy().port = map[\"port\"] as String;\n        LocalProxy().enabled = map[\"enabled\"] as bool;\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n      PrintUtil.print(e);\n    }\n  }\n\n  /// delete\n  static Future<void> deleteProxyHost() async {\n    await storage.delete(key: proxyHostKey);\n  }\n}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/core/http/proxy.dart b/lib/core/http/proxy.dart
--- a/lib/core/http/proxy.dart	(revision c126f46cce32a3f589e4ef175880a78c3fa53027)
+++ b/lib/core/http/proxy.dart	(date 1721901793280)
@@ -1,9 +1,7 @@
 import 'dart:convert';
 
-import 'package:application/core/pub_lib/utils/print_utils.dart';
-import 'package:application/init/log.dart';
-import 'package:flutter_secure_storage/flutter_secure_storage.dart';
 import 'package:application/core/pub_lib/config/core_config.dart';
+import 'package:flutter_secure_storage/flutter_secure_storage.dart';
 
 class LocalProxy {
   factory LocalProxy() => _getInstance();
@@ -19,9 +17,9 @@
     return _instance!;
   }
 
-  String host = "192.168.16.24";
+  String host = "192.168.3.12";
   String port = "9090";
-  bool enabled = false;
+  bool enabled = true;
 
   static FlutterSecureStorage storages = const FlutterSecureStorage();
 
@@ -46,9 +44,8 @@
         LocalProxy().port = map["port"] as String;
         LocalProxy().enabled = map["enabled"] as bool;
       }
-    } catch (e, s) {
-      Log.e(e, s);
-      PrintUtil.print(e);
+    } catch (e) {
+      print(e);
     }
   }
 
Index: lib/init/my_app.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'package:application/api/mission/mission_api_service.dart';\nimport 'package:application/api/order/order_api_service.dart';\nimport 'package:application/config/config.dart';\nimport 'package:application/config/flavors.dart';\nimport 'package:application/core/http/abstract/http_manager.dart';\nimport 'package:application/widget/widget/image/watermark.dart';\nimport 'package:application/init/app_bloc.dart';\nimport 'package:application/page/experiments/proxy_entry.dart';\nimport 'package:application/page/menu/controller/theme_controller.dart';\nimport 'package:application/page/menu/login.dart';\nimport 'package:application/page/test/env_util.dart';\nimport 'package:application/res/translation_service.dart';\nimport 'package:application/router/route_map.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_localizations/flutter_localizations.dart';\nimport 'package:flutter_screenutil/flutter_screenutil.dart';\nimport 'package:flutter_smart_dialog/flutter_smart_dialog.dart';\nimport 'package:get/get.dart';\nimport 'package:application/core/pub_lib/global/global.dart';\nimport 'package:application/core/pub_lib/pub_base_getx.dart';\nimport 'package:application/core/pub_lib/utils/language_util.dart';\nimport 'package:sd_app_net_log/main.dart';\nimport 'package:sd_app_tool_entry/main.dart';\nimport 'package:sentry_flutter/sentry_flutter.dart';\n\nimport 'package:application/api/resource/msg.dart';\nimport 'package:application/api/vehicle/vehicle_api_service.dart';\nimport 'package:application/core/database/mp_application.dart';\nimport 'package:application/widget/widget/controller/watermark_wrapper_controller.dart';\nimport 'package:application/page/index.dart';\nimport 'package:application/page/menu/controller/login_controller.dart';\n\nclass MyAppBindings extends BaseBindings {\n  @override\n  void dependencies() {\n    Get.put(VehicleApiService());\n    Get.put(MessageApiService());\n    Get.put(OrderApiService());\n    Get.put(LoginController());\n    Get.put(WatermarkWrapperController());\n    Get.put(MissionApiService());\n  }\n}\n\nclass MyApp extends StatefulWidget {\n  const MyApp({super.key});\n\n  @override\n  _MyAppState createState() => _MyAppState();\n}\n\nclass _MyAppState extends State<MyApp> {\n  final ThemeController themeController = Get.put(ThemeController());\n\n  @override\n  void initState() {\n    super.initState();\n    SDDevelopToolEntry.instance\n        .init(needInit: !F.isProd)\n        .addTool(SDNetLogEntry.instance.initEntry(dio: HttpManager.instance.dio, decrypt: null))\n        .addTool(EnvUtil())\n        .addTool(ProxyEntry());\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    var initTheme = themeController.getInitTheme();\n    return ScreenUtilInit(\n        designSize: const Size(ConfigData.WIDTH, ConfigData.HEIGHT),\n        builder: () {\n          return GetMaterialApp(\n            initialBinding: MyAppBindings(),\n            initialRoute: MpApplication.isLogined() ? MainHomePage.routeName : LoginPage.routeName,\n            enableLog: ConfigData.DEBUG,\n            title: ConfigData.APP_NAME,\n            theme: initTheme,\n            builder: (content, child) {\n              var dialogBuilder = FlutterSmartDialog.init();\n              return dialogBuilder(context, WatermarkWrapper(child: APPBloc(child: child!)));\n            },\n            getPages: RouteMap.getPages,\n            defaultTransition: Transition.rightToLeft,\n            locale: LanguageUtil.initLanguage().toLocale(),\n            supportedLocales: Global.languages.map((e) => e.toLocale()).toList(),\n            localizationsDelegates: [\n              GlobalMaterialLocalizations.delegate,\n              GlobalWidgetsLocalizations.delegate,\n              GlobalCupertinoLocalizations.delegate,\n            ],\n            translations: TranslationService(),\n            navigatorObservers: [SentryNavigatorObserver()],\n          );\n        });\n  }\n}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/init/my_app.dart b/lib/init/my_app.dart
--- a/lib/init/my_app.dart	(revision c126f46cce32a3f589e4ef175880a78c3fa53027)
+++ b/lib/init/my_app.dart	(date 1721900598442)
@@ -55,11 +55,11 @@
   @override
   void initState() {
     super.initState();
-    SDDevelopToolEntry.instance
-        .init(needInit: !F.isProd)
-        .addTool(SDNetLogEntry.instance.initEntry(dio: HttpManager.instance.dio, decrypt: null))
-        .addTool(EnvUtil())
-        .addTool(ProxyEntry());
+    // SDDevelopToolEntry.instance
+    //     .init(needInit: !F.isProd)
+    //     .addTool(SDNetLogEntry.instance.initEntry(dio: HttpManager.instance.dio, decrypt: null))
+    //     .addTool(EnvUtil())
+    //     .addTool(ProxyEntry());
   }
 
   @override
Index: lib/core/http/interceptors/logs_interceptors.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'dart:io';\nimport 'package:application/core/http/interceptors/error_log_factory.dart';\nimport 'package:application/core/pub_lib/config/core_config.dart';\nimport 'package:connectivity_plus/connectivity_plus.dart';\nimport 'package:dio/dio.dart';\nimport 'dart:convert' as converter;\nimport 'package:logger/logger.dart';\nimport 'package:application/core/pub_lib/utils/file_utils.dart';\n\nclass LogsInterceptors extends InterceptorsWrapper {\n  static const debugPrint = 'debug_print';\n  static const errorPrint = 'errorPrint';\n  RequestOptions? _requestOptions;\n\n  ///打印日志的样式\n  late Logger logger;\n\n  ///日志打印的最长长度\n  static const maxLength = 10000;\n\n  ///用于保存日志的文件\n  late File _file;\n\n  LogsInterceptors() {\n    _createDirAndFiles();\n    _initLog();\n  }\n\n  @override\n  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {\n    _requestOptions = options;\n    // _createCurl(options, null);\n    super.onRequest(options, handler);\n  }\n\n  @override\n  void onResponse(Response response, ResponseInterceptorHandler handler) {\n    if (CoreConfig.DEBUG) {\n      _print('返回参数:${response.requestOptions.path}\\n$response',debugPrint);\n      StringBuffer buffer = StringBuffer();\n      _createCurl(response.requestOptions, buffer);\n      buffer.write('[${DateTime.now().toString()} Response]:\\n${response.toString()}\\n\\n');\n      _write2File(buffer);\n    }\n    super.onResponse(response, handler);\n  }\n\n  @override\n  void onError(DioError err, ErrorInterceptorHandler handler) async{\n    super.onError(err, handler);\n    if (CoreConfig.DEBUG) {\n      _print('请求异常: ${err.toString()}',errorPrint);\n      _print('异常url: ${err.requestOptions.baseUrl + err.requestOptions.path}',errorPrint);\n      _print('请求异常信息: ${err.response?.toString()}',errorPrint);\n      StringBuffer? buffer = StringBuffer();\n      _createCurl(err.requestOptions, buffer);\n      buffer.write('[${DateTime.now().toString()} ERROR]:\\n${err.response.toString()}\\n\\n');\n      _write2File(buffer);\n    }\n    ///用于网络判断\n    var connectivityResult = await (Connectivity().checkConnectivity());\n    bool network = connectivityResult != ConnectivityResult.none;\n    Response? response = err.response;\n    if (response?.statusCode == -1) {\n      String error = ErrorLogFactory.requestErrorOptions(\n          err.requestOptions.baseUrl + err.requestOptions.path,\n          err.response?.toString() ?? \"response-null-$err\",\n          err.requestOptions ,\n          null != err.requestOptions,\n          network);\n    }\n  }\n\n  void _write2File(StringBuffer buffer) async {\n    if (!_file.existsSync()) {\n      await _createDirAndFiles();\n    }\n    _file.writeAsStringSync(buffer.toString(), mode: FileMode.append);\n  }\n\n  void _createCurl(RequestOptions options, StringBuffer? buffer) {\n    ///只在debug模式下进行日志打印\n    if (CoreConfig.DEBUG) {\n      String curl = \"curl -X \";\n      String method = options.method;\n      String url = options.baseUrl + options.path;\n\n      String query = \"\";\n\n      if (options.data != null && options.data is String) {\n        query = options.data;\n      } else {\n        late Map<String, dynamic> map;\n\n        if (options.queryParameters.isNotEmpty) {\n          map = options.queryParameters;\n        } else if (options.data is Map) {\n          map = options.data;\n        } else if (options.data is String) {\n        } else if (options.data is FormData) {\n          map = {};\n          map.addEntries((options.data as FormData).fields);\n        } else {\n          map = {};\n        }\n        if (method.toLowerCase() == \"get\") {\n          query = Transformer.urlEncodeMap(map);\n        } else {\n          query = converter.jsonEncode(map);\n        }\n      }\n      String curlUrl;\n      if (method.toLowerCase() == \"get\") {\n        if (query.isNotEmpty) {\n          url += (url.contains(\"?\") ? \"&\" : \"?\") + query;\n        }\n        curlUrl = \"$curl$method '$url'\";\n        _print(curlUrl, debugPrint);\n      } else {\n        String header = \"\";\n        options.headers.forEach((key, value) {\n          header += \" -H \" \"\\\"$key:$value\\\" \";\n        });\n        header += \" -d '$query'\";\n        curlUrl = \"$curl$method $header \\\"$url\\\"\";\n        _print(curlUrl, debugPrint);\n      }\n      buffer?.write(\"${\"=\" * 50}\\n\");\n      buffer?.write(\"[${DateTime.now().toString()} Request]:\\n\");\n      buffer?.write(\"$curlUrl\\n\\n\");\n    }\n  }\n\n  void _print(String message, String codeType) {\n    var content = message.toString();\n\n    if (content.isEmpty) {\n      return;\n    }\n    while (content.length > maxLength) {\n      content = content.substring(maxLength, content.length);\n    }\n    if (content.isNotEmpty) {\n      switch (codeType) {\n        case debugPrint:\n          logger.d(message);\n          break;\n        case errorPrint:\n          logger.e(content);\n          break;\n      }\n    }\n  }\n\n  ///初始化日志打印的样式\n  void _initLog() {\n    logger = Logger(\n      filter: null, // Use the default LogFilter (-> only log in debug mode)\n      printer: PrettyPrinter(\n          methodCount: 1,\n          errorMethodCount: 1,\n          lineLength: 100,\n          colors: true,\n          printEmojis: true), // Use the PrettyPrinter to format and print log\n      output: null, // Use the default LogOutput (-> send everything to console)\n    );\n  }\n\n  ///创建日志的目录以及文件（用于后续决定是哪种方式进行日志上报）\n  Future<void> _createDirAndFiles() async {\n    var dir = await FileUtils.getAppDirectory();\n    Directory directory = Directory(\"${dir.path}LogRecorder\");\n    if (!directory.existsSync()) {\n      directory.create();\n    }\n    _file = File(\n        \"${directory.path}${Platform.pathSeparator}${DateTime.now().toString()}\");\n    if (!_file.existsSync()) {\n      _file.create();\n    }\n  }\n}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/core/http/interceptors/logs_interceptors.dart b/lib/core/http/interceptors/logs_interceptors.dart
--- a/lib/core/http/interceptors/logs_interceptors.dart	(revision c126f46cce32a3f589e4ef175880a78c3fa53027)
+++ b/lib/core/http/interceptors/logs_interceptors.dart	(date 1721897477345)
@@ -35,28 +35,28 @@
 
   @override
   void onResponse(Response response, ResponseInterceptorHandler handler) {
-    if (CoreConfig.DEBUG) {
-      _print('返回参数:${response.requestOptions.path}\n$response',debugPrint);
-      StringBuffer buffer = StringBuffer();
-      _createCurl(response.requestOptions, buffer);
-      buffer.write('[${DateTime.now().toString()} Response]:\n${response.toString()}\n\n');
-      _write2File(buffer);
-    }
+    // if (CoreConfig.DEBUG) {
+    //   _print('返回参数:${response.requestOptions.path}\n$response',debugPrint);
+    //   StringBuffer buffer = StringBuffer();
+    //   _createCurl(response.requestOptions, buffer);
+    //   buffer.write('[${DateTime.now().toString()} Response]:\n${response.toString()}\n\n');
+    //   _write2File(buffer);
+    // }
     super.onResponse(response, handler);
   }
 
   @override
   void onError(DioError err, ErrorInterceptorHandler handler) async{
     super.onError(err, handler);
-    if (CoreConfig.DEBUG) {
-      _print('请求异常: ${err.toString()}',errorPrint);
-      _print('异常url: ${err.requestOptions.baseUrl + err.requestOptions.path}',errorPrint);
-      _print('请求异常信息: ${err.response?.toString()}',errorPrint);
-      StringBuffer? buffer = StringBuffer();
-      _createCurl(err.requestOptions, buffer);
-      buffer.write('[${DateTime.now().toString()} ERROR]:\n${err.response.toString()}\n\n');
-      _write2File(buffer);
-    }
+    // if (CoreConfig.DEBUG) {
+    //   _print('请求异常: ${err.toString()}',errorPrint);
+    //   _print('异常url: ${err.requestOptions.baseUrl + err.requestOptions.path}',errorPrint);
+    //   _print('请求异常信息: ${err.response?.toString()}',errorPrint);
+    //   StringBuffer? buffer = StringBuffer();
+    //   _createCurl(err.requestOptions, buffer);
+    //   buffer.write('[${DateTime.now().toString()} ERROR]:\n${err.response.toString()}\n\n');
+    //   _write2File(buffer);
+    // }
     ///用于网络判断
     var connectivityResult = await (Connectivity().checkConnectivity());
     bool network = connectivityResult != ConnectivityResult.none;
Index: lib/page/index.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'package:application/widget/widgets/sd_colors.dart';\nimport 'package:application/config/flavors.dart';\nimport 'package:application/core/database/cache_manager.dart';\nimport 'package:application/core/database/mp_application.dart';\nimport 'package:application/core/pub_lib/utils/print_utils.dart';\nimport 'package:application/widget/widget/controller/watermark_wrapper_controller.dart';\nimport 'package:application/widget/widget/mp_scaffold.dart';\nimport 'package:application/init/log.dart';\nimport 'package:application/model/auth/auth_info_model.dart';\nimport 'package:application/page/app_bloc/qr_bloc/qr_bloc.dart';\nimport 'package:application/page/app_bloc/sale_points/sale_points_bloc.dart';\nimport 'package:application/page/home/component_home/home_bottom_nav.dart';\nimport 'package:application/page/home/controller/profile_controller.dart';\nimport 'package:application/page/home/message/message.dart';\nimport 'package:application/page/menu/controller/dict_controller.dart';\nimport 'package:application/page/menu/controller/index_controller.dart';\nimport 'package:application/page/menu/controller/login_controller.dart';\nimport 'package:application/res/assets_path.dart';\nimport 'package:application/utils/click_utils.dart';\nimport 'package:application/utils/navigator_utils.dart';\nimport 'package:application/utils/update_app_utils.dart';\nimport 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimport 'package:flutter_screenutil/flutter_screenutil.dart';\nimport 'package:flutter_bloc/flutter_bloc.dart';\n\nclass MainHomePage extends StatefulWidget {\n  static const String routeName = '/home';\n\n  const MainHomePage({super.key});\n\n  @override\n  _MainHomePageState createState() => _MainHomePageState();\n}\n\nclass _MainHomePageState extends State<MainHomePage> {\n  final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();\n\n  late DictController _dictController;\n  late IndexController _controller;\n  late LoginController _loginController;\n  late ProfileController _profileController;\n\n  @override\n  void initState() {\n    super.initState();\n    Get.put<CacheManager>(MemoryCacheManager.create());\n    _loginController = Get.put(LoginController());\n    _controller = Get.put(IndexController());\n    _dictController = Get.put(DictController());\n    _profileController = Get.put(ProfileController());\n    _init();\n    _initAsync();\n  }\n\n  void _init() {\n    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {\n      WatermarkWrapperController watermarkWrapperController = Get.put(WatermarkWrapperController());\n      watermarkWrapperController.updateWatermarkText(MpApplication.instance.authInfoModel?.empNo ?? '');\n\n      /// 判断是否是经销商端\n      if (F.clientType == ClientTypeConstant.CUSTOMER) {\n        _loginController.getDealerInfo();\n      }\n    });\n  }\n\n  Future<void> _initAsync() async {\n    try {\n      _loginController.getUserSetting(MpApplication.instance.authInfoModel?.userInfo);\n      await MpApplication().refreshToken();\n      UpdateAppUtils().checkVersionUpdate(isShowNewVersion: false);\n    } catch (e, s) {\n      Log.e(e, s);\n      PrintUtil.print('MainHomePage onInit error: $e');\n    }\n\n    /// 刷新分点数据\n    try {\n      SalePointsBloc? bloc = Get.context?.read<SalePointsBloc>();\n      if (bloc != null) {\n        bloc.checkPoints();\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n      PrintUtil.print('MainHomePage onInit error: $e');\n    }\n\n    UserInfo? userInfo = MpApplication.instance.authInfoModel?.userInfo;\n    if (userInfo?.firstLoginPassword == 'Y' || userInfo?.loginPhoneVerify == 'N') {\n      _loginController.logoutNewCtl();\n    }\n    try {\n      await _dictController.getDictList();\n      await _profileController.timeZoneReady();\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return GetBuilder<IndexController>(\n        id: _controller.id,\n        builder: (controller) {\n          if (controller.menuList.isEmpty || controller.tabPages.isEmpty) {\n            return Container(color: Colors.white, height: double.infinity);\n          }\n          var currentMenu = controller.menuList[controller.currentIndex];\n          return WillPopScope(\n              child: MpScaffold(\n                noAppBar: controller.currentIndex == controller.menuList.length - 1,\n                leading: true,\n                title: currentMenu.noTitle ? '' : currentMenu.name,\n\n                /// 头部扫码\n                leadingWidget: Container(\n                  alignment: Alignment.center,\n                  child: GestureDetector(\n                    behavior: HitTestBehavior.opaque,\n                    onTap: () {\n                      context.read<QRBloc>().showScan();\n                    },\n                    child: Container(\n                      width: 24.w,\n                      height: 24.w,\n                      child: Image.asset(\n                        R.IMAGES_HOME_SCAN_ICON_PNG,\n                        width: 24.w,\n                        height: 24.w,\n                      ),\n                    ),\n                  ),\n                ),\n                useLeading: true,\n                actions: [\n                  GestureDetector(\n                    onTap: () {\n                      NavigatorUtils.pushRoute(MessagePage.routeName);\n                    },\n                    child: Container(\n                        padding: const EdgeInsets.only(right: 4, top: 20),\n                        child: Stack(\n                          children: [\n                            Container(\n                              padding: const EdgeInsets.only(right: 10),\n                              child: Image.asset(R.IMAGES_HOME_MESSAGE_PNG, width: 24, height: 24),\n                            ),\n                            if (controller.messageController.unreadCount.value != 0)\n                              Positioned(\n                                top: 0,\n                                right: 0,\n                                child: Container(\n                                  width: 10.w,\n                                  height: 10.w,\n                                  decoration:\n                                  BoxDecoration(borderRadius: BorderRadius.circular(5.w), color: SDColors.red_1),\n                                ),\n                              ),\n                          ],\n                        )),\n                  ),\n                ],\n                bottomNavigationBar: HomeBottomNav(menuList: controller.menuList),\n                child: DefaultTextStyle(\n                    style: TextStyle(color: Get.theme.primaryColor),\n                    child: PageView(\n                      controller: controller.tabPageController,\n                      physics: const NeverScrollableScrollPhysics(),\n                      children: controller.tabPages,\n                      onPageChanged: (index) {\n                        controller.updateCurrentIndex(index);\n                      },\n                    )),\n              ),\n              onWillPop: () => ClickUtils.exitBy2Click(status: _scaffoldKey.currentState));\n        });\n  }\n}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/page/index.dart b/lib/page/index.dart
--- a/lib/page/index.dart	(revision c126f46cce32a3f589e4ef175880a78c3fa53027)
+++ b/lib/page/index.dart	(date 1721904095776)
@@ -68,8 +68,8 @@
   Future<void> _initAsync() async {
     try {
       _loginController.getUserSetting(MpApplication.instance.authInfoModel?.userInfo);
-      await MpApplication().refreshToken();
-      UpdateAppUtils().checkVersionUpdate(isShowNewVersion: false);
+      // await MpApplication().refreshToken();
+      // UpdateAppUtils().checkVersionUpdate(isShowNewVersion: false);
     } catch (e, s) {
       Log.e(e, s);
       PrintUtil.print('MainHomePage onInit error: $e');
