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';