Browse Source

1、添加转换的方法

2、添加Android mob其余配置
tags/0.0.2+13^0
PH2 4 years ago
parent
commit
62e30f6e98
3 changed files with 70 additions and 0 deletions
  1. +34
    -0
      example/android/app/build.gradle
  2. +35
    -0
      lib/util/parse_util.dart
  3. +1
    -0
      lib/zhiying_comm.dart

+ 34
- 0
example/android/app/build.gradle View File

@@ -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 {


+ 35
- 0
lib/util/parse_util.dart View File

@@ -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;
}
}

+ 1
- 0
lib/zhiying_comm.dart View File

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


Loading…
Cancel
Save