From 90198aad623b7a5f78d671aab957397f83c14484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyanghuaxuan=E2=80=9D?= <“646903573@qq.com”> Date: Tue, 12 Jan 2021 11:46:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8E=BB=E9=99=A4=E5=BB=B6=E6=97=B6=E6=92=A4?= =?UTF-8?q?=E9=94=80=E5=90=AF=E5=8A=A8=E9=A1=B5=202.=E6=8A=8A=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E9=A1=B5=E6=92=A4=E9=94=80=E7=A7=BB=E5=88=B0HomePage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhios/zhiying_base_widget_example/MainActivity.java | 2 +- lib/pages/home_page/home_page.dart | 4 ++++ lib/pages/launch_page/launch_page.dart | 8 +++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java b/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java index 472c5f3..669d551 100644 --- a/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java +++ b/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java @@ -139,7 +139,7 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN Map map = new HashMap(); map.put("domain", "http://inapi.izhyin.cn/"); //"http://120.76.175.204:8989"); // map.put("domain", "http://192.168.0.113:5000"); - map.put("master_id", "ios_review"); + map.put("master_id", "963258"); map.put("secret_key", "123456"); // map.put("token", "123465"); return map; diff --git a/lib/pages/home_page/home_page.dart b/lib/pages/home_page/home_page.dart index fe836d7..4fc0979 100644 --- a/lib/pages/home_page/home_page.dart +++ b/lib/pages/home_page/home_page.dart @@ -52,6 +52,10 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker @override void initState() { + Timer(Duration(milliseconds: 0), (){ + NativeUtil.notifyInitSuccess(); + }); + ///初始化一些数据 initAsync(); diff --git a/lib/pages/launch_page/launch_page.dart b/lib/pages/launch_page/launch_page.dart index f896c13..c2db4e4 100644 --- a/lib/pages/launch_page/launch_page.dart +++ b/lib/pages/launch_page/launch_page.dart @@ -62,10 +62,6 @@ class _LaunchPageState extends State with TickerProviderStateMixin { print('ConnectivityResult.wifi'); Application.init().then((_) async { - Timer(Duration(milliseconds: 300), (){ - NativeUtil.notifyInitSuccess(); - }); - PackageInfo packageInfo = await PackageInfo.fromPlatform(); String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber); String currentVersionCode = packageInfo.buildNumber?.toString() ?? ''; @@ -131,8 +127,10 @@ class _LaunchPageState extends State with TickerProviderStateMixin { guideImages.add(data); } } - + NativeUtil.notifyInitSuccess(); await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide, guideImages))); + + } } catch (e) { throw "引导图加载失败";