修改 巡更管理 二维码扫描接口

打印 极光推送id
hmxc
张萌 4 years ago
parent 8609822a8e
commit c336776930

@ -34,7 +34,7 @@ void main() async {
onReceiveNotification: (Map<String, dynamic> message) async { onReceiveNotification: (Map<String, dynamic> message) async {
print("flutter onReceiveNotification: $message"); print("flutter onReceiveNotification: $message");
LoggerData.addData(message); LoggerData.addData(message);
await JpushMessageParse(message).shot(); await JpushMessageParse(message).shot();
}, },
// //
onOpenNotification: (Map<String, dynamic> message) async { onOpenNotification: (Map<String, dynamic> message) async {
@ -51,7 +51,9 @@ void main() async {
production: false, production: false,
debug: true, // debug debug: true, // debug
); );
print(jpush.getRegistrationID()); String id = await JPush().getRegistrationID();
print(id);
LoggerData.addData(id);
runApp(MyApp()); runApp(MyApp());
} }

@ -179,8 +179,7 @@ class _InspectionManageDetailsPageState
Barcode result = await Get.to(() => QrScannerPage()); Barcode result = await Get.to(() => QrScannerPage());
BaseModel baseModel = BaseModel baseModel =
await ManageFunc.getInspectionFindCheckDetailByQr( await ManageFunc.getInspectionFindCheckDetailByQr(
_detailModel.id, _detailModel.id, result.code);
QRCodeParase.getExecutePointId(result.code));
if (baseModel.status) { if (baseModel.status) {
Get.to(() => InspectionPointInputPage( Get.to(() => InspectionPointInputPage(
inspectionName: _detailModel.name, inspectionName: _detailModel.name,
@ -536,9 +535,7 @@ class _InspectionManageDetailsPageState
color: Colors.red, color: Colors.red,
width: 10.w, width: 10.w,
)); ));
setState(() { setState(() {});
});
} else { } else {
_polylines[0] = (Polyline( _polylines[0] = (Polyline(
points: _points, points: _points,

@ -11,6 +11,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart' hide Response; import 'package:get/get.dart' hide Response;
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:jpush_flutter/jpush_flutter.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:power_logger/power_logger.dart'; import 'package:power_logger/power_logger.dart';
@ -63,6 +64,7 @@ class _SplashPageState extends State<SplashPage> {
}); });
Future.delayed(Duration(milliseconds: 2000), () async { Future.delayed(Duration(milliseconds: 2000), () async {
await _initOp(); await _initOp();
Get.off(HomePage()); Get.off(HomePage());
}); });
} }

@ -62,10 +62,10 @@ class ManageFunc {
} }
static Future<BaseModel> getInspectionFindCheckDetailByQr( static Future<BaseModel> getInspectionFindCheckDetailByQr(
int executeId, int excutePointId) async { int executeId, String executePointCode) async {
BaseModel baseModel = await NetUtil().get( BaseModel baseModel = await NetUtil().get(
API.manage.inspectionFindCheckDetailByQR, API.manage.inspectionFindCheckDetailByQR,
params: {"executeId": executeId, "executePointId": excutePointId}); params: {"executeId": executeId, "executePointCode": executePointCode});
return baseModel; return baseModel;
} }

Loading…
Cancel
Save