diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index 301f9b8..de7d397 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,4 +1,4 @@ { - "flutterSdkVersion": "2.0.0", + "flutterSdkVersion": "2.0.2", "flavors": {} } \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 8fc01c0..ccb95d3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,6 +4,9 @@ buildscript { repositories { google() jcenter() + maven { + url "https://mvn.mob.com/android" + } } dependencies { @@ -18,6 +21,10 @@ allprojects { repositories { google() jcenter() + maven { + url "https://mvn.mob.com/android" + } + } } diff --git a/ios/Podfile b/ios/Podfile index 3264e42..4b9cf4b 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -78,5 +78,8 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' + end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 81d627d..b49d224 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -450,6 +450,6 @@ SPEC CHECKSUMS: webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44 -PODFILE CHECKSUM: c6a56d267dffea0219218982f38a1cc8d204035b +PODFILE CHECKSUM: 80e178f7acd39d9ad7aacc7d6a4e9dea0cb945ea COCOAPODS: 1.10.1 diff --git a/lib/pages/home/classify/classify_page.dart b/lib/pages/home/classify/classify_page.dart index c63ebbc..b12614f 100644 --- a/lib/pages/home/classify/classify_page.dart +++ b/lib/pages/home/classify/classify_page.dart @@ -176,7 +176,7 @@ class _ClassifyPageState extends BaseStoreState if (currentIndex < widget.data.length - 1 && notification.metrics.pixels.toInt() > - notification.metrics.maxScrollExtent + 120) { + ( notification.metrics.maxScrollExtent + 120).toInt()) { if (!animating) { animating = true; currentIndex++; diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 2eccac3..b53cdd8 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1421,9 +1421,17 @@ class _HomePageState extends BaseStoreState } Future requestPermission() async { - bool permission = await Permission.locationWhenInUse.isGranted; + if (Platform.isIOS) { + return true; + } + bool permission = await Permission.locationWhenInUse.isRestricted; + bool permanentDenied = + await Permission.locationWhenInUse.isPermanentlyDenied; if (!permission) { - await Permission.locationWhenInUse.request(); + await Permission.locationWhenInUse.request(); + if (permanentDenied) { + await PermissionTool.showOpenPermissionDialog(context, '打开定位权限'); + } permission = await Permission.locationWhenInUse.isGranted; } return permission; @@ -1431,7 +1439,7 @@ class _HomePageState extends BaseStoreState //抽奖功能 _userLottery() async { - //TODO 暂时移除抽奖功能(大概率以后用不到) + //暂时移除抽奖功能(大概率以后用不到) // ResultData resultData = await HttpManager.post( // UserApi.user_lottery, // {'userID': UserManager.instance.user.info.id}, diff --git a/lib/pages/user/functions/user_benefit_func.dart b/lib/pages/user/functions/user_benefit_func.dart index 162edfd..8239b69 100644 --- a/lib/pages/user/functions/user_benefit_func.dart +++ b/lib/pages/user/functions/user_benefit_func.dart @@ -31,7 +31,6 @@ class UserBenefitFunc { if (result.data['data'] != null) { return UserIncomeModel.fromJson(result.data['data']); } - } } //未到账收益 diff --git a/lib/pages/user/model/user_income_model1.dart b/lib/pages/user/model/user_income_model1.dart new file mode 100644 index 0000000..da138f4 --- /dev/null +++ b/lib/pages/user/model/user_income_model1.dart @@ -0,0 +1,88 @@ +class UserIncomeModel1 { + num amount; + num all; + List detial; + + UserIncomeModel1({this.amount, this.all, this.detial}); + + UserIncomeModel1.fromJson(Map json) { + amount = json['amount']; + all = json['all']; + if (json['detial'] != null) { + detial = new List(); + json['detial'].forEach((v) { + detial.add(new Detial.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['amount'] = this.amount; + data['all'] = this.all; + if (this.detial != null) { + data['detial'] = this.detial.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class Detial { + int date; + num sale; + int count; + num coin; + List detail; + + Detial({this.date, this.sale, this.count, this.coin, this.detail}); + + Detial.fromJson(Map json) { + date = json['date']; + sale = json['sale']; + count = json['count']; + coin = json['coin']; + if (json['detail'] != null) { + detail = new List(); + json['detail'].forEach((v) { + detail.add(new Detail.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['date'] = this.date; + data['sale'] = this.sale; + data['count'] = this.count; + data['coin'] = this.coin; + if (this.detail != null) { + data['detail'] = this.detail.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class Detail { + int date; + num sale; + int count; + num coin; + + Detail({this.date, this.sale, this.count, this.coin}); + + Detail.fromJson(Map json) { + date = json['date']; + sale = json['sale']; + count = json['count']; + coin = json['coin']; + } + + Map toJson() { + final Map data = new Map(); + data['date'] = this.date; + data['sale'] = this.sale; + data['count'] = this.count; + data['coin'] = this.coin; + return data; + } +} diff --git a/lib/pages/user/user_benefit_currency_pag.dart b/lib/pages/user/user_benefit_currency_pag.dart index d9512be..b329def 100644 --- a/lib/pages/user/user_benefit_currency_pag.dart +++ b/lib/pages/user/user_benefit_currency_pag.dart @@ -494,7 +494,6 @@ class _UserBenefitCurrencyPageState extends State { for (int i = 0; i < _gone.length; i++) { _gone[i] = true; } - print(_models?.amount?.toStringAsFixed(2)); print(_models?.all?.toStringAsFixed(2)); setState(() {}); diff --git a/pubspec.yaml b/pubspec.yaml index 010ee79..e9cd042 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: recook description: Recook Market App. publish_to: "none" -version: 1.8.5-dev+304 +version: 1.8.6-dev+305 environment: sdk: ">=2.10.0 <3.0.0" diff --git a/tool/grind.dart b/tool/grind.dart index bf43c04..c60fc4a 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -101,7 +101,8 @@ clean() => defaultClean(); @Task() buildApk() async { - await runAsync('flutter', arguments: [ + await runAsync('fvm', arguments: [ + 'flutter', 'build', 'apk', '--target-platform=android-arm64', @@ -119,7 +120,8 @@ buildApk() async { @Task() @Depends(getVersion) buildApkDev() async { - await runAsync('flutter', arguments: [ + await runAsync('fvm', arguments: [ + 'flutter', 'build', 'apk', '--target-platform=android-arm64', @@ -137,10 +139,15 @@ buildApkDev() async { @Task() buildIos() async { - runAsync('flutter', - arguments: ['build', 'ios', '--dart-define', 'ISDEBUG=false']); + runAsync('fvm', + arguments: ['flutter','build', 'ios', '--dart-define', 'ISDEBUG=false']); } +@Task() +builIosDev()async{ + runAsync('fvm', + arguments: ['flutter','build', 'ios', '--dart-define', 'ISDEBUG=true']); +} @Task() Future getVersion() async { String projectPath = Directory('.').absolute.path;