From 62e30f6e9822415f886aa7af0ef072b8582ea15f Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Fri, 4 Dec 2020 18:45:11 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95=202=E3=80=81=E6=B7=BB=E5=8A=A0Andro?= =?UTF-8?q?id=20mob=E5=85=B6=E4=BD=99=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/android/app/build.gradle | 34 +++++++++++++++++++++++++++++++ lib/util/parse_util.dart | 35 ++++++++++++++++++++++++++++++++ lib/zhiying_comm.dart | 1 + 3 files changed, 70 insertions(+) create mode 100644 lib/util/parse_util.dart diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index d0a3ace..87ca655 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -30,8 +30,42 @@ MobSDK { appKey "30dc33054b635" appSecret "396e98c293130c9976fb7428b6b434d6" + MobLink { + uriScheme "fnoos://cn.zhios.zhiying" + appLinkHost "bied.t4m.cn" + } + + //手机验证登录 SecVerify {} + + //短信 SMSSDK {} + + ShareSDK { + + // platform configuration information + devInfo { + QQ { + appId "1111030588" + appKey "XoHKlrBybXy7ORBt" + shareByAppClient true + bypassApproval false + enable true + } + WechatMoments { + enable true + } + WechatFavorite { + enable true + } + QZone { + enable true + } + SinaWeibo { + enable true + } + } + } } android { diff --git a/lib/util/parse_util.dart b/lib/util/parse_util.dart new file mode 100644 index 0000000..130000d --- /dev/null +++ b/lib/util/parse_util.dart @@ -0,0 +1,35 @@ +import 'package:zhiying_comm/util/empty_util.dart'; +import 'log/let_log.dart'; + +class ParseUtil { + /// + /// String 转double + /// + static double stringParseDouble(final String val, {double defVal = 0.0}) { + if (EmptyUtil.isEmpty(val)) return defVal; + double rlt = defVal; + try { + rlt = double.parse(val); + } catch (e, s) { + Logger.warn(e, s); + rlt = defVal; + } + return defVal; + } + + /// + /// string 转 int + /// + static int stringParseInt(final String val, {int defVal = 0}) { + int rlt = defVal; + if (!EmptyUtil.isEmpty(val)) { + try { + rlt = int.parse(val); + } catch (e, s) { + Logger.warn(e, s); + rlt = defVal; + } + } + return rlt; + } +} diff --git a/lib/zhiying_comm.dart b/lib/zhiying_comm.dart index ce28b05..69b38c6 100644 --- a/lib/zhiying_comm.dart +++ b/lib/zhiying_comm.dart @@ -35,4 +35,5 @@ export 'util/widget_factory.dart'; export 'package:cached_network_image/cached_network_image.dart'; export 'util/photo_preview/photo_preview.dart'; export 'models/base/base_change_notifier.dart'; +export 'util/parse_util.dart';