From d14598b00767e54e94656036afb917a1c9f685d7 Mon Sep 17 00:00:00 2001 From: Weller <1812208341@qq.com> Date: Wed, 25 Nov 2020 16:20:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9C=BA=E6=99=AF=E8=BF=98?= =?UTF-8?q?=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dart_tool/package_config.json | 8 +- example/android/app/build.gradle | 5 + example/ios/Podfile.lock | 11 ++ example/ios/Runner/Runner.entitlements | 8 ++ .../cnzhioszhiying_dev-2.mobileprovision | Bin 0 -> 9193 bytes .../证书/zhiying_appstore.mobileprovision | Bin 0 -> 7689 bytes example/lib/main.dart | 8 +- lib/pages/home_page/home_page.dart | 77 ++++++++++++- .../wechat_teacher_page.dart | 105 +++++++++++++----- lib/utils/contants.dart | 4 + 10 files changed, 184 insertions(+), 42 deletions(-) create mode 100644 example/ios/Runner/项目资源/智莺生活/config/证书/cnzhioszhiying_dev-2.mobileprovision create mode 100644 example/ios/Runner/项目资源/智莺生活/config/证书/zhiying_appstore.mobileprovision diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index 0e9eb7e..045641f 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -301,6 +301,12 @@ "packageUri": "lib/", "languageVersion": "1.12" }, + { + "name": "moblink", + "rootUri": "file:///Users/fnuouser/.pub-cache/hosted/pub.flutter-io.cn/moblink-3.4.1", + "packageUri": "lib/", + "languageVersion": "2.1" + }, { "name": "mobsms", "rootUri": "file:///Users/fnuouser/.pub-cache/hosted/pub.flutter-io.cn/mobsms-1.1.0", @@ -662,7 +668,7 @@ "languageVersion": "2.8" } ], - "generated": "2020-11-25T02:26:02.961774Z", + "generated": "2020-11-25T07:42:55.235132Z", "generator": "pub", "generatorVersion": "2.8.2" } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 6f3b74b..da722a1 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -207,6 +207,11 @@ MobSDK { appKey "30dc33054b635" appSecret "396e98c293130c9976fb7428b6b434d6" + MobLink { + uriScheme "fnoos://cn.zhios.zhiying" + appLinkHost "bied.t4m.cn" + } + //手机验证登录 SecVerify {} diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index ac0ebc1..f99ba19 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -44,6 +44,8 @@ PODS: - Flutter - jdsdk (0.0.1): - Flutter + - mob_linksdk_pro (3.3.7): + - MOBFoundation - mob_secverify (3.0.1): - MOBFoundation - mob_sharesdk (4.3.11): @@ -96,6 +98,9 @@ PODS: - mob_smssdk (3.2.10): - MOBFoundation - MOBFoundation (3.2.19) + - moblink (0.0.4): + - Flutter + - mob_linksdk_pro - mobsms (0.0.1): - Flutter - mob_smssdk @@ -198,6 +203,7 @@ DEPENDENCIES: - image_picker (from `.symlinks/plugins/image_picker/ios`) - imei_plugin (from `.symlinks/plugins/imei_plugin/ios`) - jdsdk (from `.symlinks/plugins/jdsdk/ios`) + - moblink (from `.symlinks/plugins/moblink/ios`) - mobsms (from `.symlinks/plugins/mobsms/ios`) - package_info (from `.symlinks/plugins/package_info/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`) @@ -236,6 +242,7 @@ SPEC REPOS: - WindVane https://github.com/CocoaPods/Specs.git: - FMDB + - mob_linksdk_pro - mob_secverify - mob_sharesdk - mob_smssdk @@ -272,6 +279,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/imei_plugin/ios" jdsdk: :path: ".symlinks/plugins/jdsdk/ios" + moblink: + :path: ".symlinks/plugins/moblink/ios" mobsms: :path: ".symlinks/plugins/mobsms/ios" package_info: @@ -343,10 +352,12 @@ SPEC CHECKSUMS: image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd jdsdk: 2ca38c7e3a2dfb0f3641425f8fd1e8d20357693f + mob_linksdk_pro: 9ad768d8da15c410d51056319f43a76c7cc01347 mob_secverify: 54c03b24122be033bb53adb84694fd8c19f6c2b6 mob_sharesdk: e0d8b5807e6063cac8f9d68ef059b1d3006c9088 mob_smssdk: bd7493aa6f21e12b8daed8935c32c69552907d14 MOBFoundation: 606bc4c10ff4c6ac573c09f5081a39c75316bc7b + moblink: 3480a191e86c33f4e84af0cb5d2cc5627e78bf65 mobsms: 141956ad151a39a69a47a2ddf2e186405346c4ef mtopSDK: d6fdf81730342a69be920b576541c7bb81a683d5 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 diff --git a/example/ios/Runner/Runner.entitlements b/example/ios/Runner/Runner.entitlements index 903def2..ff13b9a 100644 --- a/example/ios/Runner/Runner.entitlements +++ b/example/ios/Runner/Runner.entitlements @@ -4,5 +4,13 @@ aps-environment development + com.apple.developer.applesignin + + Default + + com.apple.developer.associated-domains + + applinks:bied.t4m.cn + diff --git a/example/ios/Runner/项目资源/智莺生活/config/证书/cnzhioszhiying_dev-2.mobileprovision b/example/ios/Runner/项目资源/智莺生活/config/证书/cnzhioszhiying_dev-2.mobileprovision new file mode 100644 index 0000000000000000000000000000000000000000..57552a6a0ba1fdba76968c1fb204f1a9fc919d29 GIT binary patch literal 9193 zcmc&)d3aM*+9z#U%2p8sL6EQsQreumCKsW4Z?@iMX|uM8irzIzvo=eUlo4qWP(&GA zW@J%|IO4vri^_;Hh|7S0h%EBCprC*XsK|)&opeXb`2F!cGku;kIp>~p-sQZ%_x+ud zfTnR@^eUV@uYBIw0gB#v%}wJz1Wn_1=P49OKTz1KXYs)Nyb(QnfTkgt&S8q?rXhiX zrXkX_>oehyvR;ZO0@29yu}CQxtCS)_R18FX)5p4;h7!%#>&yC18>6e#Iz3f-Wh@j( zB$ZVz#>{G!V@p&jIu;8_DwWQuQ&yQ-hf@jHP^t9RvC6UjWHL5YrAnvMrCe@QsSpk4 z1}0Qh@n}qnC$na_SP7g^DkjCTP)zI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6TGDNNXbfW#;vEK*=@y3fS F{|okRRki>C literal 0 HcmV?d00001 diff --git a/example/lib/main.dart b/example/lib/main.dart index 7fae307..a31fa4b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_alibc/flutter_alibc.dart'; @@ -34,11 +32,7 @@ class _MyAppState extends State { child: Text( "走神了~\n${error.exceptionAsString()}", style: - Theme - .of(context) - .textTheme - .title - .copyWith(color: Colors.redAccent), + Theme.of(context).textTheme.title.copyWith(color: Colors.redAccent), ), ); } diff --git a/lib/pages/home_page/home_page.dart b/lib/pages/home_page/home_page.dart index b112dcc..4c73bfe 100644 --- a/lib/pages/home_page/home_page.dart +++ b/lib/pages/home_page/home_page.dart @@ -3,8 +3,10 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:permission_handler/permission_handler.dart'; +import 'package:flutter/services.dart'; +import 'package:moblink/moblink.dart'; import 'package:provider/provider.dart'; import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/intellect_create.dart'; import 'package:zhiying_base_widget/dialog/global_dialog/notification_setting_dialog/notification_setting_dialog.dart'; @@ -26,6 +28,8 @@ class HomePage extends StatefulWidget { class _HomePageState extends State with WidgetsBindingObserver { int _currentIndex = 0; List> _data = List(); + static const EventChannel _eventChannel = + const EventChannel('JAVA_TO_FLUTTER'); @override void initState() { @@ -45,9 +49,43 @@ class _HomePageState extends State with WidgetsBindingObserver { TaobaoAuth.initAuth(context); _showPolicy(); + + Moblink.uploadPrivacyPermissionStatus(1, (bool success) {}); + + // 是安卓系统,Android场景还原的实现 + /*if (defaultTargetPlatform == TargetPlatform.android) { + + }*/ + + //app后台杀死时候的还原 + Moblink.restoreScene(_restore); + // 监听开始(传递监听到原生端,用户监听场景还原的数据回传回来) + _eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError); + super.initState(); } + // 场景还原,记录邀请码 + void _restore(MLSDKScene scene) { + const bool inProduction = const bool.fromEnvironment("dart.vm.product"); + if (!inProduction) { + // 非release环境,弹窗测试 + showAlert('要还原的路径为:' + scene.className + '\n' + scene.params.toString(), + context); + } + Logger.debug('要还原的路径为:' + scene.className); + try { + Map params = Map.from(scene.params); + if (params.containsKey('tgid')) { + String tgid = params['tgid'].toString(); + // 记录邀请码到本地 + SharedPreferencesUtil.setNetCacheResult(Constants.mobInvitedCode, tgid); + } + } catch (e) { + Logger.debug(e); + } + } + @override void dispose() { WidgetsBinding.instance.removeObserver(this); @@ -66,7 +104,7 @@ class _HomePageState extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { ScreenUtil.init(context, width: 750, height: 1334); - print('home_page build'); + Logger.debug('home_page build'); List> tabs = _data; if (tabs == null || tabs.length == 0) { return Scaffold(); @@ -173,13 +211,42 @@ class _HomePageState extends State with WidgetsBindingObserver { } } - String isShowNotiPermission = - await SharedPreferencesUtil.getStringValue(Constants.isShowNotiPermission); + String isShowNotiPermission = await SharedPreferencesUtil.getStringValue( + Constants.isShowNotiPermission); if (isShowNotiPermission == null || isShowNotiPermission != '1') { await NotificationSettingDialog.show(context); - await SharedPreferencesUtil.setStringValue(Constants.isShowNotiPermission, "1"); + await SharedPreferencesUtil.setStringValue( + Constants.isShowNotiPermission, "1"); } IntellectCreate.checkAndCreateFirst(context); } + + //app存在后台时候的还原 + void _onEvent(Object event) { + Logger.debug('返回的内容: $event'); + if (null != event) { + showAlert('要还原的路径为[活着]:$event', context); + } + } + + void _onError(Object error) { + Logger.debug('返回的错误'); + } + + void showAlert(String text, BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) => CupertinoAlertDialog( + title: new Text("提示"), + content: new Text(text), + actions: [ + new FlatButton( + child: new Text("OK"), + onPressed: () { + Navigator.of(context).pop(); + }, + ) + ])); + } } diff --git a/lib/pages/wechat_teacher_page/wechat_teacher_page.dart b/lib/pages/wechat_teacher_page/wechat_teacher_page.dart index 155deaa..07823ee 100644 --- a/lib/pages/wechat_teacher_page/wechat_teacher_page.dart +++ b/lib/pages/wechat_teacher_page/wechat_teacher_page.dart @@ -1,17 +1,17 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:fluttertoast/fluttertoast.dart'; import 'package:zhiying_base_widget/pages/wechat_teacher_page/bloc/wechat_teacher_bloc.dart'; import 'package:zhiying_base_widget/pages/wechat_teacher_page/bloc/wechat_teacher_repository.dart'; import 'package:zhiying_base_widget/pages/wechat_teacher_page/model/wechat_teacher_data_model.dart'; import 'package:zhiying_base_widget/pages/wechat_teacher_page/model/wechat_teacher_style_model.dart'; import 'package:zhiying_base_widget/pages/wechat_teacher_page/widgets/wechat_teacher_item.dart'; -import 'package:zhiying_base_widget/widgets/home/home_quick_entry/cached_network_image_util.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'bloc/wechat_teacher_state.dart'; + import 'bloc/wechat_teacher_event.dart'; -import 'package:fluttertoast/fluttertoast.dart'; +import 'bloc/wechat_teacher_state.dart'; /// /// 微信导师 @@ -24,7 +24,8 @@ class WechatTeacherPage extends StatelessWidget { @override Widget build(BuildContext context) { return BlocProvider( - create: (_) => WechatTeacherBloc(WechatTeacherRepository(data))..add(WechatTeacherInitEvent()), + create: (_) => WechatTeacherBloc(WechatTeacherRepository(data)) + ..add(WechatTeacherInitEvent()), child: _WechatTeacherPageContainer(), ); } @@ -32,10 +33,12 @@ class WechatTeacherPage extends StatelessWidget { class _WechatTeacherPageContainer extends StatefulWidget { @override - _WechatTeacherPageContainerState createState() => _WechatTeacherPageContainerState(); + _WechatTeacherPageContainerState createState() => + _WechatTeacherPageContainerState(); } -class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer> { +class _WechatTeacherPageContainerState + extends State<_WechatTeacherPageContainer> { TextEditingController _editingController; /// 是否绑定中 @@ -52,7 +55,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer setState(() { _isBinding = true; }); - BlocProvider.of(context).add(WechatTeacherBindEvent(teacherWxChat: wxAccount)); + BlocProvider.of(context) + .add(WechatTeacherBindEvent(teacherWxChat: wxAccount)); } } @@ -111,7 +115,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer ); } - Widget _createMainWidget(WechatTeacherStyleModel styleModel, WechatTeacherDataModel dataModel) { + Widget _createMainWidget( + WechatTeacherStyleModel styleModel, WechatTeacherDataModel dataModel) { return Scaffold( appBar: _createNav(styleModel), backgroundColor: HexColor.fromHex(styleModel?.bgColor ?? '#FFF5F5F5'), @@ -119,7 +124,7 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer child: SingleChildScrollView( child: Column( children: [ - _createHeader(styleModel,dataModel), + _createHeader(styleModel, dataModel), Padding( padding: const EdgeInsets.only(top: 15), child: CachedNetworkImage( @@ -179,7 +184,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer child: CupertinoTextField( onSubmitted: (val) => _bindTeacher(), controller: _editingController, - placeholder: styleModel?.nobindTeacherDialog?.inputHintText ?? '请填写邀请人邀请码/手机号码', + placeholder: styleModel?.nobindTeacherDialog?.inputHintText ?? + '请填写邀请人邀请码/手机号码', placeholderStyle: TextStyle(fontSize: 14), decoration: BoxDecoration(), ), @@ -196,13 +202,19 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer width: 130, height: 30, decoration: BoxDecoration( - color: HexColor.fromHex(styleModel?.commStyle?.btnBgColor ?? '#FF5A5A'), + color: HexColor.fromHex( + styleModel?.commStyle?.btnBgColor ?? '#FF5A5A'), borderRadius: BorderRadius.circular(15), ), child: Center( child: Text( - _isBinding ? '绑定中...' : styleModel?.nobindTeacherDialog?.btnText ?? '绑定邀请人', - style: TextStyle(color: HexColor.fromHex(styleModel?.commStyle?.btnTextColor ?? '#FFFFFFF'), fontSize: 14), + _isBinding + ? '绑定中...' + : styleModel?.nobindTeacherDialog?.btnText ?? '绑定邀请人', + style: TextStyle( + color: HexColor.fromHex( + styleModel?.commStyle?.btnTextColor ?? '#FFFFFFF'), + fontSize: 14), ), ), ), @@ -213,7 +225,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer } /// 绑定的UI - Widget _createBindWidget(WechatTeacherStyleModel styleModel, WechatTeacherDataModel dataModel) { + Widget _createBindWidget( + WechatTeacherStyleModel styleModel, WechatTeacherDataModel dataModel) { return Container( width: double.infinity, height: double.infinity, @@ -224,28 +237,47 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer width: 50, height: 50, // color: Colors.red, - child: CircleAvatar(child: CachedNetworkImage(imageUrl: dataModel?.teacherAvatar ??'',)), + child: CircleAvatar( + child: CachedNetworkImage( + imageUrl: dataModel?.teacherAvatar ?? '', + )), ), const SizedBox(width: 13), Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Text(dataModel?.teacherUsername ??'', style: TextStyle(fontSize: 15, color: HexColor.fromHex(styleModel?.teacherDialogTitleColor ?? '#3C3C3C'))), - Text('微信号: ${dataModel?.teacherWechatAccount??''}', style: TextStyle(fontSize: 15, color: HexColor.fromHex(styleModel?.commStyle.wechatAccountColor ?? '#FF5050'))), + Text(dataModel?.teacherUsername ?? '', + style: TextStyle( + fontSize: 15, + color: HexColor.fromHex( + styleModel?.teacherDialogTitleColor ?? '#3C3C3C'))), + Text('微信号: ${dataModel?.teacherWechatAccount ?? ''}', + style: TextStyle( + fontSize: 15, + color: HexColor.fromHex( + styleModel?.commStyle?.wechatAccountColor ?? + '#FF5050'))), GestureDetector( onTap: () => _copyText(dataModel?.teacherWechatAccount), child: UnconstrainedBox( child: Container( decoration: BoxDecoration( // color: Color(0xffffdada), - color: HexColor.fromHex(styleModel?.bindTeacherDialog?.btnBgColor ?? '#FFDADA'), + color: HexColor.fromHex( + styleModel?.bindTeacherDialog?.btnBgColor ?? + '#FFDADA'), borderRadius: BorderRadius.circular(20), ), - padding: EdgeInsets.only(left: 9, right: 9, top: 4, bottom: 4), + padding: + EdgeInsets.only(left: 9, right: 9, top: 4, bottom: 4), child: Text( styleModel?.bindTeacherDialog?.btnText ?? '复制去微信添加', - style: TextStyle(fontSize: 13, color: HexColor.fromHex(styleModel?.bindTeacherDialog?.btnTextColor ?? '#FF0000')), + style: TextStyle( + fontSize: 13, + color: HexColor.fromHex( + styleModel?.bindTeacherDialog?.btnTextColor ?? + '#FF0000')), ), ), ), @@ -264,13 +296,19 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer height: 56, // color: Colors.red, child: CachedNetworkImage( - imageUrl: dataModel?.teacherWxQrCode ?? styleModel?.myTeacher?.defalutTeacher?.qrcode ?? '', + imageUrl: dataModel?.teacherWxQrCode ?? + styleModel?.myTeacher?.defalutTeacher?.qrcode ?? + '', ), ), const SizedBox(height: 9), Text( styleModel?.officalWxchat?.qrcodeText ?? '长按保存二维码', - style: TextStyle(fontSize: 13, color: HexColor.fromHex(styleModel?.officalWxchat?.qrcodeTextColor ?? '#999999')), + style: TextStyle( + fontSize: 13, + color: HexColor.fromHex( + styleModel?.officalWxchat?.qrcodeTextColor ?? + '#999999')), ), ], ), @@ -282,7 +320,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer ); } - Widget _createHeader(WechatTeacherStyleModel styleModel, WechatTeacherDataModel dataModel) { + Widget _createHeader( + WechatTeacherStyleModel styleModel, WechatTeacherDataModel dataModel) { return Container( width: double.infinity, height: 283, @@ -308,7 +347,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer margin: EdgeInsets.only(left: 10, right: 10), padding: EdgeInsets.all(12), decoration: BoxDecoration( - color: HexColor.fromHex(styleModel?.teacherDialogBgColor ?? '#FFFFFF'), + color: HexColor.fromHex( + styleModel?.teacherDialogBgColor ?? '#FFFFFF'), borderRadius: BorderRadius.circular(10), ), child: Column( @@ -320,7 +360,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer style: TextStyle( fontWeight: FontWeight.bold, fontSize: 15, - color: HexColor.fromHex(styleModel?.teacherDialogTitleColor ?? '#3C3C3C'), + color: HexColor.fromHex( + styleModel?.teacherDialogTitleColor ?? '#3C3C3C'), ), ), Expanded( @@ -345,7 +386,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer margin: EdgeInsets.only(left: 10, right: 10, top: 0, bottom: 22), padding: EdgeInsets.all(12), decoration: BoxDecoration( - color: HexColor.fromHex(styleModel?.officalWxchat?.bgColor ?? '#FFFFFF'), + color: + HexColor.fromHex(styleModel?.officalWxchat?.bgColor ?? '#FFFFFF'), borderRadius: BorderRadius.circular(10), ), child: Column( @@ -355,7 +397,8 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer Text( styleModel?.officalWxchat?.title ?? '官方微信', style: TextStyle( - color: HexColor.fromHex(styleModel?.officalWxchat?.titleColor ?? '#3C3C3C'), + color: HexColor.fromHex( + styleModel?.officalWxchat?.titleColor ?? '#3C3C3C'), fontSize: 15, fontWeight: FontWeight.bold, ), @@ -372,7 +415,11 @@ class _WechatTeacherPageContainerState extends State<_WechatTeacherPageContainer if (length > 0) { styleModel.officalWxchat.list.forEach((element) { widgets.add(WechatTeachetItem(element, styleModel)); - widgets.add(Container(margin: EdgeInsets.only(top: 4, bottom: 4), width: double.infinity, height: 0.5, color: Color(0xffebebeb))); + widgets.add(Container( + margin: EdgeInsets.only(top: 4, bottom: 4), + width: double.infinity, + height: 0.5, + color: Color(0xffebebeb))); }); widgets.removeLast(); } else { diff --git a/lib/utils/contants.dart b/lib/utils/contants.dart index 77dee28..c189401 100644 --- a/lib/utils/contants.dart +++ b/lib/utils/contants.dart @@ -21,11 +21,15 @@ class Constants { //==============================弹窗===================================start ///用户协议显示 static String isShowPolicy = "is_show_policy"; + ///推送权限弹窗 static String isShowNotiPermission = "isShowNotiPermission"; + //==============================弹窗===================================end //==============================版本号,控制引导页显示=================================== static String versionNumber = "versionNumber"; + //==============================Mob场景还原邀请码=================================== + static String mobInvitedCode = "mobInvitedCode"; }