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';\nimport 'package:form_builder_validators/form_builder_validators.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              FormBuilderLocalizations.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 a75092ddc33bcccbdd08673945d50590622e10d8)
+++ b/lib/init/my_app.dart	(date 1724653791550)
@@ -3,6 +3,7 @@
 import 'package:application/config/config.dart';
 import 'package:application/config/flavors.dart';
 import 'package:application/core/http/abstract/http_manager.dart';
+import 'package:application/init/crm_navigator_observer.dart';
 import 'package:application/widget/widget/image/watermark.dart';
 import 'package:application/init/app_bloc.dart';
 import 'package:application/page/experiments/proxy_entry.dart';
@@ -90,7 +91,7 @@
               FormBuilderLocalizations.delegate,
             ],
             translations: TranslationService(),
-            navigatorObservers: [SentryNavigatorObserver()],
+            navigatorObservers: [SentryNavigatorObserver(),CRMNavigatorObserver()],
           );
         });
   }
Index: lib/page/home/profile_page.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'package:application/core/mp_core_config.dart';\nimport 'package:application/res/assets_path.dart';\nimport 'package:application/res/strings.dart';\nimport 'package:application/core/extension/double_ext.dart';\nimport 'package:application/core/extension/string_parser_extension.dart';\nimport 'package:application/widget/widget/mp_scaffold.dart';\nimport 'package:application/page/home/about_page.dart';\nimport 'package:application/page/home/change_password_page.dart';\nimport 'package:application/page/home/change_phone_page.dart';\nimport 'package:application/page/home/controller/profile_controller.dart';\nimport 'package:application/page/home/select_page.dart';\nimport 'package:application/page/home/user_feedback_page.dart';\nimport 'package:application/utils/navigator_utils.dart';\nimport 'package:application/utils/smart_manager.dart';\nimport 'package:flutter/material.dart';\nimport 'package:application/core/pub_lib/config/core_config.dart';\nimport 'package:application/core/pub_lib/pub_base_view.dart';\nimport 'package:flutter_screenutil/flutter_screenutil.dart';\nimport 'package:get/get.dart';\nimport 'package:sp_util/sp_util.dart';\nimport 'package:application/config/flavors.dart';\nimport 'package:application/page/menu/controller/login_controller.dart';\nimport 'package:application/page/test/test_blue_plus_print_page.dart';\n\nclass ProfilePage extends SDBaseView<ProfileController> {\n  static const String routeName = '/ProfilePage';\n\n  const ProfilePage({super.key});\n\n  @override\n  void onInit() {\n    Get.put(ProfileController());\n    super.onInit();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return MpScaffold(\n      isWhite: true,\n      title: '',\n      noAppBar: true,\n      child: SingleChildScrollView(\n        child: Column(\n          children: [\n            ///用户信息\n            userInfoView(),\n            10.heightSizedBox,\n\n            ///系统设置\n            systemView(),\n            12.heightSizedBox,\n\n            ///信息变更\n            changeInfoView(),\n            12.heightSizedBox,\n\n            ///其他操作\n            otherView(),\n            12.heightSizedBox,\n\n            ///退出登陆\n            checkOutView(),\n          ],\n        ),\n      ),\n    );\n  }\n\n  Container userInfoView() {\n    return Container(\n      width: 1.sw,\n      decoration:\n          BoxDecoration(image: DecorationImage(image: AssetImage(R.IMAGES_COMMON_PROFILE_BG_PNG), fit: BoxFit.cover)),\n      child: Column(\n        mainAxisSize: MainAxisSize.min,\n        mainAxisAlignment: MainAxisAlignment.start,\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          24.heightSizedBox,\n          Container(\n            width: 1.sw,\n            height: 56.h,\n            alignment: Alignment.center,\n            child: Text(\n              Ids.profile.tr,\n              style: TextStyle(fontSize: 18.sp, color: Colors.white, fontWeight: FontWeight.bold),\n            ),\n          ),\n          16.heightSizedBox,\n          Row(\n            mainAxisSize: MainAxisSize.max,\n            mainAxisAlignment: MainAxisAlignment.start,\n            crossAxisAlignment: CrossAxisAlignment.start,\n            children: [\n              14.widthSizedBox,\n              Image.asset(R.IMAGES_COMMON_PROFILE_HEAD_IMAGE_PNG, width: 54.w, height: 54.w),\n              16.widthSizedBox,\n              Column(\n                crossAxisAlignment: CrossAxisAlignment.start,\n                children: [\n                  SizedBox(\n                    width: 200.w,\n                    child: Text(\n                      controller.authInfo?.userInfo?.name ?? '',\n                      style: TextStyle(fontSize: 16.sp, color: Colors.white, fontWeight: FontWeight.bold),\n                      overflow: TextOverflow.ellipsis,\n                    ),\n                  ),\n                  4.heightSizedBox,\n                  Text(\n                    controller.authInfo?.userInfo?.phone ?? '',\n                    style: TextStyle(fontSize: 16.sp, color: Colors.white),\n                  )\n                ],\n              )\n            ],\n          ),\n          16.heightSizedBox\n        ],\n      ),\n    );\n  }\n\n  // Container userInfoView() {\n  //   return Container(\n  //     width: 1.sw,\n  //     height: 86.h,\n  //     color: Colors.white,\n  //     padding: EdgeInsets.all(16.w),\n  //     child: Row(\n  //       children: [\n  //         Image.asset(\n  //           ImageUtils.getImagePath(\n  //               'default_image.png',\n  //               'home'\n  //                   ''),\n  //           width: 54.w,\n  //           height: 54.w,\n  //         ),\n  //         16.widthSizedBox,\n  //         Column(\n  //           crossAxisAlignment: CrossAxisAlignment.start,\n  //           mainAxisAlignment: MainAxisAlignment.center,\n  //           children: [\n  //             Text(\n  //               controller.authInfo?.userInfo?.name ?? '',\n  //               style: TextStyle(\n  //                   fontSize: 16.sp,\n  //                   color: '#333333'.getColor(),\n  //                   fontWeight: FontWeight.bold),\n  //             ),\n  //             4.heightSizedBox,\n  //             Text(\n  //               controller.authInfo?.userInfo?.phone ?? '',\n  //               style: TextStyle(\n  //                 fontSize: 16.sp,\n  //                 color: '#333333'.getColor(),\n  //               ),\n  //             ),\n  //           ],\n  //         )\n  //       ],\n  //     ),\n  //   );\n  // }\n\n  systemView() {\n    return Column(\n      children: filterSystemView(),\n    );\n  }\n\n  Container line() {\n    return Container(\n      width: 1.sw,\n      height: 0.5.h,\n      color: '#DDDDDD'.getColor(),\n      padding: EdgeInsets.only(left: 14.w),\n    );\n  }\n\n  List<Widget> filterSystemView() {\n    List<Widget> list = [\n      itemView(() {\n        // MQTTManager().Message('测试发送了啥');\n        NavigatorUtils.pushPage(SelectPage.routeName,\n            arguments: SelectAr(Ids.theme.tr, (value) {\n              controller.updateThemeData(value);\n              controller.themeStr.value = controller.colorStr[value];\n            }, controller.colorStr, controller.colorIndex));\n      }, Ids.theme.tr, controller.themeStr),\n      line(),\n      itemView(() {\n        NavigatorUtils.pushPage(SelectPage.routeName,\n            arguments: SelectAr(Ids.languageSetting.tr, (value) {\n              controller.languagesIndex = value;\n              controller.changeLanguage();\n              controller.languageStr.value = controller.languagesStr[value];\n            }, controller.languagesStr, controller.languagesIndex));\n      }, Ids.language.tr, controller.languageStr),\n      line(),\n      itemView(() {\n        NavigatorUtils.pushPage(SelectPage.routeName,\n            arguments: SelectAr(Ids.selectTimeZone.tr, (value) {\n              controller.setSystemTimeZone().then((result) {\n                if (result) {\n                  controller.timeStr.value = controller.timeList[value];\n                  SpUtil.putString(MpCoreConfig.TIME_ZONE, controller.timeDictList[value].dictKey ?? '');\n                }\n              });\n            }, controller.timeList, controller.timeIndex));\n      }, Ids.timeZone.tr, controller.timeStr),\n      if (F.isCustomerClient) line(),\n    ];\n    if (F.isCustomerClient) {\n      list.add(itemView(() {\n        NavigatorUtils.pushPage(SelectPage.routeName,\n            arguments: SelectAr(Ids.pleaseClickToSelectSalesUnit.tr, (value) {\n              controller.saleUnitListIndex = value;\n              controller.salesUnitStr.value = controller.saleUnitListStr[value];\n              controller.changeSalasUnit();\n            }, controller.saleUnitListStr, controller.saleUnitListIndex));\n      }, Ids.salesUnit.tr, controller.salesUnitStr));\n    }\n    return list;\n  }\n\n  itemView(GestureTapCallback onTap, String title, RxString content) {\n    return GestureDetector(\n      behavior: HitTestBehavior.opaque,\n      onTap: onTap,\n      child: Container(\n        width: 1.sw,\n        // height: 58.h,\n        color: Colors.white,\n        padding: EdgeInsets.only(left: 12.w, right: 12.w, top: 13.h, bottom: 12.5.h),\n        child: Row(\n          mainAxisSize: MainAxisSize.max,\n          mainAxisAlignment: MainAxisAlignment.spaceBetween,\n          crossAxisAlignment: CrossAxisAlignment.center,\n          children: [\n            Text(\n              title,\n              style: TextStyle(fontSize: 16.sp, color: '#333333'.getColor()),\n            ),\n            Row(\n              crossAxisAlignment: CrossAxisAlignment.center,\n              children: [\n                Obx(\n                  () => Text(\n                    content.value,\n                    style: TextStyle(fontSize: 16.sp, color: '#333333'.getColor()),\n                  ),\n                ),\n                Image.asset(\n                  R.IMAGES_COMMON_KEY_RIGHT_PNG,\n                  width: 24.sp,\n                  height: 24.sp,\n                )\n              ],\n            )\n          ],\n        ),\n      ),\n    );\n  }\n\n  // divider() {\n  //   return Container(\n  //     width: 1.sw,\n  //     height: 0.5.h,\n  //     color: '#EEEEEE'.getColor(),\n  //   );\n  // }\n\n  changeInfoView() {\n    return Column(\n      children: [\n        itemView(() {\n          NavigatorUtils.pushPage(ChangePasswordPage.routeName);\n        }, Ids.changePassword.tr, ''.obs),\n        line(),\n        itemView(() {\n          NavigatorUtils.pushPage(ChangePhonePage.routeName);\n        }, Ids.changePhoneNumber.tr, ''.obs),\n        // todo 参数配置页面开放\n        // divider(),\n        // itemView(() {\n        //   NavigatorUtils.pushPage(OrderFlagPage.routeName);\n        // }, Ids.parameterConfiguration.tr, ''.obs)\n      ],\n    );\n  }\n\n  otherView() {\n    return Column(\n      children: [\n        itemView(() {\n          SmartManager().showDoubleDialog(Ids.makeSureToClearAllCache.tr, confirmCallback: (value) {\n            controller.clearCache().then((value) {\n              controller.getCacheSize().then((value) {\n                controller.cacheStr.value = value;\n                SmartManager().showCenterToast('Cache cleanup successful');\n              });\n            });\n          });\n        }, Ids.clearCache.tr, controller.cacheStr),\n        if (F.isCustomerClient) line(),\n        if (F.isCustomerClient)\n          itemView(() {\n            NavigatorUtils.pushPage(UserFeedbackPage.routeName);\n          }, Ids.customerFeedback.tr, ''.obs),\n        line(),\n        itemView(() {\n          NavigatorUtils.pushPage(AboutPage.routeName);\n        }, Ids.about.tr, controller.versionStr),\n        line(),\n        itemView(() {\n          NavigatorUtils.pushPage(TestBluePlusPrintPage.routeName);\n        }, Ids.settingPrint.tr, ''.obs),\n\n        /// debug环境\n        if (CoreConfig.DEBUG) line(),\n\n        // divider(),\n        // itemView(() {\n        //   NavigatorUtils.pushPage(BluePlusPrintSettingPage.routeName);\n        // }, Ids.settingPrint.tr, ''.obs),\n      ],\n    );\n  }\n\n  checkOutView() {\n    return GestureDetector(\n      behavior: HitTestBehavior.opaque,\n      onTap: () {\n        Get.find<LoginController>().logoutNewCtl();\n      },\n      child: Container(\n        width: 1.sw,\n        height: 48.h,\n        color: Colors.white,\n        alignment: Alignment.center,\n        margin: EdgeInsets.only(bottom: 12.h),\n        child: Text(\n          Ids.signOut.tr,\n          style: TextStyle(fontSize: 17.sp, color: '#F53F3F'.getColor()),\n        ),\n      ),\n    );\n  }\n}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/page/home/profile_page.dart b/lib/page/home/profile_page.dart
--- a/lib/page/home/profile_page.dart	(revision a75092ddc33bcccbdd08673945d50590622e10d8)
+++ b/lib/page/home/profile_page.dart	(date 1724909944344)
@@ -3,6 +3,7 @@
 import 'package:application/res/strings.dart';
 import 'package:application/core/extension/double_ext.dart';
 import 'package:application/core/extension/string_parser_extension.dart';
+import 'package:application/utils/trace_utils.dart';
 import 'package:application/widget/widget/mp_scaffold.dart';
 import 'package:application/page/home/about_page.dart';
 import 'package:application/page/home/change_password_page.dart';
@@ -333,7 +334,8 @@
   checkOutView() {
     return GestureDetector(
       behavior: HitTestBehavior.opaque,
-      onTap: () {
+      onTap: () async{
+        await TraceEvent.collectSinceLoginTime();//发送本次启动的
         Get.find<LoginController>().logoutNewCtl();
       },
       child: Container(
Index: lib/page/clue_store/clue_store_detail_controller.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'package:application/const/store/store.dart';\nimport 'package:application/core/database/mp_application.dart';\nimport 'package:application/core/extension/pub_json_parse_utils.dart';\nimport 'package:application/core/http/http.dart';\nimport 'package:application/core/http/model/result_data.dart';\nimport 'package:application/core/pub_lib/pub_base_getx.dart';\nimport 'package:application/init/log.dart';\nimport 'package:application/model/system/option_model.dart';\nimport 'package:application/model/system/region_model.dart';\nimport 'package:application/page/clue_store/clue_store.dart';\nimport 'package:application/page/clue_store/clue_store_list_page.dart';\nimport 'package:application/page/menu/controller/dict_controller.dart';\nimport 'package:application/page/menu/model/dict_list_model.dart';\nimport 'package:application/page/store_customer/widget/customer_country_list_page.dart';\nimport 'package:application/page/store_customer/widget/finish_add_page.dart';\nimport 'package:application/page/store_customer/widget/search_customer_list_page.dart';\nimport 'package:application/page/store_sunda/components/map_dialog.dart';\nimport 'package:application/res/strings.dart';\nimport 'package:application/utils/location_utils.dart';\nimport 'package:application/utils/models/geo_res.dart';\nimport 'package:application/utils/mp_location_utils.dart';\nimport 'package:application/utils/navigator_utils.dart';\nimport 'package:application/utils/reverse_encoding_utils.dart';\nimport 'package:application/utils/smart_manager.dart';\nimport 'package:connectivity_plus/connectivity_plus.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/src/widgets/editable_text.dart';\nimport 'package:flutter_smart_dialog/flutter_smart_dialog.dart';\nimport 'package:geolocator/geolocator.dart';\nimport 'package:get/get.dart';\n\nclass ClueStoreDetailController extends BaseController{\n  final _apiService = Get.find<ApiService>();\n  bool canEdit=true;\n\n  TextEditingController bossNameController=TextEditingController();\n  TextEditingController phoneNo=TextEditingController();\n  TextEditingController cityNameController=TextEditingController();\n  ///郡区\n  TextEditingController countyDistrictController=TextEditingController();\n  ///街道\n  TextEditingController street=TextEditingController();\n  ///详细地址\n  TextEditingController fullStreet=TextEditingController();\n  ///录入人\n  TextEditingController entryPerson=TextEditingController();\n\n  late ClueStoreItem store;\n\n  String title=\"\";\n  ///所在国家\n  TextEditingController countryName=TextEditingController();\n  String _countryCode=\"\";\n  ///行政国家\n  TextEditingController adminCountryName=TextEditingController();\n  String _adminCountryNameCode=\"\";\n  ///省份\n  TextEditingController provinceName=TextEditingController();\n  String _provinceCode=\"\";\n  ///经销商\n  TextEditingController affiliatedDealerName=TextEditingController();\n  TextEditingController affiliatedDealerCode1=TextEditingController();\n  String affiliatedDealerCode=\"\";\n  RxString areaCode=Ids.areaCode.tr.obs;\n  List<LabelOptionModel>? images;\n\n  RxDouble longitude=0.0.obs;\n  RxDouble latitude=0.0.obs;\n\n  List<String> areaCodes=[];\n\n  List<DictItemModel> countryList=[];\n\n  List<RegionItemModel> _provinceList=[];\n\n  RxBool canSubmit=false.obs;\n\n  /// bool 是否手动填写地址信息\n  bool isManual = false;\n  ///地理信息\n  GeoRes? _geoRes;\n\n  @override\n  void onInit() {\n    super.onInit();\n    ClueStoreItem? store=Get.arguments;\n\n    if(store==null){\n      this.store=ClueStoreItem();\n      title=Ids.addClueStore.tr;\n      entryPerson.text=MpApplication.instance.authInfoModel?.userName??\"\";\n      affiliatedDealerName.text='Cash client Scattered Customers';//产品说线索门店所属经销商都归属到688\n      affiliatedDealerCode=\"688\";\n      affiliatedDealerCode1.text=\"688\";\n      getLocation();\n    }else{\n      title=Ids.clueStoreDetail.tr;\n      canEdit=false;\n      getClueStoreDetail(store.id??\"\");\n    }\n\n    _getAreaCodeFromDic();\n  }\n\n\n  void getClueStoreDetail(String id)async{\n    try{\n      ResultData resultData=await _apiService.getDetail({\"id\":id});\n      if(resultData.isSuccess()){\n        store=ClueStoreItem.fromJson(resultData.data);\n        bossNameController.text=store.legalPersonName??\"\";\n        cityNameController.text=store.addressCity??\"\";\n        countyDistrictController.text=store.addressRegion??\"\";\n        images=store.attachments;\n        latitude.value=store.latitude??0;\n        longitude.value=store.longitude??0;\n        countryName.text=store.addressCountryName??\"\";\n        _countryCode=store.addressCountryCode??\"\";\n        //行政国家\n        adminCountryName.text=countryList\n            .firstWhere((element) => element.dictKey == (store.countryCode ?? ''))\n            .dictValue??\"\";\n        _adminCountryNameCode=store.countryCode??\"\";\n        provinceName.text=store.addressProvinceName ?? '';\n        _provinceCode=store.addressProvinceCode ?? '';\n        cityNameController.text=store.addressCity ?? '';\n        countyDistrictController.text=store.addressRegion??\"\";\n        street.text=store.addressStreet ?? '';\n        entryPerson.text=store.createUserName??\"\";\n        areaCode.value=store.dialingCode??\"\";\n        phoneNo.text=store.phoneNo??\"\";\n        fullStreet.text=store.addressDetail??\"\";\n        affiliatedDealerName.text=store.belongBaseCustomerName??\"\";\n        affiliatedDealerCode=store.belongBaseCustomerCode??\"\";\n        affiliatedDealerCode1.text=store.belongBaseCustomerCode??\"\";\n      }\n    }catch(e,s){\n      Log.e(e, s);\n    }\n  }\n\n  Future<void> _getAreaCodeFromDic() async {\n     DictController dictController = Get.find();\n    ///字典中获取到的区号\n    List<DictItemModel> areaCodeDic = dictController.getDict(Store.TELEPHONE_AREA_CODE);\n    if (areaCodeDic.isEmpty) {\n      areaCodeDic = await dictController.getDictItem(Store.TELEPHONE_AREA_CODE);\n    }\n     areaCodes.addAll(areaCodeDic.map((e) => e.dictKey!).toList());\n     countryList.addAll(dictController.gcCountry);\n\n  }\n\n\n  void selectCountry(){\n    NavigatorUtils.pushPage(CustomerCountryListPage.routeName,\n        arguments: CustomerCountryListAr(\n            countries: countryList,\n            onSelected: (value) {\n              countryName.text=value.dictValue??\"\";\n              _countryCode=value.dictKey??\"\";\n            },\n            hintText: Ids.selectCountry.tr,\n        ));\n  }\n\n  void selectArea()async{\n    await _getProvinceLists();\n    NavigatorUtils.pushPage(CustomerCountryListPage.routeName,\n        arguments: CustomerCountryListAr(\n            provinces: _provinceList,\n            onProvinceSelected: (value) {\n              provinceName.text = value.regionName ?? '';\n              _provinceCode = value.regionCode ?? '';\n            },\n            hintText: Ids.selectProvinceRegion.tr,\n            initIndex: provinceName.text));\n  }\n\n\n  void selectAdminCountry(){\n    NavigatorUtils.pushPage(CustomerCountryListPage.routeName,\n        arguments: CustomerCountryListAr(\n            countries: countryList,\n            onSelected: (value) {\n              adminCountryName.text = value.dictValue ?? '';\n              _adminCountryNameCode=value.dictKey??'';\n            },\n            hintText: Ids.selectCountry.tr,\n            initIndex: adminCountryName.text));\n  }\n\n  void selectCustomer(){\n    NavigatorUtils.pushPage(SearchCustomerListPage.routeName,\n        arguments: SearchCustomerListAr((value) {\n          affiliatedDealerCode=value.code;\n          affiliatedDealerName.text=value.name;\n          Get.back(); //选择经销商后自动返回\n        }));\n  }\n\n  void getLocation({bool isError=false}) async{\n    if (isManual == true) {\n      return;\n    }\n    SmartManager().showBottomDialog(\n        GoogleMapDialog(\n          isError: isError,\n          onCancle: () {\n            isManual=true;\n          },\n          onConfirm: () {\n            isManual=false;\n            _setGeocoding();\n          },\n        ),\n        backDismiss: true,\n        clickMaskDismiss: false);\n  }\n\n  void _setGeocoding() async {\n    if (isManual) return;\n    try {\n      await _getGeocoding();\n      if (_geoRes != null) {\n        if (countryName.text.isEmpty) {\n          DictItemModel? dictItemModel = _getCountry(_geoRes?.country);\n          if (dictItemModel != null) {\n            countryName.text = dictItemModel.dictValue ?? '';\n            _countryCode = dictItemModel.dictKey ?? '';\n          }\n        }\n        if (provinceName.text.isEmpty) {\n          provinceName.text = _geoRes?.province?.sn ?? '';\n        }\n        if (cityNameController.text.isEmpty) {\n          cityNameController.text = _geoRes?.city?.sn ?? '';\n        }\n        if (countyDistrictController.text.isEmpty) {\n          countyDistrictController.text = _geoRes?.district?.sn ?? '';\n        }\n        if (street.text.isEmpty) {\n          street.text = _geoRes?.street?.sn ?? '';\n        }\n        if (fullStreet.text.isEmpty) {\n          fullStreet.text = _geoRes?.address?.sn ?? '';\n        }\n      } else {\n        getLocation(isError: true);\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n  }\n\n  /// 查询获取到的国家\n  DictItemModel? _getCountry(PositionItem? country) {\n    DictItemModel? res;\n    try {\n      DictItemModel? item = countryList.firstWhere(\n              (element) => element.dictKey == country?.sn || element.dictKey == country?.ln,\n          orElse: () => DictItemModel());\n      if (item.dictKey != null) {\n        res = item;\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n    return res;\n  }\n\n  ///获取地理信息\n  Future<Map<String, double>> _getGeocoding({bool? showLoading}) async {\n    double latitude = 0;\n    double longitude = 0;\n    bool isShow = false;\n    try {\n      Position? position = await LocationUtil.getLocation();\n\n      if (position != null) {\n        latitude = position.latitude;\n        longitude = position.longitude;\n        if (showLoading ?? false) {\n          isShow = true;\n          SmartDialog.showLoading(msg: \"getting...\");\n        }\n        _geoRes = await ReverseEncodingUtils().init().getReverseGeocodingNew(latitude, longitude);\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n    if ((showLoading ?? false) && isShow) {\n      SmartDialog.dismiss();\n    }\n    if (latitude != 0) {\n      this.latitude.value = latitude;\n      this.longitude.value = longitude;\n    }\n    return {'lat': latitude, 'lon': longitude};\n  }\n\n\n  _getProvinceLists() async{\n    try {\n      final res = await _apiService.getListByCountry({'countryCode': _countryCode});\n      if (res.isSuccess()) {\n        _provinceList = res.data as List<RegionItemModel>;\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n      SmartManager().showCenterToast(e.toString());\n    }\n  }\n\n\n  bool _paramValidate(Map<String,dynamic> form){\n    if((images?.length??0)<2||images![0].value==null||images![1].value==null){\n      SmartManager().showCenterToast(Ids.pleaseAddTwoPictures.tr);\n      return false;\n    }\n\n    if(areaCode.isEmpty){\n      SmartManager().showCenterToast(Ids.pleaseSelectTheAreaCode.tr);\n      return false;\n    }\n\n    if(longitude.value==0&&latitude.value==0){\n      SmartManager().showCenterToast(Ids.pleaseGetTheLocation.tr);\n      return false;\n    }\n    form.put(\"dialingCode\",areaCode.value);\n    form.put(\"attachments\",images!.map((e) => e.toJson()).toList());\n    form.put(\"latitude\", latitude.value);\n    form.put(\"longitude\", longitude.value);\n    form.put(\"addressCountryCode\", _countryCode);\n    form.put(\"addressProvinceCode\", _provinceCode);\n    form.put(\"countryCode\", _adminCountryNameCode);\n    // form.put(\"belongBaseCustomerCode\", affiliatedDealerCode);\n    form.put(\"belongBaseCustomerCodeName\", affiliatedDealerName.text);\n    return true;\n  }\n  handleCreate(Map<String,dynamic> form)async{\n    try {\n      //补充一些没被表单组件控制的必要字段 (图片、区号，定位，国家编码，地区编码)\n      if(!_paramValidate(form)) return;\n      final res = await _apiService.createClueStore(form);\n      if (res.isSuccess()) {\n        SmartManager().showCenterToast(Ids.createdSuccessfully.tr);\n        NavigatorUtils.pushPage(FinishAddPage.routeName, arguments: FinishAddAr((value) {\n          if (value is bool) {\n            NavigatorUtils.offHasPage(ClueStoreListPage.routeName);\n          }\n        }));\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n      SmartManager().showCenterToast(e.toString());\n    }\n  }\n\n\n\n  areaCodeSelect(int index) {\n    areaCode.value=areaCodes[index];\n  }\n\n  void handleImageCallback(List<LabelOptionModel> value) {\n    images = value;\n  }\n\n\n}
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/page/clue_store/clue_store_detail_controller.dart b/lib/page/clue_store/clue_store_detail_controller.dart
--- a/lib/page/clue_store/clue_store_detail_controller.dart	(revision a75092ddc33bcccbdd08673945d50590622e10d8)
+++ b/lib/page/clue_store/clue_store_detail_controller.dart	(date 1724837156295)
@@ -200,9 +200,6 @@
   }
 
   void getLocation({bool isError=false}) async{
-    if (isManual == true) {
-      return;
-    }
     SmartManager().showBottomDialog(
         GoogleMapDialog(
           isError: isError,
Index: lib/page/menu/controller/login_controller.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'package:application/config/flavors.dart';\nimport 'package:application/const/home/auth.dart';\nimport 'package:application/core/database/auth_info_manager.dart';\nimport 'package:application/core/database/db_helper.dart';\nimport 'package:application/core/database/mp_application.dart';\nimport 'package:application/core/http/apiServiceMethod.dart';\nimport 'package:application/core/http/http.dart';\nimport 'package:application/core/mp_core_config.dart';\nimport 'package:application/init/log.dart';\nimport 'package:application/model/auth/auth_info_model.dart';\nimport 'package:application/page/menu/login.dart';\nimport 'package:application/page/menu/phone_modify_page.dart';\nimport 'package:application/page/store_sunda/model/dealer_info_model.dart';\nimport 'package:application/res/strings.dart';\nimport 'package:application/utils/navigator_utils.dart';\nimport 'package:application/utils/toast_utils.dart';\nimport 'package:get/get.dart';\nimport 'package:application/core/pub_lib/model/language_model.dart';\nimport 'package:application/core/http/model/result_data.dart';\nimport 'package:application/core/pub_lib/pub_base_getx.dart';\nimport 'package:application/core/pub_lib/utils/language_util.dart';\nimport 'package:sp_util/sp_util.dart';\nimport 'package:application/core/database/cache_manager.dart';\nimport 'package:application/widget/widget/controller/watermark_wrapper_controller.dart';\nimport 'package:application/utils/smart_manager.dart';\nimport 'package:application/page/home/model/system_style_model.dart';\nimport 'package:application/page/index.dart';\nimport 'package:application/page/menu/password_modify_page.dart';\n\nclass LoginBindings extends BaseBindings {\n  @override\n  void dependencies() {\n    Get.lazyPut<LoginController>(() => LoginController());\n  }\n}\n\nclass LoginController extends BaseController {\n  final _apiService = Get.find<ApiService>();\n\n  // Rx<PageListState<MenuListModel>> searchList =\n  //     PageListState<MenuListModel>(viewState: SDViewState.Init, pageSize: 20).obs;\n\n  // void getTenant() {\n  //   XHttp().get(\"/blade-system/tenant/info\",\n  //       {\"domain\": \"http://dev.smdp.sunda.top\"}).then((response) {\n  //     PrintUtil.print(response['data']);\n  //   }).catchError((onError) {\n  //     PrintUtil.print(onError);\n  //   });\n  // }\n\n  ///当前组织选中的组织\n  int currentOrganizeIndex = 0;\n\n  /// 获取用户设置信息\n  Future getUserSetting(UserInfo? userInfo) async {\n    /// 获取用户系统配置\n    ResultData resultData = await _apiService.systemStyleConfig(userInfo?.id);\n    if (resultData.isSuccess()) {\n      SystemStyleModel model = resultData.data;\n      SpUtil.putString(MpCoreConfig.TIME_ZONE, model.timeZone ?? '');\n      SpUtil.putString(MpCoreConfig.IPO_STATUS, model.ipoStatus ?? '');\n      SpUtil.putString(MpCoreConfig.SALE_UNIT, model.saleUnitCode ?? '');\n      SpUtil.putString(MpCoreConfig.SYSTEM_SETTING_ID, model.id.toString() ?? '');\n      SpUtil.putString(MpCoreConfig.Language, model.language ?? '');\n      SpUtil.putString(MpCoreConfig.SYSTEM_COLOR, model.color ?? '');\n\n      ///语言提前初始化\n      if (model.language != null) {\n        List<LanguageModel> languages = [\n          LanguageModel('English', 'en', 'US'),\n          LanguageModel('简体中文', 'zh', 'CN'),\n          LanguageModel('France', 'fr', 'FR'),\n        ];\n        List<LanguageModel> langs = languages.where((element) => element.languageCode == model.language).toList();\n        LanguageModel currentLangModel = langs.isEmpty ? languages.first : langs.first;\n        LanguageUtil.setLocalModel(currentLangModel, false);\n      }\n    }\n  }\n\n  ///语言切换\n  List<LanguageModel> languages = [\n    LanguageModel('English', 'en', 'US'),\n    LanguageModel('简体中文', 'zh', 'CN'),\n    LanguageModel('France', 'fr', 'FR'),\n  ];\n\n  ///控制登录按钮是否可点击\n  RxBool canSubmit = false.obs;\n\n  // 登陆\n  void loginMethod(String username, String password) async {\n    try {\n      SpUtil.putString(MpCoreConfig.TIME_ZONE, '');\n      Map<String, dynamic> map = {\n        \"username\": username,\n        \"password\": password,\n        \"grant_type\": \"password\",\n        \"scope\": \"all\",\n        \"type\": \"account\"\n      };\n      SdData res = await ApiServiceMethod.loginMethod(map);\n      if (res.code == 200 && res.data is Map) {\n        AuthInfoModel authResult = AuthInfoModel.fromJson(res.data);\n        await _setToken(authResult);\n        _onSuccess(authResult);\n      } else {\n        _onError(res.message ?? '');\n      }\n    } catch (e, s) {\n      Log.e(e, s);\n      _onError('err');\n    }\n  }\n\n  /// 退出登录, 退出登录位置\n  /// 1，个人中心退出登录\n  /// 2，修改电话号后退出登录\n  /// 3，首次登录\n  /// 4，修改密码后退出登录\n  Future<void> logoutNewCtl() async {\n    try {\n      await ApiServiceMethod.logoutMethod();\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n    try {\n      AuthInfoManager.getInstance()?.deleteUserInfo();\n      // 移除菜单按钮缓存\n      SpUtil.remove(MpCoreConfig.BottomMenus);\n      SpUtil.remove(MpCoreConfig.HomeMenus);\n      SpUtil.remove(MpCoreConfig.Buttons);\n      SpUtil.remove(MpCoreConfig.ClientType);\n      Get.offAllNamed(LoginPage.routeName);\n      Get.find<WatermarkWrapperController>().resetWatermarkText();\n      Get.find<CacheManager>().refresh();\n      DateBaseHelper().saveDictList({});\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n  }\n\n  _setToken(AuthInfoModel authResult) async {\n    AuthInfoManager? manager = AuthInfoManager.getInstance();\n    await manager?.insertAuthInfo(authResult);\n  }\n\n  // 登陆成功\n  void _onSuccess(AuthInfoModel authResult) async {\n    NavigatorUtils.pop();\n    UserInfo? userInfo = authResult.userInfo;\n    if (userInfo?.firstLoginPassword == \"Y\") {\n      //首次登录，强制修改密码\n      NavigatorUtils.pushPage(PasswordModifyPage.routeName, arguments: '');\n    } else if (userInfo?.loginPhoneVerify == \"N\") {\n      //强制验证手机号\n      NavigatorUtils.pushPage(PhoneModifyPage.routeName, arguments: AuthConst.FORCE_CHANGE_PHONE);\n    } else {\n      // 登陆成功，跳转首页，删除登陆页，防止返回\n      // ToastUtils.toast(Ids.loginSuccess.tr);\n      ///登录增加权限提示\n      SmartManager().showPermissionAlertDialog(\n          title: Ids.locationPermissionDisclosure.tr,\n          txt: Ids.locationPermissionTxt.tr,\n          callBack: () => {NavigatorUtils.replaceRoute(MainHomePage.routeName)});\n    }\n  }\n\n  // 登陆失败\n  void _onError(String error) {\n    NavigatorUtils.pop();\n    ToastUtils.toast(error);\n  }\n\n  ///如果是经销商端，则需要获取经销商信息存放在数据库中\n  Future<void> getDealerInfo() async {\n    Map<String, dynamic> map = {'customerCode': MpApplication.customerCode};\n    ResultData resultData = await _apiService.getDealerInfoMethod(map);\n    if (resultData.isSuccess()) {\n      if (resultData.data is DealerInfoModel) {\n        DealerInfoModel dealerInfoModel = resultData.data;\n\n        ///先在数据库找到是否存在这个数据\n        DealerInfoModel? model = await DateBaseHelper().getDealerInfo();\n        DateBaseHelper().saveDealerInfo(dealerInfoModel\n          ..ids = model?.ids\n          ..customerCode = MpApplication.customerCode\n          ..clientType = F.clientType);\n      }\n    }\n  }\n}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/page/menu/controller/login_controller.dart b/lib/page/menu/controller/login_controller.dart
--- a/lib/page/menu/controller/login_controller.dart	(revision a75092ddc33bcccbdd08673945d50590622e10d8)
+++ b/lib/page/menu/controller/login_controller.dart	(date 1724912338180)
@@ -1,3 +1,5 @@
+import 'dart:io';
+
 import 'package:application/config/flavors.dart';
 import 'package:application/const/home/auth.dart';
 import 'package:application/core/database/auth_info_manager.dart';
@@ -6,6 +8,7 @@
 import 'package:application/core/http/apiServiceMethod.dart';
 import 'package:application/core/http/http.dart';
 import 'package:application/core/mp_core_config.dart';
+import 'package:application/core/pub_lib/config/core_config.dart';
 import 'package:application/init/log.dart';
 import 'package:application/model/auth/auth_info_model.dart';
 import 'package:application/page/menu/login.dart';
@@ -14,6 +17,7 @@
 import 'package:application/res/strings.dart';
 import 'package:application/utils/navigator_utils.dart';
 import 'package:application/utils/toast_utils.dart';
+import 'package:application/utils/trace_utils.dart';
 import 'package:get/get.dart';
 import 'package:application/core/pub_lib/model/language_model.dart';
 import 'package:application/core/http/model/result_data.dart';
@@ -159,6 +163,7 @@
     } else {
       // 登陆成功，跳转首页，删除登陆页，防止返回
       // ToastUtils.toast(Ids.loginSuccess.tr);
+      _basicTrace();
       ///登录增加权限提示
       SmartManager().showPermissionAlertDialog(
           title: Ids.locationPermissionDisclosure.tr,
@@ -167,6 +172,18 @@
     }
   }
 
+  ///记录登录设备基础信息
+  void _basicTrace() async{
+    BasicInfoTraceEvent.trace(
+      buildVersion: CoreConfig.BUILD_NUMBER,
+      versionName: CoreConfig.VERSION,
+      deviceModel: CoreConfig.DEVICE_NAME,
+      deviceOS: CoreConfig.OS,
+      deviceOsVersion: CoreConfig.OS_VERSION,
+    );
+    TraceEvent.loginTime=DateTime.now();
+  }
+
   // 登陆失败
   void _onError(String error) {
     NavigatorUtils.pop();
Index: lib/core/database/db_manager.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>import 'package:application/init/log.dart';\nimport 'package:application/model/store/store_model.dart';\nimport 'package:application/model/system/sale_unit_model.dart';\nimport 'package:application/page/menu/model/dict_cache_model.dart';\nimport 'package:application/page/store_sunda/model/dealer_info_model.dart';\nimport 'package:application/page/store_sunda/model/store_list_model.dart';\nimport 'package:flutter/material.dart';\nimport 'package:isar/isar.dart';\nimport 'package:path_provider/path_provider.dart';\n\nclass DatabaseManager {\n  static DatabaseManager? _instance;\n\n  static DatabaseManager getInstance() {\n    _instance ??= DatabaseManager._internal();\n    return _instance!;\n  }\n\n  DatabaseManager._internal();\n\n  Isar? isar;\n\n  ///初始化数据库\n  Future<void> initDb() async {\n    try {\n      final dir = await getApplicationDocumentsDirectory();\n      isar = await Isar.open([\n        ///销售单位信息\n        SaleUnitModelSchema,\n\n        ///经销商门店列表\n        StoreListModelSchema,\n\n        ///经销商信息\n        DealerInfoModelSchema,\n\n        ///门店详情\n        StoreModelSchema,\n\n        ///字典\n        DictCacheModelSchema\n      ], directory: dir.path, name: 'crm-db');\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n  }\n\n  ///写入或者修改数据库\n  Future<void> saveData(Function() fun) async {\n    try {\n      await isar?.writeTxn(() async {\n        try {\n          await fun();\n        } catch (e, s) {\n          Log.e(e, s);\n          debugPrint('saveData  error--- ${e.toString}');\n        }\n      });\n    } catch (e, s) {\n      Log.e(e, s);\n    }\n  }\n}\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/core/database/db_manager.dart b/lib/core/database/db_manager.dart
--- a/lib/core/database/db_manager.dart	(revision a75092ddc33bcccbdd08673945d50590622e10d8)
+++ b/lib/core/database/db_manager.dart	(date 1724653390625)
@@ -4,6 +4,7 @@
 import 'package:application/page/menu/model/dict_cache_model.dart';
 import 'package:application/page/store_sunda/model/dealer_info_model.dart';
 import 'package:application/page/store_sunda/model/store_list_model.dart';
+import 'package:application/utils/models/isar_tracking_model.dart';
 import 'package:flutter/material.dart';
 import 'package:isar/isar.dart';
 import 'package:path_provider/path_provider.dart';
@@ -38,7 +39,10 @@
         StoreModelSchema,
 
         ///字典
-        DictCacheModelSchema
+        DictCacheModelSchema,
+
+        ///日志
+        IsarTrackingModelSchema
       ], directory: dir.path, name: 'crm-db');
     } catch (e, s) {
       Log.e(e, s);
