From d1d2bd8ac8a77da8df8066451c54021eacd5b2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyanghuaxuan=E2=80=9D?= <“646903573@qq.com”> Date: Mon, 1 Feb 2021 09:40:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E8=BF=9B=E5=85=A5=E6=90=9C?= =?UTF-8?q?=E9=A1=B5=E5=BB=B6=E8=BF=9F=E6=97=B6=E9=97=B4=202.=E6=88=91?= =?UTF-8?q?=E7=9A=84=E8=AE=A2=E5=8D=95=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E3=80=81=E8=AE=A2=E5=8D=95=E6=94=B6=E7=9B=8A?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/android/app/build.gradle | 54 +++++++++---------- lib/models/app_config_model.dart | 3 ++ lib/pages/home_page/home_page.dart | 4 +- .../orders_page/views/order_item_widget.dart | 29 ++++++++++ pubspec.yaml | 5 +- 5 files changed, 65 insertions(+), 30 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 946887c..7ca3eba 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -108,33 +108,33 @@ android { // 应用信息配置 -// productFlavors { -// // 智夜生活 -// zhiying { -// applicationId "cn.zhios.zhiying" -// versionCode 34 -// dimension "app" -// versionName '1.2.34' -// // 签名信息 -// signingConfig signingConfigs.zhiying -// } -// } -// -// // 打包脚本 -// android.applicationVariants.all { variant -> -// if (variant.buildType.name != "debug") { -// variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk") -// } -// -// variant.outputs.all { output -> -// def outputFile = output.outputFile -// if (outputFile != null && outputFile.name.endsWith('.apk')) { -// //这里修改apk文件名 -// def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk" -// outputFileName = fileName -// } -// } -// } + productFlavors { + // 智夜生活 + zhiying { + applicationId "cn.zhios.zhiying" + versionCode 35 + dimension "app" + versionName '1.2.35' + // 签名信息 + signingConfig signingConfigs.zhiying + } + } + + // 打包脚本 + android.applicationVariants.all { variant -> + if (variant.buildType.name != "debug") { + variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk") + } + + variant.outputs.all { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.apk')) { + //这里修改apk文件名 + def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk" + outputFileName = fileName + } + } + } configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> diff --git a/lib/models/app_config_model.dart b/lib/models/app_config_model.dart index 3856369..6dcc1a1 100644 --- a/lib/models/app_config_model.dart +++ b/lib/models/app_config_model.dart @@ -15,6 +15,8 @@ class AppConfigModel { ///新引导页参数 GuideData guideData; + static String appStartDelay="0.5"; + static AppConfigModel _config; AppConfigModel({this.keys, this.guideImage}); @@ -52,6 +54,7 @@ class AppConfigModel { keys = json['keys'] != null ? new AppConfigKeyModel.fromJson(json['keys']) : null; guideImage = json['guide_image'] != null ? new AppConfigGuideModel.fromJson(json['guide_image']) : null; guideData = json['guide_data'] != null ? GuideData.fromJson(json['guide_data']) : null; + appStartDelay=json['app_start_delay']; } Map toJson() { diff --git a/lib/pages/home_page/home_page.dart b/lib/pages/home_page/home_page.dart index 2cf6cac..394389a 100644 --- a/lib/pages/home_page/home_page.dart +++ b/lib/pages/home_page/home_page.dart @@ -20,6 +20,7 @@ import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_ import 'package:zhiying_base_widget/dialog/global_dialog/notification_setting_dialog/notification_setting_dialog.dart'; import 'package:zhiying_base_widget/dialog/global_dialog/policy_dialog/policy_dialog.dart'; import 'package:zhiying_base_widget/dialog/tip_dialog/tip_dialog.dart'; +import 'package:zhiying_base_widget/models/app_config_model.dart'; import 'package:zhiying_base_widget/utils/contants.dart'; import 'package:zhiying_base_widget/utils/mob_push_util.dart'; import 'package:zhiying_comm/models/base/base_tab_model.dart'; @@ -64,7 +65,8 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker WidgetsBinding.instance.addObserver(this); ///渲染完第一帧后调用 WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - Timer(Duration(milliseconds: 500), (){ + int delay=((num.tryParse(AppConfigModel.appStartDelay)??0.5)*1000).toInt(); + Timer(Duration(milliseconds: delay), (){ NativeUtil.notifyInitSuccess(); }); }); diff --git a/lib/pages/orders_page/views/order_item_widget.dart b/lib/pages/orders_page/views/order_item_widget.dart index 152ba16..3b28e02 100644 --- a/lib/pages/orders_page/views/order_item_widget.dart +++ b/lib/pages/orders_page/views/order_item_widget.dart @@ -148,6 +148,20 @@ class OrderItemWidget extends StatelessWidget { ), _creteText('${style?.list?.textOrderTime ?? ''}${model?.createAt ?? ''}'), _creteText('${style?.list?.textFinishTime ?? ''}${model?.confirmAt ?? ''}'), + Row( + children: [ + _cretePriceText('订单金额:${model?.itemPrice??''}'), + Spacer(), + Row( + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.ideographic, + children: [ + Text("收益:¥",style: TextStyle(color: HexColor.fromHex("#FFFF4242"),fontSize: 10),), + Text(model?.userCommission??"",style: TextStyle(color: HexColor.fromHex("#FFFF4242"),fontSize: 18),) + ], + ) + ], + ) ], ), ) @@ -206,6 +220,21 @@ class OrderItemWidget extends StatelessWidget { ); } + Widget _cretePriceText(String text) { + return text == null || text == '' + ? Container() + : Padding( + padding: EdgeInsets.only(top: 2, bottom: 2), + child: Text( + text, + style: TextStyle( + fontSize: 10, + color: HexColor.fromHex("#FF333333"), + ), + ), + ); + } + Widget _createTips() { List states = style.list.orderState; OrderStateModel state = states.firstWhere((element) => element.type == model.state.toString()); diff --git a/pubspec.yaml b/pubspec.yaml index 81f0b43..e9edbe0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,13 +45,14 @@ dependencies: mobpush_plugin: - zhiying_comm: - path: ../zhiying_comm + dev_dependencies: flutter_test: sdk: flutter + zhiying_comm: + path: ../zhiying_comm # For information on the generic Dart part of this file, see the