diff --git a/lib/main.dart b/lib/main.dart index 16a4405..ee91a01 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -34,7 +34,7 @@ void main() async { onReceiveNotification: (Map message) async { print("flutter onReceiveNotification: $message"); LoggerData.addData(message); - await JpushMessageParse(message).shot(); + await JpushMessageParse(message).shot(); }, // 点击通知回调方法。 onOpenNotification: (Map message) async { @@ -51,7 +51,9 @@ void main() async { production: false, debug: true, // 设置是否打印 debug 日志 ); - print(jpush.getRegistrationID()); + String id = await JPush().getRegistrationID(); + print(id); + LoggerData.addData(id); runApp(MyApp()); } diff --git a/lib/ui/manage_pages/inspection_manage/inspection_manage_details_page.dart b/lib/ui/manage_pages/inspection_manage/inspection_manage_details_page.dart index 0351643..8c8241a 100644 --- a/lib/ui/manage_pages/inspection_manage/inspection_manage_details_page.dart +++ b/lib/ui/manage_pages/inspection_manage/inspection_manage_details_page.dart @@ -179,8 +179,7 @@ class _InspectionManageDetailsPageState Barcode result = await Get.to(() => QrScannerPage()); BaseModel baseModel = await ManageFunc.getInspectionFindCheckDetailByQr( - _detailModel.id, - QRCodeParase.getExecutePointId(result.code)); + _detailModel.id, result.code); if (baseModel.status) { Get.to(() => InspectionPointInputPage( inspectionName: _detailModel.name, @@ -536,9 +535,7 @@ class _InspectionManageDetailsPageState color: Colors.red, width: 10.w, )); - setState(() { - - }); + setState(() {}); } else { _polylines[0] = (Polyline( points: _points, diff --git a/lib/ui/splash/splash_page.dart b/lib/ui/splash/splash_page.dart index 31479b4..9c8488f 100644 --- a/lib/ui/splash/splash_page.dart +++ b/lib/ui/splash/splash_page.dart @@ -11,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart' hide Response; import 'package:hive/hive.dart'; import 'package:hive_flutter/hive_flutter.dart'; +import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:power_logger/power_logger.dart'; @@ -63,6 +64,7 @@ class _SplashPageState extends State { }); Future.delayed(Duration(milliseconds: 2000), () async { await _initOp(); + Get.off(HomePage()); }); } diff --git a/lib/ui/sub_pages/manage_func.dart b/lib/ui/sub_pages/manage_func.dart index fd9e8fd..01634a1 100644 --- a/lib/ui/sub_pages/manage_func.dart +++ b/lib/ui/sub_pages/manage_func.dart @@ -62,10 +62,10 @@ class ManageFunc { } static Future getInspectionFindCheckDetailByQr( - int executeId, int excutePointId) async { + int executeId, String executePointCode) async { BaseModel baseModel = await NetUtil().get( API.manage.inspectionFindCheckDetailByQR, - params: {"executeId": executeId, "executePointId": excutePointId}); + params: {"executeId": executeId, "executePointCode": executePointCode}); return baseModel; }