1,修复卸载后首次登录问题

2,完成Android端操作记录文件在线查看及分享功能
This commit is contained in:
吴亚茜 2024-06-25 10:44:26 +08:00
parent 103570a97b
commit 8b9bbb012f
5 changed files with 18 additions and 11 deletions

View File

@ -53,11 +53,13 @@ class StarLockLoginLogic extends BaseGetXController {
Storage.saveLoginData(entity.data);
Storage.setBool(saveIsVip, entity.data!.isVip == 1);
eventBus.fire(MineInfoChangeRefreshUI());
await XSJPushProvider().initJPushService();
await XSJPushProvider().bindDeviceID();
XSJPushProvider().initLocalNotification(isCancelLocalPush: false);
Get.offNamedUntil(Routers.starLockMain, (Route route) => false);
BlueManage().scanDevices.clear(); //
// JPush服务并绑定设备ID
final XSJPushProvider jpushProvider = XSJPushProvider();
await jpushProvider.initJPushService();
await jpushProvider.bindDeviceID();
await jpushProvider.initLocalNotification(isCancelLocalPush: false);
}
}

View File

@ -33,7 +33,7 @@ FutureOr<void> main() async {
final bool isLogin = await getLoginStatus();
if (isLogin) {
await privacySDKInitialization();
Future<void>.delayed(const Duration(milliseconds: 500), () async{
Future<void>.delayed(const Duration(milliseconds: 500), () async {
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
@ -80,5 +80,7 @@ Future<void> _setCommonServices() async {
Future<void> privacySDKInitialization() async {
await Get.putAsync(() => PlatformInfoService().init());
await BuglyTool.init();
await XSJPushProvider().initJPushService();
// JPush服务
final XSJPushProvider jpushProvider = XSJPushProvider();
await jpushProvider.initJPushService();
}

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:open_file/open_file.dart';
import 'package:open_filex/open_filex.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/main/lockDetail/doorLockLog/exportSuccess/exportSuccess_logic.dart';
import 'package:star_lock/main/lockDetail/doorLockLog/exportSuccess/exportSuccess_state.dart';
@ -73,10 +73,11 @@ class _ExportSuccessPageState extends State<ExportSuccessPage> with RouteAware {
height: 60.h,
),
SubmitBtn(
btnName: '立即查看'.tr,
onClick: () {
OpenFile.open(state.getFilePath.value);
}),
btnName: '立即查看'.tr,
onClick: () {
OpenFilex.open(state.getFilePath.value);
},
),
SizedBox(
height: 20.h,
),

View File

@ -43,6 +43,7 @@ class XSJPushProvider {
);
addJPushEventHandler();
AppLog.log('JPush initialized.');
}
//

View File

@ -217,7 +217,8 @@ dependencies:
file_picker: ^5.3.1
# 错误日志监控
flutter_bugly_plugin: ^0.0.9
open_file: ^3.3.2
open_filex: ^4.4.0
dependency_overrides:
#强制设置google_maps_flutter_ios 为 2.5.2