From f7a2439206d7c77ae771ceafe9cef29712a632ef Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 25 Jun 2021 15:55:42 +0800 Subject: [PATCH 1/5] update ios/podfile --- ios/Podfile.lock | 16 ++++++++++++++-- tool/grind.dart | 5 +++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ff8bf18..81d627d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -30,6 +30,8 @@ PODS: - Flutter - device_info (0.0.1): - Flutter + - device_info_plus (0.0.1): + - Flutter - DKImagePickerController/Core (4.3.2): - DKImagePickerController/ImageDataManager - DKImagePickerController/Resource @@ -177,9 +179,11 @@ PODS: - libOpenInstallSDK - package_info (0.0.1): - Flutter + - package_info_plus (0.4.5): + - Flutter - path_provider (0.0.1): - Flutter - - permission_handler (3.3.0): + - "permission_handler (5.1.0+2)": - Flutter - photo_manager (0.0.1): - Flutter @@ -243,6 +247,7 @@ DEPENDENCIES: - camera (from `.symlinks/plugins/camera/ios`) - clipboard_listener (from `.symlinks/plugins/clipboard_listener/ios`) - device_info (from `.symlinks/plugins/device_info/ios`) + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`) - Flutter (from `Flutter`) - flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`) @@ -260,6 +265,7 @@ DEPENDENCIES: - meiqia_plugin (from `.symlinks/plugins/meiqia_plugin/ios`) - openinstall_flutter_plugin (from `.symlinks/plugins/openinstall_flutter_plugin/ios`) - package_info (from `.symlinks/plugins/package_info/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`) - permission_handler (from `.symlinks/plugins/permission_handler/ios`) - photo_manager (from `.symlinks/plugins/photo_manager/ios`) @@ -313,6 +319,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/clipboard_listener/ios" device_info: :path: ".symlinks/plugins/device_info/ios" + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" file_picker: :path: ".symlinks/plugins/file_picker/ios" Flutter: @@ -347,6 +355,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/openinstall_flutter_plugin/ios" package_info: :path: ".symlinks/plugins/package_info/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" path_provider: :path: ".symlinks/plugins/path_provider/ios" permission_handler: @@ -387,6 +397,7 @@ SPEC CHECKSUMS: camera: a0ca5080336f7af47b88436e5e26da3dee5568f0 clipboard_listener: 5bdabc3b4ebabf4b4055ca17aa97b9b4b55160e2 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 + device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1 @@ -416,8 +427,9 @@ SPEC CHECKSUMS: mobile-ffmpeg-min: dd2fd38da2788ccb7be5720fc308cb69160820e7 openinstall_flutter_plugin: e6b8486f834eb60b336546442a8b747d4b664cf4 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 + package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c - permission_handler: 67637977b227d62d46bfbf524f335f8568de5a73 + permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 photo_manager: f7c619c2cc8c2adb8d85c63363babac477de9c67 raw_toast: 24d3af32bd83848a73a4a9f8edeed98ff5c469c4 SDWebImage: 7acbb57630ac7db4a495547fb73916ff3e432f6b diff --git a/tool/grind.dart b/tool/grind.dart index bf43c04..ddb43a6 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -141,6 +141,11 @@ buildIos() async { arguments: ['build', 'ios', '--dart-define', 'ISDEBUG=false']); } +@Task() +builIosDev()async{ + runAsync('flutter', + arguments: ['build', 'ios', '--dart-define', 'ISDEBUG=true']); +} @Task() Future getVersion() async { String projectPath = Directory('.').absolute.path; From ee801c2ba915aaf85ebc5d80ebcd87144d93d009 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 2 Jul 2021 14:16:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dios=20=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=97=A0=E6=B3=95=E5=BC=B9=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .fvm/fvm_config.json | 3 ++- android/build.gradle | 7 +++++++ lib/pages/home/classify/classify_page.dart | 2 +- lib/pages/home/home_page.dart | 12 ++++++++++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index 1c922f8..de7d397 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,3 +1,4 @@ { - "flutterSdkVersion": "stable" + "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/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..b86e5fc 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; From 6fa0d9d7b87b75d95e377755d15f976a7346d44b Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 2 Jul 2021 15:23:57 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dios=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Podfile | 3 +++ ios/Podfile.lock | 2 +- pubspec.yaml | 2 +- tool/grind.dart | 14 ++++++++------ 4 files changed, 13 insertions(+), 8 deletions(-) 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/pubspec.yaml b/pubspec.yaml index 5910230..167209f 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 ddb43a6..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,14 +139,14 @@ 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('flutter', - arguments: ['build', 'ios', '--dart-define', 'ISDEBUG=true']); + runAsync('fvm', + arguments: ['flutter','build', 'ios', '--dart-define', 'ISDEBUG=true']); } @Task() Future getVersion() async { From 53b8ef8ca94a9b171eeac1661565a0c88b03ca46 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Mon, 5 Jul 2021 18:54:58 +0800 Subject: [PATCH 4/5] remove todo --- lib/pages/home/home_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index b86e5fc..b53cdd8 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1439,7 +1439,7 @@ class _HomePageState extends BaseStoreState //抽奖功能 _userLottery() async { - //TODO 暂时移除抽奖功能(大概率以后用不到) + //暂时移除抽奖功能(大概率以后用不到) // ResultData resultData = await HttpManager.post( // UserApi.user_lottery, // {'userID': UserManager.instance.user.info.id}, From dedd7b32433a9a6ab84be016f439f3a85eec55ce Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Mon, 5 Jul 2021 19:42:47 +0800 Subject: [PATCH 5/5] no message --- .../user/functions/user_benefit_func.dart | 13 ++-- lib/pages/user/model/user_income_model1.dart | 59 ++++++++----------- lib/pages/user/user_benefit_currency_pag.dart | 8 +-- 3 files changed, 32 insertions(+), 48 deletions(-) diff --git a/lib/pages/user/functions/user_benefit_func.dart b/lib/pages/user/functions/user_benefit_func.dart index 51ab518..69d0e4d 100644 --- a/lib/pages/user/functions/user_benefit_func.dart +++ b/lib/pages/user/functions/user_benefit_func.dart @@ -23,25 +23,22 @@ enum BenefitDateType { class UserBenefitFunc { //已到账收益 static Future receicedIncome( - String date_str, int type) async { + String dateStr, int type) async { ResultData result = await HttpManager.post( - APIV2.userAPI.rceivedDetail, {'date_str': date_str, 'type': type}); - if (result.data != null) { + APIV2.userAPI.rceivedDetail, {'date_str': dateStr, 'type': type}); if (result.data['data'] != null) { return UserIncomeModel1.fromJson(result.data['data']); } - } } //未到账收益 static Future notReceicedIncome( - String date_str, int type) async { + String dateStr, int type) async { ResultData result = await HttpManager.post( - APIV2.userAPI.rceivedDetail, {'date_str': date_str, 'type': type}); - if (result.data != null) { + APIV2.userAPI.rceivedDetail, {'date_str': dateStr, 'type': type}); if (result.data['data'] != null) { return UserIncomeModel1.fromJson(result.data['data']); - } + } } diff --git a/lib/pages/user/model/user_income_model1.dart b/lib/pages/user/model/user_income_model1.dart index 676b6a3..da138f4 100644 --- a/lib/pages/user/model/user_income_model1.dart +++ b/lib/pages/user/model/user_income_model1.dart @@ -1,63 +1,52 @@ class UserIncomeModel1 { - Data data; + num amount; + num all; + List detial; - UserIncomeModel1({this.data}); + UserIncomeModel1({this.amount, this.all, this.detial}); UserIncomeModel1.fromJson(Map json) { - data = json['data'] != null ? new Data.fromJson(json['data']) : null; - } - - Map toJson() { - final Map data = new Map(); - if (this.data != null) { - data['data'] = this.data.toJson(); - } - return data; - } -} - -class Data { - double amount; - double all; - Detail detail; - - Data({this.amount, this.all, this.detail}); - - Data.fromJson(Map json) { amount = json['amount']; all = json['all']; - detail = - json['detail'] != null ? new Detail.fromJson(json['detail']) : null; + 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.detail != null) { - data['detail'] = this.detail.toJson(); + if (this.detial != null) { + data['detial'] = this.detial.map((v) => v.toJson()).toList(); } return data; } } -class Detail1 { +class Detial { int date; num sale; int count; num coin; - Detail1 detail; + List detail; - Detail1({this.date, this.sale, this.count, this.coin, this.detail}); + Detial({this.date, this.sale, this.count, this.coin, this.detail}); - Detail1.fromJson(Map json) { + Detial.fromJson(Map json) { date = json['date']; sale = json['sale']; count = json['count']; coin = json['coin']; - detail = json['detail'] != null - ? new Detail1.fromJson(json['detail']) - : Detail.init(); + if (json['detail'] != null) { + detail = new List(); + json['detail'].forEach((v) { + detail.add(new Detail.fromJson(v)); + }); + } } Map toJson() { @@ -67,7 +56,7 @@ class Detail1 { data['count'] = this.count; data['coin'] = this.coin; if (this.detail != null) { - data['detail'] = this.detail.toJson(); + data['detail'] = this.detail.map((v) => v.toJson()).toList(); } return data; } @@ -96,6 +85,4 @@ class Detail { data['coin'] = this.coin; return data; } - - factory Detail.init() => Detail(date: 0, sale: 0, count: 0, coin: 0); } diff --git a/lib/pages/user/user_benefit_currency_pag.dart b/lib/pages/user/user_benefit_currency_pag.dart index 0219bc9..bd1beba 100644 --- a/lib/pages/user/user_benefit_currency_pag.dart +++ b/lib/pages/user/user_benefit_currency_pag.dart @@ -464,10 +464,10 @@ class _UserBenefitCurrencyPageState extends State { } else { //团队补贴 } - _amount = _models.data?.amount?.toStringAsFixed(2); - _all = _models.data?.all?.toStringAsFixed(2); - print(_models?.data?.amount?.toStringAsFixed(2)); - print(_models?.data?.all?.toStringAsFixed(2)); + _amount = _models?.amount?.toStringAsFixed(2); + _all = _models?.all?.toStringAsFixed(2); + print(_models?.amount?.toStringAsFixed(2)); + print(_models?.all?.toStringAsFixed(2)); setState(() {}); _refreshController.refreshCompleted(); },