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