ソースを参照

1.增加进入搜页延迟时间

2.我的订单增加订单金额、订单收益字段显示
tags/0.0.4+8
“yanghuaxuan” 4年前
コミット
d1d2bd8ac8
5個のファイルの変更65行の追加30行の削除
  1. +27
    -27
      example/android/app/build.gradle
  2. +3
    -0
      lib/models/app_config_model.dart
  3. +3
    -1
      lib/pages/home_page/home_page.dart
  4. +29
    -0
      lib/pages/orders_page/views/order_item_widget.dart
  5. +3
    -2
      pubspec.yaml

+ 27
- 27
example/android/app/build.gradle ファイルの表示

@@ -108,33 +108,33 @@ android {




// 应用信息配置 // 应用信息配置
// productFlavors { productFlavors {
// // 智夜生活 // 智夜生活
// zhiying { zhiying {
// applicationId "cn.zhios.zhiying" applicationId "cn.zhios.zhiying"
// versionCode 34 versionCode 35
// dimension "app" dimension "app"
// versionName '1.2.34' versionName '1.2.35'
// // 签名信息 // 签名信息
// signingConfig signingConfigs.zhiying signingConfig signingConfigs.zhiying
// } }
// } }
// // 打包脚本
// // 打包脚本 android.applicationVariants.all { variant ->
// android.applicationVariants.all { variant -> if (variant.buildType.name != "debug") {
// if (variant.buildType.name != "debug") { variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk")
// variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk") }
// } variant.outputs.all { output ->
// def outputFile = output.outputFile
// variant.outputs.all { output -> if (outputFile != null && outputFile.name.endsWith('.apk')) {
// def outputFile = output.outputFile //这里修改apk文件名
// if (outputFile != null && outputFile.name.endsWith('.apk')) { def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk"
// //这里修改apk文件名 outputFileName = fileName
// def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk" }
// outputFileName = fileName }
// } }
// }
// }


configurations.all { configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details -> resolutionStrategy.eachDependency { DependencyResolveDetails details ->


+ 3
- 0
lib/models/app_config_model.dart ファイルの表示

@@ -15,6 +15,8 @@ class AppConfigModel {
///新引导页参数 ///新引导页参数
GuideData guideData; GuideData guideData;


static String appStartDelay="0.5";

static AppConfigModel _config; static AppConfigModel _config;


AppConfigModel({this.keys, this.guideImage}); AppConfigModel({this.keys, this.guideImage});
@@ -52,6 +54,7 @@ class AppConfigModel {
keys = json['keys'] != null ? new AppConfigKeyModel.fromJson(json['keys']) : null; keys = json['keys'] != null ? new AppConfigKeyModel.fromJson(json['keys']) : null;
guideImage = json['guide_image'] != null ? new AppConfigGuideModel.fromJson(json['guide_image']) : null; guideImage = json['guide_image'] != null ? new AppConfigGuideModel.fromJson(json['guide_image']) : null;
guideData = json['guide_data'] != null ? GuideData.fromJson(json['guide_data']) : null; guideData = json['guide_data'] != null ? GuideData.fromJson(json['guide_data']) : null;
appStartDelay=json['app_start_delay'];
} }


Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {


+ 3
- 1
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/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/global_dialog/policy_dialog/policy_dialog.dart';
import 'package:zhiying_base_widget/dialog/tip_dialog/tip_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/contants.dart';
import 'package:zhiying_base_widget/utils/mob_push_util.dart'; import 'package:zhiying_base_widget/utils/mob_push_util.dart';
import 'package:zhiying_comm/models/base/base_tab_model.dart'; import 'package:zhiying_comm/models/base/base_tab_model.dart';
@@ -64,7 +65,8 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
///渲染完第一帧后调用 ///渲染完第一帧后调用
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
Timer(Duration(milliseconds: 500), (){ int delay=((num.tryParse(AppConfigModel.appStartDelay)??0.5)*1000).toInt();
Timer(Duration(milliseconds: delay), (){
NativeUtil.notifyInitSuccess(); NativeUtil.notifyInitSuccess();
}); });
}); });


+ 29
- 0
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?.textOrderTime ?? ''}${model?.createAt ?? ''}'),
_creteText('${style?.list?.textFinishTime ?? ''}${model?.confirmAt ?? ''}'), _creteText('${style?.list?.textFinishTime ?? ''}${model?.confirmAt ?? ''}'),
Row(
children: <Widget>[
_cretePriceText('订单金额:${model?.itemPrice??''}'),
Spacer(),
Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.ideographic,
children: <Widget>[
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() { Widget _createTips() {
List<OrderStateModel> states = style.list.orderState; List<OrderStateModel> states = style.list.orderState;
OrderStateModel state = states.firstWhere((element) => element.type == model.state.toString()); OrderStateModel state = states.firstWhere((element) => element.type == model.state.toString());


+ 3
- 2
pubspec.yaml ファイルの表示

@@ -45,13 +45,14 @@ dependencies:


mobpush_plugin: mobpush_plugin:


zhiying_comm:
path: ../zhiying_comm


dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter


zhiying_comm:
path: ../zhiying_comm




# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the


||||||
x
 
000:0
読み込み中…
キャンセル
保存