Kaynağa Gözat

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

2.我的订单增加订单金额、订单收益字段显示
tags/0.0.4+8
“yanghuaxuan” 3 yıl önce
ebeveyn
işleme
d1d2bd8ac8
5 değiştirilmiş dosya ile 65 ekleme ve 30 silme
  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 Dosyayı Görüntüle

@@ -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 ->


+ 3
- 0
lib/models/app_config_model.dart Dosyayı Görüntüle

@@ -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<String, dynamic> toJson() {


+ 3
- 1
lib/pages/home_page/home_page.dart Dosyayı Görüntüle

@@ -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<HomePage> 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();
});
});


+ 29
- 0
lib/pages/orders_page/views/order_item_widget.dart Dosyayı Görüntüle

@@ -148,6 +148,20 @@ class OrderItemWidget extends StatelessWidget {
),
_creteText('${style?.list?.textOrderTime ?? ''}${model?.createAt ?? ''}'),
_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() {
List<OrderStateModel> states = style.list.orderState;
OrderStateModel state = states.firstWhere((element) => element.type == model.state.toString());


+ 3
- 2
pubspec.yaml Dosyayı Görüntüle

@@ -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


Yükleniyor…
İptal
Kaydet