Showing
51 changed files
with
486 additions
and
142 deletions
assets/icon_white.png
0 → 100644
365 Bytes
| @@ -21,7 +21,7 @@ import 'package:one_key/provider/online_check_edit_provider.dart'; | @@ -21,7 +21,7 @@ import 'package:one_key/provider/online_check_edit_provider.dart'; | ||
| 21 | import 'package:one_key/provider/other_login_provider.dart'; | 21 | import 'package:one_key/provider/other_login_provider.dart'; |
| 22 | import 'package:one_key/provider/tools.dart'; | 22 | import 'package:one_key/provider/tools.dart'; |
| 23 | import 'package:one_key/provider/upload_img_provider.dart'; | 23 | import 'package:one_key/provider/upload_img_provider.dart'; |
| 24 | -import 'package:one_key/utils/navigator_util.dart'; | 24 | +import 'package:one_key/route/navigator_util.dart'; |
| 25 | import 'package:one_key/utils/utils.dart'; | 25 | import 'package:one_key/utils/utils.dart'; |
| 26 | import 'package:provider/provider.dart'; | 26 | import 'package:provider/provider.dart'; |
| 27 | import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; | 27 | import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; |
lib/models/integral_model.dart
0 → 100644
| 1 | +import 'package:json_annotation/json_annotation.dart'; | ||
| 2 | + | ||
| 3 | +part 'integral_model.g.dart'; | ||
| 4 | + | ||
| 5 | +@JsonSerializable() | ||
| 6 | +class IntegralModel extends Object { | ||
| 7 | + @JsonKey(name: 'ret') | ||
| 8 | + int ret; | ||
| 9 | + | ||
| 10 | + @JsonKey(name: 'data') | ||
| 11 | + IntegralSunModel data; | ||
| 12 | + | ||
| 13 | + @JsonKey(name: 'msg') | ||
| 14 | + String msg; | ||
| 15 | + | ||
| 16 | + IntegralModel( | ||
| 17 | + this.ret, | ||
| 18 | + this.data, | ||
| 19 | + this.msg, | ||
| 20 | + ); | ||
| 21 | + | ||
| 22 | + factory IntegralModel.fromJson(Map<String, dynamic> srcJson) => | ||
| 23 | + _$IntegralModelFromJson(srcJson); | ||
| 24 | + | ||
| 25 | + Map<String, dynamic> toJson() => _$IntegralModelToJson(this); | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | +@JsonSerializable() | ||
| 29 | +class IntegralSunModel extends Object { | ||
| 30 | + @JsonKey(name: 'myIntegral') | ||
| 31 | + String myIntegral; | ||
| 32 | + | ||
| 33 | + @JsonKey(name: 'Cumulative') | ||
| 34 | + String cumulative; | ||
| 35 | + | ||
| 36 | + @JsonKey(name: 'Converted') | ||
| 37 | + String converted; | ||
| 38 | + | ||
| 39 | + @JsonKey(name: 'reviewed') | ||
| 40 | + String reviewed; | ||
| 41 | + | ||
| 42 | + IntegralSunModel( | ||
| 43 | + this.myIntegral, | ||
| 44 | + this.cumulative, | ||
| 45 | + this.converted, | ||
| 46 | + this.reviewed, | ||
| 47 | + ); | ||
| 48 | + | ||
| 49 | + factory IntegralSunModel.fromJson(Map<String, dynamic> srcJson) => | ||
| 50 | + _$IntegralSunModelFromJson(srcJson); | ||
| 51 | + | ||
| 52 | + Map<String, dynamic> toJson() => _$IntegralSunModelToJson(this); | ||
| 53 | +} |
lib/models/integral_model.g.dart
0 → 100644
| 1 | +// GENERATED CODE - DO NOT MODIFY BY HAND | ||
| 2 | + | ||
| 3 | +part of 'integral_model.dart'; | ||
| 4 | + | ||
| 5 | +// ************************************************************************** | ||
| 6 | +// JsonSerializableGenerator | ||
| 7 | +// ************************************************************************** | ||
| 8 | + | ||
| 9 | +IntegralModel _$IntegralModelFromJson(Map<String, dynamic> json) { | ||
| 10 | + return IntegralModel( | ||
| 11 | + json['ret'] as int, | ||
| 12 | + json['data'] == null | ||
| 13 | + ? null | ||
| 14 | + : IntegralSunModel.fromJson(json['data'] as Map<String, dynamic>), | ||
| 15 | + json['msg'] as String, | ||
| 16 | + ); | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +Map<String, dynamic> _$IntegralModelToJson(IntegralModel instance) => | ||
| 20 | + <String, dynamic>{ | ||
| 21 | + 'ret': instance.ret, | ||
| 22 | + 'data': instance.data, | ||
| 23 | + 'msg': instance.msg, | ||
| 24 | + }; | ||
| 25 | + | ||
| 26 | +IntegralSunModel _$IntegralSunModelFromJson(Map<String, dynamic> json) { | ||
| 27 | + return IntegralSunModel( | ||
| 28 | + json['myIntegral'] as String, | ||
| 29 | + json['Cumulative'] as String, | ||
| 30 | + json['Converted'] as String, | ||
| 31 | + json['reviewed'] as String, | ||
| 32 | + ); | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +Map<String, dynamic> _$IntegralSunModelToJson(IntegralSunModel instance) => | ||
| 36 | + <String, dynamic>{ | ||
| 37 | + 'myIntegral': instance.myIntegral, | ||
| 38 | + 'Cumulative': instance.cumulative, | ||
| 39 | + 'Converted': instance.converted, | ||
| 40 | + 'reviewed': instance.reviewed, | ||
| 41 | + }; |
| @@ -99,4 +99,6 @@ class HttpUrl { | @@ -99,4 +99,6 @@ class HttpUrl { | ||
| 99 | "?service=App.Seller.GetUserData"; //添加商家信息和当前登录人的信息 | 99 | "?service=App.Seller.GetUserData"; //添加商家信息和当前登录人的信息 |
| 100 | static const String check_bind_phone = | 100 | static const String check_bind_phone = |
| 101 | "?service=App.User.CheckbindPhone"; //APP微信登录后检测是否绑定过手机号 | 101 | "?service=App.User.CheckbindPhone"; //APP微信登录后检测是否绑定过手机号 |
| 102 | + static const String get_integral_list = | ||
| 103 | + "?service=App.Activity.GetIntegralList"; //获取客户经理积分列表 | ||
| 102 | } | 104 | } |
| @@ -9,7 +9,7 @@ import 'package:one_key/provider/user_model.dart'; | @@ -9,7 +9,7 @@ import 'package:one_key/provider/user_model.dart'; | ||
| 9 | import 'package:one_key/res/colors.dart'; | 9 | import 'package:one_key/res/colors.dart'; |
| 10 | import 'package:one_key/utils/dialog_util.dart'; | 10 | import 'package:one_key/utils/dialog_util.dart'; |
| 11 | import 'package:one_key/utils/event_bus.dart'; | 11 | import 'package:one_key/utils/event_bus.dart'; |
| 12 | -import 'package:one_key/utils/navigator_util.dart'; | 12 | +import 'package:one_key/route/navigator_util.dart'; |
| 13 | import 'package:one_key/utils/utils.dart'; | 13 | import 'package:one_key/utils/utils.dart'; |
| 14 | import 'package:one_key/widgets/h_empty_view.dart'; | 14 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 15 | import 'package:one_key/widgets/round_button.dart'; | 15 | import 'package:one_key/widgets/round_button.dart'; |
| @@ -8,7 +8,7 @@ import 'package:one_key/provider/user_model.dart'; | @@ -8,7 +8,7 @@ import 'package:one_key/provider/user_model.dart'; | ||
| 8 | import 'package:one_key/res/colors.dart'; | 8 | import 'package:one_key/res/colors.dart'; |
| 9 | import 'package:one_key/utils/dialog_util.dart'; | 9 | import 'package:one_key/utils/dialog_util.dart'; |
| 10 | import 'package:one_key/utils/event_bus.dart'; | 10 | import 'package:one_key/utils/event_bus.dart'; |
| 11 | -import 'package:one_key/utils/navigator_util.dart'; | 11 | +import 'package:one_key/route/navigator_util.dart'; |
| 12 | import 'package:one_key/utils/utils.dart'; | 12 | import 'package:one_key/utils/utils.dart'; |
| 13 | import 'package:one_key/widgets/MyDivider.dart'; | 13 | import 'package:one_key/widgets/MyDivider.dart'; |
| 14 | import 'package:one_key/widgets/h_empty_view.dart'; | 14 | import 'package:one_key/widgets/h_empty_view.dart'; |
| @@ -7,7 +7,7 @@ import 'package:one_key/provider/coupon_provider.dart'; | @@ -7,7 +7,7 @@ import 'package:one_key/provider/coupon_provider.dart'; | ||
| 7 | import 'package:one_key/provider/user_model.dart'; | 7 | import 'package:one_key/provider/user_model.dart'; |
| 8 | import 'package:one_key/res/colors.dart'; | 8 | import 'package:one_key/res/colors.dart'; |
| 9 | import 'package:one_key/utils/event_bus.dart'; | 9 | import 'package:one_key/utils/event_bus.dart'; |
| 10 | -import 'package:one_key/utils/navigator_util.dart'; | 10 | +import 'package:one_key/route/navigator_util.dart'; |
| 11 | import 'package:one_key/widgets/page_exception.dart'; | 11 | import 'package:one_key/widgets/page_exception.dart'; |
| 12 | import 'package:one_key/widgets/round_button.dart'; | 12 | import 'package:one_key/widgets/round_button.dart'; |
| 13 | import 'package:one_key/widgets/system_app_bar.dart'; | 13 | import 'package:one_key/widgets/system_app_bar.dart'; |
| @@ -7,7 +7,7 @@ import 'package:one_key/provider/coupon_provider.dart'; | @@ -7,7 +7,7 @@ import 'package:one_key/provider/coupon_provider.dart'; | ||
| 7 | import 'package:one_key/provider/user_model.dart'; | 7 | import 'package:one_key/provider/user_model.dart'; |
| 8 | import 'package:one_key/res/colors.dart'; | 8 | import 'package:one_key/res/colors.dart'; |
| 9 | import 'package:one_key/utils/event_bus.dart'; | 9 | import 'package:one_key/utils/event_bus.dart'; |
| 10 | -import 'package:one_key/utils/navigator_util.dart'; | 10 | +import 'package:one_key/route/navigator_util.dart'; |
| 11 | import 'package:one_key/utils/utils.dart'; | 11 | import 'package:one_key/utils/utils.dart'; |
| 12 | import 'package:one_key/widgets/h_empty_view.dart'; | 12 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 13 | import 'package:one_key/widgets/page_exception.dart'; | 13 | import 'package:one_key/widgets/page_exception.dart'; |
| @@ -11,7 +11,7 @@ import 'package:one_key/provider/upload_img_provider.dart'; | @@ -11,7 +11,7 @@ import 'package:one_key/provider/upload_img_provider.dart'; | ||
| 11 | import 'package:one_key/res/colors.dart'; | 11 | import 'package:one_key/res/colors.dart'; |
| 12 | import 'package:one_key/utils/dialog_util.dart'; | 12 | import 'package:one_key/utils/dialog_util.dart'; |
| 13 | import 'package:one_key/utils/misc.dart'; | 13 | import 'package:one_key/utils/misc.dart'; |
| 14 | -import 'package:one_key/utils/navigator_util.dart'; | 14 | +import 'package:one_key/route/navigator_util.dart'; |
| 15 | import 'package:one_key/utils/upload_image_util.dart'; | 15 | import 'package:one_key/utils/upload_image_util.dart'; |
| 16 | import 'package:one_key/utils/utils.dart'; | 16 | import 'package:one_key/utils/utils.dart'; |
| 17 | import 'package:one_key/widgets/h_empty_view.dart'; | 17 | import 'package:one_key/widgets/h_empty_view.dart'; |
| @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | ||
| 2 | import 'package:flutter_screenutil/screenutil.dart'; | 2 | import 'package:flutter_screenutil/screenutil.dart'; |
| 3 | import 'package:one_key/provider/create_store_model.dart'; | 3 | import 'package:one_key/provider/create_store_model.dart'; |
| 4 | import 'package:one_key/res/colors.dart'; | 4 | import 'package:one_key/res/colors.dart'; |
| 5 | -import 'package:one_key/utils/navigator_util.dart'; | 5 | +import 'package:one_key/route/navigator_util.dart'; |
| 6 | import 'package:one_key/utils/utils.dart'; | 6 | import 'package:one_key/utils/utils.dart'; |
| 7 | import 'package:one_key/widgets/round_button.dart'; | 7 | import 'package:one_key/widgets/round_button.dart'; |
| 8 | import 'package:one_key/widgets/system_app_bar.dart'; | 8 | import 'package:one_key/widgets/system_app_bar.dart'; |
| @@ -6,7 +6,7 @@ import 'package:one_key/pages/online_check/img_picker_widget.dart'; | @@ -6,7 +6,7 @@ import 'package:one_key/pages/online_check/img_picker_widget.dart'; | ||
| 6 | import 'package:one_key/provider/create_store_model.dart'; | 6 | import 'package:one_key/provider/create_store_model.dart'; |
| 7 | import 'package:one_key/provider/upload_img_provider.dart'; | 7 | import 'package:one_key/provider/upload_img_provider.dart'; |
| 8 | import 'package:one_key/res/colors.dart'; | 8 | import 'package:one_key/res/colors.dart'; |
| 9 | -import 'package:one_key/utils/navigator_util.dart'; | 9 | +import 'package:one_key/route/navigator_util.dart'; |
| 10 | import 'package:one_key/utils/upload_image_util.dart'; | 10 | import 'package:one_key/utils/upload_image_util.dart'; |
| 11 | import 'package:one_key/utils/utils.dart'; | 11 | import 'package:one_key/utils/utils.dart'; |
| 12 | import 'package:one_key/widgets/round_button.dart'; | 12 | import 'package:one_key/widgets/round_button.dart'; |
| @@ -3,7 +3,7 @@ import 'package:flutter_screenutil/screenutil.dart'; | @@ -3,7 +3,7 @@ import 'package:flutter_screenutil/screenutil.dart'; | ||
| 3 | import 'package:one_key/pages/online_check/img_picker_widget.dart'; | 3 | import 'package:one_key/pages/online_check/img_picker_widget.dart'; |
| 4 | import 'package:one_key/provider/upload_img_provider.dart'; | 4 | import 'package:one_key/provider/upload_img_provider.dart'; |
| 5 | import 'package:one_key/res/colors.dart'; | 5 | import 'package:one_key/res/colors.dart'; |
| 6 | -import 'package:one_key/utils/navigator_util.dart'; | 6 | +import 'package:one_key/route/navigator_util.dart'; |
| 7 | import 'package:one_key/utils/upload_image_util.dart'; | 7 | import 'package:one_key/utils/upload_image_util.dart'; |
| 8 | import 'package:one_key/widgets/round_button.dart'; | 8 | import 'package:one_key/widgets/round_button.dart'; |
| 9 | import 'package:one_key/widgets/system_app_bar.dart'; | 9 | import 'package:one_key/widgets/system_app_bar.dart'; |
| @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | ||
| 2 | import 'package:flutter_screenutil/screenutil.dart'; | 2 | import 'package:flutter_screenutil/screenutil.dart'; |
| 3 | import 'package:one_key/provider/create_store_model.dart'; | 3 | import 'package:one_key/provider/create_store_model.dart'; |
| 4 | import 'package:one_key/res/colors.dart'; | 4 | import 'package:one_key/res/colors.dart'; |
| 5 | -import 'package:one_key/utils/navigator_util.dart'; | 5 | +import 'package:one_key/route/navigator_util.dart'; |
| 6 | import 'package:one_key/widgets/round_button.dart'; | 6 | import 'package:one_key/widgets/round_button.dart'; |
| 7 | import 'package:one_key/widgets/system_app_bar.dart'; | 7 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 8 | import 'package:one_key/widgets/v_empty_view.dart'; | 8 | import 'package:one_key/widgets/v_empty_view.dart'; |
| @@ -5,7 +5,7 @@ import 'package:one_key/provider/other_login_provider.dart'; | @@ -5,7 +5,7 @@ import 'package:one_key/provider/other_login_provider.dart'; | ||
| 5 | import 'package:one_key/provider/user_model.dart'; | 5 | import 'package:one_key/provider/user_model.dart'; |
| 6 | import 'package:one_key/res/colors.dart'; | 6 | import 'package:one_key/res/colors.dart'; |
| 7 | import 'package:one_key/route/route_handles.dart'; | 7 | import 'package:one_key/route/route_handles.dart'; |
| 8 | -import 'package:one_key/utils/navigator_util.dart'; | 8 | +import 'package:one_key/route/navigator_util.dart'; |
| 9 | import 'package:one_key/utils/utils.dart'; | 9 | import 'package:one_key/utils/utils.dart'; |
| 10 | import 'package:one_key/widgets/round_button.dart'; | 10 | import 'package:one_key/widgets/round_button.dart'; |
| 11 | import 'package:one_key/widgets/system_app_bar.dart'; | 11 | import 'package:one_key/widgets/system_app_bar.dart'; |
| @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | ||
| 2 | import 'package:flutter_screenutil/screenutil.dart'; | 2 | import 'package:flutter_screenutil/screenutil.dart'; |
| 3 | import 'package:one_key/provider/create_store_model.dart'; | 3 | import 'package:one_key/provider/create_store_model.dart'; |
| 4 | import 'package:one_key/res/colors.dart'; | 4 | import 'package:one_key/res/colors.dart'; |
| 5 | -import 'package:one_key/utils/navigator_util.dart'; | 5 | +import 'package:one_key/route/navigator_util.dart'; |
| 6 | import 'package:one_key/widgets/round_button.dart'; | 6 | import 'package:one_key/widgets/round_button.dart'; |
| 7 | import 'package:one_key/widgets/system_app_bar.dart'; | 7 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 8 | import 'package:one_key/widgets/v_empty_view.dart'; | 8 | import 'package:one_key/widgets/v_empty_view.dart'; |
| @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | ||
| 2 | import 'package:flutter_screenutil/screenutil.dart'; | 2 | import 'package:flutter_screenutil/screenutil.dart'; |
| 3 | import 'package:one_key/provider/create_store_model.dart'; | 3 | import 'package:one_key/provider/create_store_model.dart'; |
| 4 | import 'package:one_key/res/colors.dart'; | 4 | import 'package:one_key/res/colors.dart'; |
| 5 | -import 'package:one_key/utils/navigator_util.dart'; | 5 | +import 'package:one_key/route/navigator_util.dart'; |
| 6 | import 'package:one_key/widgets/round_button.dart'; | 6 | import 'package:one_key/widgets/round_button.dart'; |
| 7 | import 'package:one_key/widgets/system_app_bar.dart'; | 7 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 8 | import 'package:one_key/widgets/v_empty_view.dart'; | 8 | import 'package:one_key/widgets/v_empty_view.dart'; |
| @@ -6,7 +6,7 @@ import 'package:amap_search_fluttify/amap_search_fluttify.dart'; | @@ -6,7 +6,7 @@ import 'package:amap_search_fluttify/amap_search_fluttify.dart'; | ||
| 6 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 6 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 7 | import 'package:one_key/utils/dialog_util.dart'; | 7 | import 'package:one_key/utils/dialog_util.dart'; |
| 8 | import 'package:one_key/utils/misc.dart'; | 8 | import 'package:one_key/utils/misc.dart'; |
| 9 | -import 'package:one_key/utils/navigator_util.dart'; | 9 | +import 'package:one_key/route/navigator_util.dart'; |
| 10 | import 'package:one_key/widgets/system_app_bar.dart'; | 10 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 11 | import 'package:permission_handler/permission_handler.dart'; | 11 | import 'package:permission_handler/permission_handler.dart'; |
| 12 | // import 'package:demo/resources/custom_text_style.dart'; | 12 | // import 'package:demo/resources/custom_text_style.dart'; |
| @@ -11,7 +11,7 @@ import 'package:one_key/pages/online_check/progress.dart'; | @@ -11,7 +11,7 @@ import 'package:one_key/pages/online_check/progress.dart'; | ||
| 11 | import 'package:one_key/provider/upload_img_provider.dart'; | 11 | import 'package:one_key/provider/upload_img_provider.dart'; |
| 12 | import 'package:one_key/res/colors.dart'; | 12 | import 'package:one_key/res/colors.dart'; |
| 13 | 13 | ||
| 14 | -import 'package:one_key/utils/navigator_util.dart'; | 14 | +import 'package:one_key/route/navigator_util.dart'; |
| 15 | import 'package:one_key/utils/upload_image_util.dart'; | 15 | import 'package:one_key/utils/upload_image_util.dart'; |
| 16 | import 'package:one_key/utils/utils.dart'; | 16 | import 'package:one_key/utils/utils.dart'; |
| 17 | import 'package:one_key/widgets/MyDivider.dart'; | 17 | import 'package:one_key/widgets/MyDivider.dart'; |
| @@ -10,7 +10,7 @@ import 'package:one_key/provider/notebook_detail_model.dart'; | @@ -10,7 +10,7 @@ import 'package:one_key/provider/notebook_detail_model.dart'; | ||
| 10 | import 'package:one_key/provider/user_model.dart'; | 10 | import 'package:one_key/provider/user_model.dart'; |
| 11 | import 'package:one_key/res/colors.dart'; | 11 | import 'package:one_key/res/colors.dart'; |
| 12 | import 'package:one_key/utils/dialog_util.dart'; | 12 | import 'package:one_key/utils/dialog_util.dart'; |
| 13 | -import 'package:one_key/utils/navigator_util.dart'; | 13 | +import 'package:one_key/route/navigator_util.dart'; |
| 14 | import 'package:one_key/utils/utils.dart'; | 14 | import 'package:one_key/utils/utils.dart'; |
| 15 | import 'package:one_key/widgets/MyDivider.dart'; | 15 | import 'package:one_key/widgets/MyDivider.dart'; |
| 16 | import 'package:one_key/widgets/app_bar.dart'; | 16 | import 'package:one_key/widgets/app_bar.dart'; |
| @@ -18,7 +18,7 @@ import 'package:one_key/res/colors.dart'; | @@ -18,7 +18,7 @@ import 'package:one_key/res/colors.dart'; | ||
| 18 | import 'package:one_key/utils/dialog_util.dart'; | 18 | import 'package:one_key/utils/dialog_util.dart'; |
| 19 | import 'package:one_key/utils/event_bus.dart'; | 19 | import 'package:one_key/utils/event_bus.dart'; |
| 20 | import 'package:one_key/utils/misc.dart'; | 20 | import 'package:one_key/utils/misc.dart'; |
| 21 | -import 'package:one_key/utils/navigator_util.dart'; | 21 | +import 'package:one_key/route/navigator_util.dart'; |
| 22 | import 'package:one_key/utils/triangle_custom_painter.dart'; | 22 | import 'package:one_key/utils/triangle_custom_painter.dart'; |
| 23 | import 'package:one_key/utils/utils.dart'; | 23 | import 'package:one_key/utils/utils.dart'; |
| 24 | import 'package:one_key/widgets/MyDivider.dart'; | 24 | import 'package:one_key/widgets/MyDivider.dart'; |
| @@ -13,7 +13,7 @@ import 'package:one_key/provider/user_model.dart'; | @@ -13,7 +13,7 @@ import 'package:one_key/provider/user_model.dart'; | ||
| 13 | import 'package:one_key/res/colors.dart'; | 13 | import 'package:one_key/res/colors.dart'; |
| 14 | import 'package:one_key/utils/dialog_util.dart'; | 14 | import 'package:one_key/utils/dialog_util.dart'; |
| 15 | import 'package:one_key/utils/event_bus.dart'; | 15 | import 'package:one_key/utils/event_bus.dart'; |
| 16 | -import 'package:one_key/utils/navigator_util.dart'; | 16 | +import 'package:one_key/route/navigator_util.dart'; |
| 17 | import 'package:one_key/utils/utils.dart'; | 17 | import 'package:one_key/utils/utils.dart'; |
| 18 | import 'package:one_key/widgets/MyDivider.dart'; | 18 | import 'package:one_key/widgets/MyDivider.dart'; |
| 19 | import 'package:one_key/widgets/app_bar.dart'; | 19 | import 'package:one_key/widgets/app_bar.dart'; |
| @@ -11,7 +11,7 @@ import 'package:one_key/provider/enter_model.dart'; | @@ -11,7 +11,7 @@ import 'package:one_key/provider/enter_model.dart'; | ||
| 11 | import 'package:one_key/res/colors.dart'; | 11 | import 'package:one_key/res/colors.dart'; |
| 12 | import 'package:one_key/utils/dialog_util.dart'; | 12 | import 'package:one_key/utils/dialog_util.dart'; |
| 13 | import 'package:one_key/utils/event_bus.dart'; | 13 | import 'package:one_key/utils/event_bus.dart'; |
| 14 | -import 'package:one_key/utils/navigator_util.dart'; | 14 | +import 'package:one_key/route/navigator_util.dart'; |
| 15 | import 'package:one_key/utils/utils.dart'; | 15 | import 'package:one_key/utils/utils.dart'; |
| 16 | import 'package:one_key/widgets/MyDivider.dart'; | 16 | import 'package:one_key/widgets/MyDivider.dart'; |
| 17 | import 'package:one_key/widgets/app_bar.dart'; | 17 | import 'package:one_key/widgets/app_bar.dart'; |
| @@ -23,7 +23,7 @@ import 'package:one_key/provider/user_model.dart'; | @@ -23,7 +23,7 @@ import 'package:one_key/provider/user_model.dart'; | ||
| 23 | import 'package:one_key/res/colors.dart'; | 23 | import 'package:one_key/res/colors.dart'; |
| 24 | import 'package:one_key/utils/dialog_util.dart'; | 24 | import 'package:one_key/utils/dialog_util.dart'; |
| 25 | 25 | ||
| 26 | -import 'package:one_key/utils/navigator_util.dart'; | 26 | +import 'package:one_key/route/navigator_util.dart'; |
| 27 | import 'package:one_key/utils/utils.dart'; | 27 | import 'package:one_key/utils/utils.dart'; |
| 28 | import 'package:provider/provider.dart'; | 28 | import 'package:provider/provider.dart'; |
| 29 | import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; | 29 | import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; |
| @@ -15,7 +15,7 @@ import 'package:one_key/provider/coupon_provider.dart'; | @@ -15,7 +15,7 @@ import 'package:one_key/provider/coupon_provider.dart'; | ||
| 15 | import 'package:one_key/provider/user_model.dart'; | 15 | import 'package:one_key/provider/user_model.dart'; |
| 16 | import 'package:one_key/res/colors.dart'; | 16 | import 'package:one_key/res/colors.dart'; |
| 17 | import 'package:one_key/utils/misc.dart'; | 17 | import 'package:one_key/utils/misc.dart'; |
| 18 | -import 'package:one_key/utils/navigator_util.dart'; | 18 | +import 'package:one_key/route/navigator_util.dart'; |
| 19 | import 'package:one_key/utils/utils.dart'; | 19 | import 'package:one_key/utils/utils.dart'; |
| 20 | import 'package:one_key/widgets/h_empty_view.dart'; | 20 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 21 | import 'package:one_key/widgets/round_button.dart'; | 21 | import 'package:one_key/widgets/round_button.dart'; |
| @@ -7,7 +7,7 @@ import 'package:one_key/provider/create_store_model.dart'; | @@ -7,7 +7,7 @@ import 'package:one_key/provider/create_store_model.dart'; | ||
| 7 | import 'package:one_key/provider/other_login_provider.dart'; | 7 | import 'package:one_key/provider/other_login_provider.dart'; |
| 8 | import 'package:one_key/provider/user_model.dart'; | 8 | import 'package:one_key/provider/user_model.dart'; |
| 9 | import 'package:one_key/res/colors.dart'; | 9 | import 'package:one_key/res/colors.dart'; |
| 10 | -import 'package:one_key/utils/navigator_util.dart'; | 10 | +import 'package:one_key/route/navigator_util.dart'; |
| 11 | import 'package:one_key/utils/utils.dart'; | 11 | import 'package:one_key/utils/utils.dart'; |
| 12 | import 'package:one_key/widgets/h_empty_view.dart'; | 12 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 13 | import 'package:one_key/widgets/round_button.dart'; | 13 | import 'package:one_key/widgets/round_button.dart'; |
| @@ -15,7 +15,7 @@ import 'package:one_key/provider/create_store_model.dart'; | @@ -15,7 +15,7 @@ import 'package:one_key/provider/create_store_model.dart'; | ||
| 15 | import 'package:one_key/provider/other_login_provider.dart'; | 15 | import 'package:one_key/provider/other_login_provider.dart'; |
| 16 | import 'package:one_key/provider/user_model.dart'; | 16 | import 'package:one_key/provider/user_model.dart'; |
| 17 | import 'package:one_key/res/colors.dart'; | 17 | import 'package:one_key/res/colors.dart'; |
| 18 | -import 'package:one_key/utils/navigator_util.dart'; | 18 | +import 'package:one_key/route/navigator_util.dart'; |
| 19 | import 'package:one_key/utils/utils.dart'; | 19 | import 'package:one_key/utils/utils.dart'; |
| 20 | import 'package:one_key/widgets/page_exception.dart'; | 20 | import 'package:one_key/widgets/page_exception.dart'; |
| 21 | import 'package:one_key/widgets/round_button.dart'; | 21 | import 'package:one_key/widgets/round_button.dart'; |
| @@ -18,7 +18,7 @@ import 'package:one_key/provider/other_login_provider.dart'; | @@ -18,7 +18,7 @@ import 'package:one_key/provider/other_login_provider.dart'; | ||
| 18 | import 'package:one_key/provider/user_model.dart'; | 18 | import 'package:one_key/provider/user_model.dart'; |
| 19 | import 'package:one_key/res/colors.dart'; | 19 | import 'package:one_key/res/colors.dart'; |
| 20 | import 'package:one_key/route/navigate_service.dart'; | 20 | import 'package:one_key/route/navigate_service.dart'; |
| 21 | -import 'package:one_key/utils/navigator_util.dart'; | 21 | +import 'package:one_key/route/navigator_util.dart'; |
| 22 | import 'package:one_key/utils/utils.dart'; | 22 | import 'package:one_key/utils/utils.dart'; |
| 23 | import 'package:one_key/widgets/MyDivider.dart'; | 23 | import 'package:one_key/widgets/MyDivider.dart'; |
| 24 | import 'package:one_key/widgets/h_empty_view.dart'; | 24 | import 'package:one_key/widgets/h_empty_view.dart'; |
| @@ -8,7 +8,7 @@ import 'package:one_key/provider/message_dialog_model.dart'; | @@ -8,7 +8,7 @@ import 'package:one_key/provider/message_dialog_model.dart'; | ||
| 8 | import 'package:one_key/provider/user_model.dart'; | 8 | import 'package:one_key/provider/user_model.dart'; |
| 9 | import 'package:one_key/res/colors.dart'; | 9 | import 'package:one_key/res/colors.dart'; |
| 10 | import 'package:one_key/utils/event_bus.dart'; | 10 | import 'package:one_key/utils/event_bus.dart'; |
| 11 | -import 'package:one_key/utils/navigator_util.dart'; | 11 | +import 'package:one_key/route/navigator_util.dart'; |
| 12 | import 'package:one_key/widgets/common_button.dart'; | 12 | import 'package:one_key/widgets/common_button.dart'; |
| 13 | import 'package:one_key/widgets/h_empty_view.dart'; | 13 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 14 | import 'package:one_key/widgets/v_empty_view.dart'; | 14 | import 'package:one_key/widgets/v_empty_view.dart'; |
| @@ -8,7 +8,7 @@ import 'package:one_key/provider/order_food_provider.dart'; | @@ -8,7 +8,7 @@ import 'package:one_key/provider/order_food_provider.dart'; | ||
| 8 | import 'package:one_key/provider/user_model.dart'; | 8 | import 'package:one_key/provider/user_model.dart'; |
| 9 | import 'package:one_key/res/colors.dart'; | 9 | import 'package:one_key/res/colors.dart'; |
| 10 | import 'package:one_key/utils/event_bus.dart'; | 10 | import 'package:one_key/utils/event_bus.dart'; |
| 11 | -import 'package:one_key/utils/navigator_util.dart'; | 11 | +import 'package:one_key/route/navigator_util.dart'; |
| 12 | import 'package:one_key/utils/utils.dart'; | 12 | import 'package:one_key/utils/utils.dart'; |
| 13 | import 'package:one_key/widgets/MyDivider.dart'; | 13 | import 'package:one_key/widgets/MyDivider.dart'; |
| 14 | import 'package:one_key/widgets/h_empty_view.dart'; | 14 | import 'package:one_key/widgets/h_empty_view.dart'; |
| @@ -5,7 +5,7 @@ import 'package:one_key/provider/message_dialog_model.dart'; | @@ -5,7 +5,7 @@ import 'package:one_key/provider/message_dialog_model.dart'; | ||
| 5 | import 'package:one_key/provider/user_model.dart'; | 5 | import 'package:one_key/provider/user_model.dart'; |
| 6 | import 'package:one_key/res/colors.dart'; | 6 | import 'package:one_key/res/colors.dart'; |
| 7 | import 'package:one_key/utils/event_bus.dart'; | 7 | import 'package:one_key/utils/event_bus.dart'; |
| 8 | -import 'package:one_key/utils/navigator_util.dart'; | 8 | +import 'package:one_key/route/navigator_util.dart'; |
| 9 | import 'package:one_key/widgets/common_button.dart'; | 9 | import 'package:one_key/widgets/common_button.dart'; |
| 10 | import 'package:one_key/widgets/h_empty_view.dart'; | 10 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 11 | import 'package:one_key/widgets/v_empty_view.dart'; | 11 | import 'package:one_key/widgets/v_empty_view.dart'; |
lib/pages/my/my_integral_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/models/integral_model.dart'; | ||
| 4 | +import 'package:one_key/provider/my_model.dart'; | ||
| 5 | +import 'package:one_key/res/colors.dart'; | ||
| 6 | +import 'package:one_key/utils/event_bus.dart'; | ||
| 7 | +import 'package:one_key/utils/utils.dart'; | ||
| 8 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 9 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 10 | +import 'package:one_key/widgets/my_item.dart'; | ||
| 11 | +import 'package:one_key/widgets/round_button.dart'; | ||
| 12 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 13 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 14 | +import 'package:provider/provider.dart'; | ||
| 15 | + | ||
| 16 | +class MyIntegralPage extends StatefulWidget { | ||
| 17 | + final IntegralSunModel sunModel; | ||
| 18 | + MyIntegralPage({Key key, this.sunModel}) : super(key: key); | ||
| 19 | + | ||
| 20 | + @override | ||
| 21 | + _MyIntegralPageState createState() => _MyIntegralPageState(); | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | +class _MyIntegralPageState extends State<MyIntegralPage> { | ||
| 25 | + // MyModel myModel; | ||
| 26 | + @override | ||
| 27 | + void initState() { | ||
| 28 | + super.initState(); | ||
| 29 | + Utils.changeStatusColor(color: MyColours.color_199095); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + @override | ||
| 33 | + Widget build(BuildContext context) { | ||
| 34 | + // myModel = Provider.of<MyModel>(context, listen: true); | ||
| 35 | + return Scaffold( | ||
| 36 | + backgroundColor: MyColours.color_f5f5f5, | ||
| 37 | + appBar: SystemAppBar( | ||
| 38 | + '我的积分', | ||
| 39 | + bgColor: MyColours.color_199095, | ||
| 40 | + needWhite: true, | ||
| 41 | + onTap: () { | ||
| 42 | + EventBus().emit('changeStatusColor'); | ||
| 43 | + Navigator.of(context).pop(); | ||
| 44 | + }, | ||
| 45 | + ), | ||
| 46 | + body: Container( | ||
| 47 | + child: SingleChildScrollView( | ||
| 48 | + child: Column( | ||
| 49 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 50 | + children: [ | ||
| 51 | + Stack( | ||
| 52 | + clipBehavior: Clip.none, | ||
| 53 | + children: [ | ||
| 54 | + Container( | ||
| 55 | + height: ScreenUtil().setWidth(145 * 2), | ||
| 56 | + color: MyColours.color_199095, | ||
| 57 | + child: Column( | ||
| 58 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 59 | + children: [ | ||
| 60 | + VEmptyView(40), | ||
| 61 | + Container( | ||
| 62 | + alignment: Alignment.center, | ||
| 63 | + width: double.infinity, | ||
| 64 | + height: ScreenUtil().setWidth(56 * 2), | ||
| 65 | + child: Text( | ||
| 66 | + widget.sunModel?.myIntegral != null | ||
| 67 | + ? widget.sunModel.myIntegral | ||
| 68 | + : '0', | ||
| 69 | + style: TextStyle( | ||
| 70 | + fontSize: ScreenUtil().setSp(80), | ||
| 71 | + color: MyColours.color_fefefe, | ||
| 72 | + fontWeight: FontWeight.bold), | ||
| 73 | + )), | ||
| 74 | + Container( | ||
| 75 | + alignment: Alignment.center, | ||
| 76 | + width: double.infinity, | ||
| 77 | + height: ScreenUtil().setWidth(20 * 2), | ||
| 78 | + child: Text( | ||
| 79 | + '当前积分', | ||
| 80 | + style: TextStyle( | ||
| 81 | + fontSize: ScreenUtil().setSp(28), | ||
| 82 | + color: Color.fromRGBO(255, 255, 255, 0.6), | ||
| 83 | + ), | ||
| 84 | + ), | ||
| 85 | + ) | ||
| 86 | + ], | ||
| 87 | + ), | ||
| 88 | + ), | ||
| 89 | + Positioned( | ||
| 90 | + bottom: ScreenUtil().setWidth(-205 * 2 + 18 * 2), | ||
| 91 | + left: ScreenUtil().setWidth(20), | ||
| 92 | + right: ScreenUtil().setWidth(20), | ||
| 93 | + child: Container( | ||
| 94 | + padding: EdgeInsets.symmetric( | ||
| 95 | + vertical: ScreenUtil().setWidth(20)), | ||
| 96 | + // height: ScreenUtil().setWidth(205 * 2), | ||
| 97 | + decoration: BoxDecoration( | ||
| 98 | + borderRadius: | ||
| 99 | + BorderRadius.circular(ScreenUtil().setWidth(40)), | ||
| 100 | + color: Colors.white), | ||
| 101 | + child: Column( | ||
| 102 | + children: [ | ||
| 103 | + MyItem( | ||
| 104 | + title: '已兑换积分', | ||
| 105 | + content: widget.sunModel?.converted != null | ||
| 106 | + ? widget.sunModel.converted | ||
| 107 | + : '0', | ||
| 108 | + needRadius: true, | ||
| 109 | + ), | ||
| 110 | + Padding( | ||
| 111 | + padding: EdgeInsets.symmetric( | ||
| 112 | + horizontal: ScreenUtil().setWidth(40)), | ||
| 113 | + child: MyDivider( | ||
| 114 | + double.infinity, | ||
| 115 | + ScreenUtil().setWidth(2), | ||
| 116 | + color: MyColours.color_f3f3f3, | ||
| 117 | + )), | ||
| 118 | + MyItem( | ||
| 119 | + title: '累计积分', | ||
| 120 | + content: widget.sunModel?.cumulative != null | ||
| 121 | + ? widget.sunModel.cumulative | ||
| 122 | + : '0', | ||
| 123 | + needRadius: true, | ||
| 124 | + ), | ||
| 125 | + Padding( | ||
| 126 | + padding: EdgeInsets.symmetric( | ||
| 127 | + horizontal: ScreenUtil().setWidth(40)), | ||
| 128 | + child: MyDivider( | ||
| 129 | + double.infinity, | ||
| 130 | + ScreenUtil().setWidth(2), | ||
| 131 | + color: MyColours.color_f3f3f3, | ||
| 132 | + )), | ||
| 133 | + MyItem( | ||
| 134 | + title: '待审核积分', | ||
| 135 | + content: widget.sunModel?.reviewed != null | ||
| 136 | + ? widget.sunModel.reviewed | ||
| 137 | + : '0', | ||
| 138 | + needRadius: true, | ||
| 139 | + ) | ||
| 140 | + ], | ||
| 141 | + ), | ||
| 142 | + )) | ||
| 143 | + ], | ||
| 144 | + ), | ||
| 145 | + VEmptyView(434), | ||
| 146 | + RoundButton( | ||
| 147 | + onPressed: () async {}, | ||
| 148 | + text: '兑换', | ||
| 149 | + fontSize: 34, | ||
| 150 | + isBold: false, | ||
| 151 | + height: ScreenUtil().setWidth(84), | ||
| 152 | + width: ScreenUtil().setWidth(155 * 2), | ||
| 153 | + radius: ScreenUtil().setWidth(10), | ||
| 154 | + ), | ||
| 155 | + VEmptyView(100), | ||
| 156 | + Padding( | ||
| 157 | + padding: | ||
| 158 | + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), | ||
| 159 | + child: Text( | ||
| 160 | + '积分规则:\n1.每成功创建一个内部预订的预订安排微信发送给客户并且客户打开后,获得10积分;\n2.每个餐厅每天每个时段预订安排发送总量不能超过现有桌位数;\n3.同一顾客同一时段的订单,积分只给最早创建内部预订的经理;\n4.订单创建人转发的预订安排,才可获得积分,转发他人创建的订单无效。', | ||
| 161 | + style: TextStyle( | ||
| 162 | + fontSize: ScreenUtil().setSp(24), | ||
| 163 | + color: MyColours.color_999999, | ||
| 164 | + height: 1.3))) | ||
| 165 | + ], | ||
| 166 | + )))); | ||
| 167 | + } | ||
| 168 | +} |
| @@ -7,7 +7,7 @@ import 'package:one_key/provider/update_model.dart'; | @@ -7,7 +7,7 @@ import 'package:one_key/provider/update_model.dart'; | ||
| 7 | import 'package:one_key/provider/user_model.dart'; | 7 | import 'package:one_key/provider/user_model.dart'; |
| 8 | import 'package:one_key/res/colors.dart'; | 8 | import 'package:one_key/res/colors.dart'; |
| 9 | import 'package:one_key/utils/event_bus.dart'; | 9 | import 'package:one_key/utils/event_bus.dart'; |
| 10 | -import 'package:one_key/utils/navigator_util.dart'; | 10 | +import 'package:one_key/route/navigator_util.dart'; |
| 11 | import 'package:one_key/utils/utils.dart'; | 11 | import 'package:one_key/utils/utils.dart'; |
| 12 | import 'package:one_key/widgets/MyDivider.dart'; | 12 | import 'package:one_key/widgets/MyDivider.dart'; |
| 13 | import 'package:one_key/widgets/app_bar.dart'; | 13 | import 'package:one_key/widgets/app_bar.dart'; |
| @@ -48,6 +48,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -48,6 +48,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 48 | WidgetsBinding.instance.addPostFrameCallback((_) async { | 48 | WidgetsBinding.instance.addPostFrameCallback((_) async { |
| 49 | ///获取短信余量 | 49 | ///获取短信余量 |
| 50 | _getSmsInfo(context); | 50 | _getSmsInfo(context); |
| 51 | + _getMyIntegral(context); | ||
| 52 | + | ||
| 53 | + ///获取积分 | ||
| 51 | }); | 54 | }); |
| 52 | EventBus().on('changeStatusColor', (arg) { | 55 | EventBus().on('changeStatusColor', (arg) { |
| 53 | Utils.changeStatusColor(color: Colors.transparent); | 56 | Utils.changeStatusColor(color: Colors.transparent); |
| @@ -95,6 +98,11 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -95,6 +98,11 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 95 | // }); | 98 | // }); |
| 96 | } | 99 | } |
| 97 | 100 | ||
| 101 | + ///获取我的积分 | ||
| 102 | + _getMyIntegral(context) async { | ||
| 103 | + await myModel.getMyIntegral(context); | ||
| 104 | + } | ||
| 105 | + | ||
| 98 | //检查版本更新 | 106 | //检查版本更新 |
| 99 | checkUpdate() { | 107 | checkUpdate() { |
| 100 | UpdateModel updateModel = new UpdateModel(); | 108 | UpdateModel updateModel = new UpdateModel(); |
| @@ -124,7 +132,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -124,7 +132,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 124 | SliverAppBar( | 132 | SliverAppBar( |
| 125 | pinned: false, | 133 | pinned: false, |
| 126 | floating: false, | 134 | floating: false, |
| 127 | - expandedHeight: ScreenUtil().setWidth(260), | 135 | + expandedHeight: ScreenUtil().setWidth(260 + 40), |
| 128 | flexibleSpace: FlexibleSpaceBar( | 136 | flexibleSpace: FlexibleSpaceBar( |
| 129 | collapseMode: CollapseMode.pin, | 137 | collapseMode: CollapseMode.pin, |
| 130 | background: Consumer<UserModel>(builder: | 138 | background: Consumer<UserModel>(builder: |
| @@ -133,37 +141,69 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -133,37 +141,69 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 133 | children: [ | 141 | children: [ |
| 134 | Container( | 142 | Container( |
| 135 | width: double.infinity, | 143 | width: double.infinity, |
| 136 | - height: ScreenUtil().setHeight(260), | 144 | + height: ScreenUtil().setHeight(260 + 30), |
| 137 | alignment: Alignment.centerLeft, | 145 | alignment: Alignment.centerLeft, |
| 138 | color: MyColours.color_199095, | 146 | color: MyColours.color_199095, |
| 139 | ), | 147 | ), |
| 140 | Padding( | 148 | Padding( |
| 141 | padding: | 149 | padding: |
| 142 | - EdgeInsets.only(left: ScreenUtil().setWidth(40)), | 150 | + EdgeInsets.only(left: ScreenUtil().setWidth(30)), |
| 143 | child: Column( | 151 | child: Column( |
| 144 | crossAxisAlignment: CrossAxisAlignment.start, | 152 | crossAxisAlignment: CrossAxisAlignment.start, |
| 145 | children: [ | 153 | children: [ |
| 146 | VEmptyView(58), | 154 | VEmptyView(58), |
| 147 | - Text( | ||
| 148 | - model.user.sellername, | ||
| 149 | - style: TextStyle( | ||
| 150 | - color: MyColours.color_ffffff, | ||
| 151 | - fontSize: ScreenUtil().setSp(36)), | ||
| 152 | - ), | ||
| 153 | - VEmptyView(28), | ||
| 154 | - Text( | ||
| 155 | - model.user.account + | ||
| 156 | - " | " + | ||
| 157 | - model.user.role_name, | ||
| 158 | - style: TextStyle( | ||
| 159 | - color: MyColours.color_ffffff, | ||
| 160 | - fontSize: ScreenUtil().setSp(30)), | 155 | + Container( |
| 156 | + height: ScreenUtil().setWidth(50), | ||
| 157 | + child: Text( | ||
| 158 | + model.user.sellername, | ||
| 159 | + style: TextStyle( | ||
| 160 | + color: MyColours.color_ffffff, | ||
| 161 | + fontSize: ScreenUtil().setSp(36)), | ||
| 162 | + ), | ||
| 161 | ), | 163 | ), |
| 164 | + VEmptyView(30), | ||
| 165 | + Container( | ||
| 166 | + height: ScreenUtil().setWidth(40), | ||
| 167 | + child: Text( | ||
| 168 | + model.user.account + | ||
| 169 | + " | " + | ||
| 170 | + model.user.role_name, | ||
| 171 | + style: TextStyle( | ||
| 172 | + color: MyColours.color_ffffff, | ||
| 173 | + fontSize: ScreenUtil().setSp(30)), | ||
| 174 | + )), | ||
| 175 | + VEmptyView(20), | ||
| 176 | + InkWell( | ||
| 177 | + onTap: () { | ||
| 178 | + NavigatorUtil.goMyIntegralPage(context, | ||
| 179 | + sunModel: myModel.integralSunModel); | ||
| 180 | + }, | ||
| 181 | + child: Container( | ||
| 182 | + height: ScreenUtil().setWidth(48), | ||
| 183 | + padding: EdgeInsets.symmetric( | ||
| 184 | + horizontal: ScreenUtil().setWidth(20), | ||
| 185 | + vertical: ScreenUtil().setWidth(8)), | ||
| 186 | + decoration: BoxDecoration( | ||
| 187 | + borderRadius: BorderRadius.circular( | ||
| 188 | + ScreenUtil().setWidth(24)), | ||
| 189 | + border: Border.all( | ||
| 190 | + width: ScreenUtil().setWidth(2), | ||
| 191 | + color: | ||
| 192 | + Color.fromRGBO(255, 255, 255, 0.2)), | ||
| 193 | + color: Color.fromRGBO(255, 255, 255, 0.1)), | ||
| 194 | + child: Text( | ||
| 195 | + '积分${myModel.integralSunModel != null && myModel.integralSunModel.myIntegral != null ? myModel.integralSunModel?.myIntegral : '0'}', | ||
| 196 | + style: TextStyle( | ||
| 197 | + color: MyColours.color_ffffff, | ||
| 198 | + fontSize: ScreenUtil().setSp(22)), | ||
| 199 | + ), | ||
| 200 | + ), | ||
| 201 | + ) | ||
| 162 | ], | 202 | ], |
| 163 | )), | 203 | )), |
| 164 | Positioned( | 204 | Positioned( |
| 165 | right: ScreenUtil().setWidth(40), | 205 | right: ScreenUtil().setWidth(40), |
| 166 | - bottom: ScreenUtil().setWidth(70), | 206 | + bottom: ScreenUtil().setWidth(120), |
| 167 | child: RoundButton( | 207 | child: RoundButton( |
| 168 | image: Utils.getImgPath('edit'), | 208 | image: Utils.getImgPath('edit'), |
| 169 | text: '编辑', | 209 | text: '编辑', |
| @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | ||
| 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 3 | import 'package:one_key/models/notebook.dart'; | 3 | import 'package:one_key/models/notebook.dart'; |
| 4 | import 'package:one_key/res/colors.dart'; | 4 | import 'package:one_key/res/colors.dart'; |
| 5 | -import 'package:one_key/utils/navigator_util.dart'; | 5 | +import 'package:one_key/route/navigator_util.dart'; |
| 6 | import 'package:one_key/widgets/MyDivider.dart'; | 6 | import 'package:one_key/widgets/MyDivider.dart'; |
| 7 | import 'package:one_key/widgets/v_empty_view.dart'; | 7 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 8 | 8 |
| @@ -6,7 +6,7 @@ import 'package:one_key/provider/order_food_provider.dart'; | @@ -6,7 +6,7 @@ import 'package:one_key/provider/order_food_provider.dart'; | ||
| 6 | import 'package:one_key/provider/user_model.dart'; | 6 | import 'package:one_key/provider/user_model.dart'; |
| 7 | import 'package:one_key/res/colors.dart'; | 7 | import 'package:one_key/res/colors.dart'; |
| 8 | import 'package:one_key/utils/event_bus.dart'; | 8 | import 'package:one_key/utils/event_bus.dart'; |
| 9 | -import 'package:one_key/utils/navigator_util.dart'; | 9 | +import 'package:one_key/route/navigator_util.dart'; |
| 10 | import 'package:one_key/utils/utils.dart'; | 10 | import 'package:one_key/utils/utils.dart'; |
| 11 | import 'package:one_key/widgets/h_empty_view.dart'; | 11 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 12 | import 'package:one_key/widgets/system_app_bar.dart'; | 12 | import 'package:one_key/widgets/system_app_bar.dart'; |
| @@ -8,7 +8,7 @@ import 'package:one_key/provider/upload_img_provider.dart'; | @@ -8,7 +8,7 @@ import 'package:one_key/provider/upload_img_provider.dart'; | ||
| 8 | import 'package:one_key/provider/user_model.dart'; | 8 | import 'package:one_key/provider/user_model.dart'; |
| 9 | import 'package:one_key/res/colors.dart'; | 9 | import 'package:one_key/res/colors.dart'; |
| 10 | import 'package:one_key/utils/event_bus.dart'; | 10 | import 'package:one_key/utils/event_bus.dart'; |
| 11 | -import 'package:one_key/utils/navigator_util.dart'; | 11 | +import 'package:one_key/route/navigator_util.dart'; |
| 12 | import 'package:one_key/utils/utils.dart'; | 12 | import 'package:one_key/utils/utils.dart'; |
| 13 | import 'package:one_key/widgets/h_empty_view.dart'; | 13 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 14 | import 'package:one_key/widgets/system_app_bar.dart'; | 14 | import 'package:one_key/widgets/system_app_bar.dart'; |
| @@ -12,7 +12,7 @@ import 'package:one_key/provider/user_model.dart'; | @@ -12,7 +12,7 @@ import 'package:one_key/provider/user_model.dart'; | ||
| 12 | import 'package:one_key/res/colors.dart'; | 12 | import 'package:one_key/res/colors.dart'; |
| 13 | import 'package:one_key/utils/dialog_util.dart'; | 13 | import 'package:one_key/utils/dialog_util.dart'; |
| 14 | import 'package:one_key/utils/event_bus.dart'; | 14 | import 'package:one_key/utils/event_bus.dart'; |
| 15 | -import 'package:one_key/utils/navigator_util.dart'; | 15 | +import 'package:one_key/route/navigator_util.dart'; |
| 16 | import 'package:one_key/utils/upload_image_util.dart'; | 16 | import 'package:one_key/utils/upload_image_util.dart'; |
| 17 | import 'package:one_key/utils/utils.dart'; | 17 | import 'package:one_key/utils/utils.dart'; |
| 18 | import 'package:one_key/widgets/MyDivider.dart'; | 18 | import 'package:one_key/widgets/MyDivider.dart'; |
| @@ -8,7 +8,7 @@ import 'package:one_key/provider/table_manager_model.dart'; | @@ -8,7 +8,7 @@ import 'package:one_key/provider/table_manager_model.dart'; | ||
| 8 | import 'package:one_key/res/colors.dart'; | 8 | import 'package:one_key/res/colors.dart'; |
| 9 | import 'package:one_key/utils/dialog_util.dart'; | 9 | import 'package:one_key/utils/dialog_util.dart'; |
| 10 | import 'package:one_key/utils/event_bus.dart'; | 10 | import 'package:one_key/utils/event_bus.dart'; |
| 11 | -import 'package:one_key/utils/navigator_util.dart'; | 11 | +import 'package:one_key/route/navigator_util.dart'; |
| 12 | import 'package:one_key/widgets/MyDivider.dart'; | 12 | import 'package:one_key/widgets/MyDivider.dart'; |
| 13 | import 'package:one_key/widgets/app_bar.dart'; | 13 | import 'package:one_key/widgets/app_bar.dart'; |
| 14 | import 'package:one_key/widgets/area_item.dart'; | 14 | import 'package:one_key/widgets/area_item.dart'; |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | import 'package:one_key/constant/constant.dart'; | 2 | import 'package:one_key/constant/constant.dart'; |
| 3 | import 'package:one_key/constant/error.dart'; | 3 | import 'package:one_key/constant/error.dart'; |
| 4 | +import 'package:one_key/models/integral_model.dart'; | ||
| 4 | import 'package:one_key/models/sms_info.dart'; | 5 | import 'package:one_key/models/sms_info.dart'; |
| 5 | import 'package:one_key/net/base_resp.dart'; | 6 | import 'package:one_key/net/base_resp.dart'; |
| 6 | import 'package:one_key/net/dio_util.dart'; | 7 | import 'package:one_key/net/dio_util.dart'; |
| @@ -12,6 +13,7 @@ import 'package:provider/provider.dart'; | @@ -12,6 +13,7 @@ import 'package:provider/provider.dart'; | ||
| 12 | 13 | ||
| 13 | class MyModel extends ChangeNotifier { | 14 | class MyModel extends ChangeNotifier { |
| 14 | String smsInfo = ''; | 15 | String smsInfo = ''; |
| 16 | + IntegralSunModel integralSunModel; | ||
| 15 | 17 | ||
| 16 | /// 短信余量查询及套餐查询接口 | 18 | /// 短信余量查询及套餐查询接口 |
| 17 | Future<SmsInfoData> getSmsInfo(BuildContext context) async { | 19 | Future<SmsInfoData> getSmsInfo(BuildContext context) async { |
| @@ -54,4 +56,41 @@ class MyModel extends ChangeNotifier { | @@ -54,4 +56,41 @@ class MyModel extends ChangeNotifier { | ||
| 54 | } | 56 | } |
| 55 | } | 57 | } |
| 56 | } | 58 | } |
| 59 | + | ||
| 60 | + /// 获取客户经理积分列表 | ||
| 61 | + Future<IntegralSunModel> getMyIntegral(BuildContext context) async { | ||
| 62 | + Map<String, String> params = { | ||
| 63 | + "uid": Provider.of<UserModel>(context, listen: false).user.openid | ||
| 64 | + }; | ||
| 65 | + try { | ||
| 66 | + BaseResp<dynamic> baseResp = await DioUtil() | ||
| 67 | + .request<dynamic>(context, Method.get, HttpUrl.get_integral_list, | ||
| 68 | + data: params, showLoading: false) | ||
| 69 | + .catchError((error) { | ||
| 70 | + print(error.toString()); | ||
| 71 | + }); | ||
| 72 | + | ||
| 73 | + if (baseResp?.code == Constant.status_success) { | ||
| 74 | + integralSunModel = IntegralModel.fromJson(baseResp.responseData).data; | ||
| 75 | + } else { | ||
| 76 | + print('查询失败'); | ||
| 77 | + } | ||
| 78 | + notifyListeners(); | ||
| 79 | + return integralSunModel; | ||
| 80 | + } catch (error) { | ||
| 81 | + if (error is MyError) { | ||
| 82 | + switch (error.type) { | ||
| 83 | + case 1: | ||
| 84 | + print('错误'); | ||
| 85 | + break; | ||
| 86 | + case 2: | ||
| 87 | + print('超时'); | ||
| 88 | + break; | ||
| 89 | + default: | ||
| 90 | + print('错误'); | ||
| 91 | + break; | ||
| 92 | + } | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + } | ||
| 57 | } | 96 | } |
| @@ -8,7 +8,7 @@ import 'package:one_key/net/base_resp.dart'; | @@ -8,7 +8,7 @@ import 'package:one_key/net/base_resp.dart'; | ||
| 8 | import 'package:one_key/net/dio_util.dart'; | 8 | import 'package:one_key/net/dio_util.dart'; |
| 9 | import 'package:one_key/net/http_url.dart'; | 9 | import 'package:one_key/net/http_url.dart'; |
| 10 | import 'package:one_key/provider/user_model.dart'; | 10 | import 'package:one_key/provider/user_model.dart'; |
| 11 | -import 'package:one_key/utils/navigator_util.dart'; | 11 | +import 'package:one_key/route/navigator_util.dart'; |
| 12 | import 'package:one_key/utils/utils.dart'; | 12 | import 'package:one_key/utils/utils.dart'; |
| 13 | import 'package:provider/provider.dart'; | 13 | import 'package:provider/provider.dart'; |
| 14 | 14 |
| @@ -11,7 +11,7 @@ import 'package:one_key/net/dio_util.dart'; | @@ -11,7 +11,7 @@ import 'package:one_key/net/dio_util.dart'; | ||
| 11 | import 'package:one_key/net/http_url.dart'; | 11 | import 'package:one_key/net/http_url.dart'; |
| 12 | import 'package:one_key/models/table.dart' as t; | 12 | import 'package:one_key/models/table.dart' as t; |
| 13 | import 'package:one_key/provider/user_model.dart'; | 13 | import 'package:one_key/provider/user_model.dart'; |
| 14 | -import 'package:one_key/utils/navigator_util.dart'; | 14 | +import 'package:one_key/route/navigator_util.dart'; |
| 15 | import 'package:one_key/utils/utils.dart'; | 15 | import 'package:one_key/utils/utils.dart'; |
| 16 | import 'package:provider/provider.dart'; | 16 | import 'package:provider/provider.dart'; |
| 17 | 17 |
| @@ -8,7 +8,7 @@ import 'package:one_key/net/base_resp.dart'; | @@ -8,7 +8,7 @@ import 'package:one_key/net/base_resp.dart'; | ||
| 8 | import 'package:one_key/net/dio_util.dart'; | 8 | import 'package:one_key/net/dio_util.dart'; |
| 9 | import 'package:one_key/net/http_url.dart'; | 9 | import 'package:one_key/net/http_url.dart'; |
| 10 | import 'package:one_key/res/colors.dart'; | 10 | import 'package:one_key/res/colors.dart'; |
| 11 | -import 'package:one_key/utils/navigator_util.dart'; | 11 | +import 'package:one_key/route/navigator_util.dart'; |
| 12 | import 'package:one_key/utils/utils.dart'; | 12 | import 'package:one_key/utils/utils.dart'; |
| 13 | import 'package:one_key/widgets/MyDivider.dart'; | 13 | import 'package:one_key/widgets/MyDivider.dart'; |
| 14 | import 'package:one_key/widgets/loading.dart'; | 14 | import 'package:one_key/widgets/loading.dart'; |
| 1 | import 'package:fluro/fluro.dart'; | 1 | import 'package:fluro/fluro.dart'; |
| 2 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
| 3 | import 'package:one_key/models/coupon_model.dart'; | 3 | import 'package:one_key/models/coupon_model.dart'; |
| 4 | +import 'package:one_key/models/integral_model.dart'; | ||
| 4 | import 'package:one_key/models/notebook.dart'; | 5 | import 'package:one_key/models/notebook.dart'; |
| 5 | import 'package:one_key/models/notebook_detail.dart'; | 6 | import 'package:one_key/models/notebook_detail.dart'; |
| 6 | import 'package:one_key/models/table_list.dart'; | 7 | import 'package:one_key/models/table_list.dart'; |
| @@ -284,4 +285,12 @@ class NavigatorUtil { | @@ -284,4 +285,12 @@ class NavigatorUtil { | ||
| 284 | return _navigateTo(context, "${Routes.complete_create_store}", | 285 | return _navigateTo(context, "${Routes.complete_create_store}", |
| 285 | replace: replace); | 286 | replace: replace); |
| 286 | } | 287 | } |
| 288 | + | ||
| 289 | + /// 我的积分页面 | ||
| 290 | + static Future<dynamic> goMyIntegralPage(BuildContext context, | ||
| 291 | + {replace = false, IntegralSunModel sunModel}) { | ||
| 292 | + return _navigateTo(context, | ||
| 293 | + "${Routes.my_integral_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}", | ||
| 294 | + replace: replace); | ||
| 295 | + } | ||
| 287 | } | 296 | } |
| @@ -3,6 +3,7 @@ import 'dart:convert'; | @@ -3,6 +3,7 @@ import 'dart:convert'; | ||
| 3 | import 'package:fluro/fluro.dart'; | 3 | import 'package:fluro/fluro.dart'; |
| 4 | import 'package:flutter/material.dart'; | 4 | import 'package:flutter/material.dart'; |
| 5 | import 'package:one_key/models/coupon_model.dart'; | 5 | import 'package:one_key/models/coupon_model.dart'; |
| 6 | +import 'package:one_key/models/integral_model.dart'; | ||
| 6 | import 'package:one_key/models/notebook_detail.dart'; | 7 | import 'package:one_key/models/notebook_detail.dart'; |
| 7 | import 'package:one_key/models/table_list.dart'; | 8 | import 'package:one_key/models/table_list.dart'; |
| 8 | import 'package:one_key/pages/coupon/coupon_detail_page.dart'; | 9 | import 'package:one_key/pages/coupon/coupon_detail_page.dart'; |
| @@ -33,6 +34,7 @@ import 'package:one_key/pages/login/web_page.dart'; | @@ -33,6 +34,7 @@ import 'package:one_key/pages/login/web_page.dart'; | ||
| 33 | import 'package:one_key/pages/message/message_order_menu.dart'; | 34 | import 'package:one_key/pages/message/message_order_menu.dart'; |
| 34 | import 'package:one_key/pages/my/base_info.dart'; | 35 | import 'package:one_key/pages/my/base_info.dart'; |
| 35 | import 'package:one_key/pages/my/book_time_set.dart'; | 36 | import 'package:one_key/pages/my/book_time_set.dart'; |
| 37 | +import 'package:one_key/pages/my/my_integral_page.dart'; | ||
| 36 | import 'package:one_key/pages/my/receive_orders_time_set.dart'; | 38 | import 'package:one_key/pages/my/receive_orders_time_set.dart'; |
| 37 | import 'package:one_key/pages/my/remark_manager_page.dart'; | 39 | import 'package:one_key/pages/my/remark_manager_page.dart'; |
| 38 | import 'package:one_key/pages/online_check/invoice_detail_page.dart'; | 40 | import 'package:one_key/pages/online_check/invoice_detail_page.dart'; |
| @@ -45,6 +47,7 @@ import 'package:one_key/provider/base_info_provider.dart'; | @@ -45,6 +47,7 @@ import 'package:one_key/provider/base_info_provider.dart'; | ||
| 45 | import 'package:one_key/provider/book_set_time_model.dart'; | 47 | import 'package:one_key/provider/book_set_time_model.dart'; |
| 46 | import 'package:one_key/provider/choose_table_model.dart'; | 48 | import 'package:one_key/provider/choose_table_model.dart'; |
| 47 | import 'package:one_key/provider/create_store_model.dart'; | 49 | import 'package:one_key/provider/create_store_model.dart'; |
| 50 | +import 'package:one_key/provider/my_model.dart'; | ||
| 48 | import 'package:one_key/provider/notebook_detail_change_model.dart'; | 51 | import 'package:one_key/provider/notebook_detail_change_model.dart'; |
| 49 | import 'package:one_key/provider/notebook_detail_model.dart'; | 52 | import 'package:one_key/provider/notebook_detail_model.dart'; |
| 50 | import 'package:one_key/provider/order_food_provider.dart'; | 53 | import 'package:one_key/provider/order_food_provider.dart'; |
| @@ -418,3 +421,14 @@ var completeCreateStorePageHandler = new Handler( | @@ -418,3 +421,14 @@ var completeCreateStorePageHandler = new Handler( | ||
| 418 | 421 | ||
| 419 | return CompleteCreateStorePage(); | 422 | return CompleteCreateStorePage(); |
| 420 | }); | 423 | }); |
| 424 | + | ||
| 425 | +///我的积分 | ||
| 426 | +var myIntegralPageHandler = new Handler( | ||
| 427 | + handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | ||
| 428 | + IntegralSunModel sunModel = IntegralSunModel.fromJson(json | ||
| 429 | + .decode(FluroConvertUtils.fluroCnParamsDecode(params["sunModel"].first))); | ||
| 430 | + // String urlStr = FluroConvertUtils.fluroCnParamsDecode(params["urlStr"].first); | ||
| 431 | + | ||
| 432 | + return ChangeNotifierProvider<MyModel>( | ||
| 433 | + create: (_) => MyModel(), child: MyIntegralPage(sunModel: sunModel)); | ||
| 434 | +}); |
| @@ -41,6 +41,7 @@ class Routes { | @@ -41,6 +41,7 @@ class Routes { | ||
| 41 | static String enter_store_front_photo = "/enter_store_front_photo"; //门头照片 | 41 | static String enter_store_front_photo = "/enter_store_front_photo"; //门头照片 |
| 42 | static String enter_store_environment = "/enter_store_environment"; //店铺环境 | 42 | static String enter_store_environment = "/enter_store_environment"; //店铺环境 |
| 43 | static String complete_create_store = "/complete_create_store"; //创建店铺完成 | 43 | static String complete_create_store = "/complete_create_store"; //创建店铺完成 |
| 44 | + static String my_integral_page = "/my_integral_page"; //我的积分 | ||
| 44 | 45 | ||
| 45 | static void configureRoutes(FluroRouter router) { | 46 | static void configureRoutes(FluroRouter router) { |
| 46 | router.notFoundHandler = new Handler( | 47 | router.notFoundHandler = new Handler( |
| @@ -89,7 +90,8 @@ class Routes { | @@ -89,7 +90,8 @@ class Routes { | ||
| 89 | handler: enterStoreEnvironmentPageHandler); | 90 | handler: enterStoreEnvironmentPageHandler); |
| 90 | router.define(complete_create_store, | 91 | router.define(complete_create_store, |
| 91 | handler: completeCreateStorePageHandler); | 92 | handler: completeCreateStorePageHandler); |
| 92 | - | 93 | + router.define(my_integral_page, |
| 94 | + handler: myIntegralPageHandler); | ||
| 93 | 95 | ||
| 94 | } | 96 | } |
| 95 | } | 97 | } |
| @@ -10,7 +10,7 @@ import 'package:one_key/pages/message/message_dialog_item.dart'; | @@ -10,7 +10,7 @@ import 'package:one_key/pages/message/message_dialog_item.dart'; | ||
| 10 | import 'package:one_key/provider/message_dialog_model.dart'; | 10 | import 'package:one_key/provider/message_dialog_model.dart'; |
| 11 | import 'package:one_key/res/colors.dart'; | 11 | import 'package:one_key/res/colors.dart'; |
| 12 | import 'package:one_key/utils/misc.dart'; | 12 | import 'package:one_key/utils/misc.dart'; |
| 13 | -import 'package:one_key/utils/navigator_util.dart'; | 13 | +import 'package:one_key/route/navigator_util.dart'; |
| 14 | import 'package:one_key/utils/utils.dart'; | 14 | import 'package:one_key/utils/utils.dart'; |
| 15 | import 'package:one_key/widgets/MyDivider.dart'; | 15 | import 'package:one_key/widgets/MyDivider.dart'; |
| 16 | import 'package:one_key/widgets/common_button.dart'; | 16 | import 'package:one_key/widgets/common_button.dart'; |
| @@ -15,7 +15,7 @@ import 'package:one_key/pages/login/web_page.dart'; | @@ -15,7 +15,7 @@ import 'package:one_key/pages/login/web_page.dart'; | ||
| 15 | import 'package:one_key/provider/user_model.dart'; | 15 | import 'package:one_key/provider/user_model.dart'; |
| 16 | import 'package:one_key/utils/dialog_util.dart'; | 16 | import 'package:one_key/utils/dialog_util.dart'; |
| 17 | import 'package:one_key/utils/misc.dart'; | 17 | import 'package:one_key/utils/misc.dart'; |
| 18 | -import 'package:one_key/utils/navigator_util.dart'; | 18 | +import 'package:one_key/route/navigator_util.dart'; |
| 19 | import 'package:one_key/widgets/loading.dart'; | 19 | import 'package:one_key/widgets/loading.dart'; |
| 20 | import 'package:package_info/package_info.dart'; | 20 | import 'package:package_info/package_info.dart'; |
| 21 | import 'package:permission_handler/permission_handler.dart'; | 21 | import 'package:permission_handler/permission_handler.dart'; |
| @@ -7,8 +7,14 @@ class MyItem extends StatefulWidget { | @@ -7,8 +7,14 @@ class MyItem extends StatefulWidget { | ||
| 7 | final String title; | 7 | final String title; |
| 8 | final String content; | 8 | final String content; |
| 9 | final VoidCallback callback; | 9 | final VoidCallback callback; |
| 10 | + final bool needRadius; | ||
| 10 | 11 | ||
| 11 | - const MyItem({Key key, this.title, this.content, this.callback}) | 12 | + const MyItem( |
| 13 | + {Key key, | ||
| 14 | + this.title, | ||
| 15 | + this.content, | ||
| 16 | + this.callback, | ||
| 17 | + this.needRadius = false}) | ||
| 12 | : super(key: key); | 18 | : super(key: key); |
| 13 | 19 | ||
| 14 | @override | 20 | @override |
| @@ -25,9 +31,12 @@ class MyItemState extends State<MyItem> { | @@ -25,9 +31,12 @@ class MyItemState extends State<MyItem> { | ||
| 25 | return GestureDetector( | 31 | return GestureDetector( |
| 26 | onTap: widget.callback, | 32 | onTap: widget.callback, |
| 27 | child: Container( | 33 | child: Container( |
| 34 | + decoration: BoxDecoration( | ||
| 35 | + color: MyColours.color_ffffff, | ||
| 36 | + borderRadius: BorderRadius.circular( | ||
| 37 | + widget.needRadius ? ScreenUtil().setWidth(40) : 0)), | ||
| 28 | width: double.infinity, | 38 | width: double.infinity, |
| 29 | height: ScreenUtil().setHeight(122), | 39 | height: ScreenUtil().setHeight(122), |
| 30 | - color: MyColours.color_ffffff, | ||
| 31 | padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), | 40 | padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), |
| 32 | alignment: Alignment.center, | 41 | alignment: Alignment.center, |
| 33 | child: Row( | 42 | child: Row( |
| @@ -46,11 +55,13 @@ class MyItemState extends State<MyItem> { | @@ -46,11 +55,13 @@ class MyItemState extends State<MyItem> { | ||
| 46 | color: MyColours.color_666666), | 55 | color: MyColours.color_666666), |
| 47 | ), | 56 | ), |
| 48 | HEmptyView(20), | 57 | HEmptyView(20), |
| 49 | - Image.asset( | ||
| 50 | - "assets/arr_right_gray.png", | ||
| 51 | - width: ScreenUtil().setWidth(14), | ||
| 52 | - height: ScreenUtil().setWidth(22), | ||
| 53 | - ) | 58 | + widget.needRadius |
| 59 | + ? Container() | ||
| 60 | + : Image.asset( | ||
| 61 | + "assets/arr_right_gray.png", | ||
| 62 | + width: ScreenUtil().setWidth(14), | ||
| 63 | + height: ScreenUtil().setWidth(22), | ||
| 64 | + ) | ||
| 54 | ], | 65 | ], |
| 55 | ), | 66 | ), |
| 56 | ), | 67 | ), |
| @@ -11,6 +11,8 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | @@ -11,6 +11,8 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | ||
| 11 | final bool showLeading; | 11 | final bool showLeading; |
| 12 | final GestureTapCallback onTapRight; | 12 | final GestureTapCallback onTapRight; |
| 13 | final String leftTitle; | 13 | final String leftTitle; |
| 14 | + final Color bgColor; | ||
| 15 | + final bool needWhite; | ||
| 14 | 16 | ||
| 15 | const SystemAppBar(this.title, | 17 | const SystemAppBar(this.title, |
| 16 | {Key key, | 18 | {Key key, |
| @@ -18,12 +20,15 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | @@ -18,12 +20,15 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | ||
| 18 | this.onTap, | 20 | this.onTap, |
| 19 | this.onTapRight, | 21 | this.onTapRight, |
| 20 | this.showLeading = true, | 22 | this.showLeading = true, |
| 23 | + this.bgColor = MyColours.color_ffffff, | ||
| 24 | + this.needWhite = false, | ||
| 21 | this.leftTitle = ''}) | 25 | this.leftTitle = ''}) |
| 22 | : super(key: key); | 26 | : super(key: key); |
| 23 | 27 | ||
| 24 | @override | 28 | @override |
| 25 | Widget build(BuildContext context) { | 29 | Widget build(BuildContext context) { |
| 26 | return AppBar( | 30 | return AppBar( |
| 31 | + backgroundColor: bgColor, | ||
| 27 | elevation: 0, | 32 | elevation: 0, |
| 28 | leadingWidth: | 33 | leadingWidth: |
| 29 | leftTitle != '' ? ScreenUtil().setWidth(84 * 2 + 40 + 10) : 56, | 34 | leftTitle != '' ? ScreenUtil().setWidth(84 * 2 + 40 + 10) : 56, |
| @@ -37,7 +42,9 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | @@ -37,7 +42,9 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | ||
| 37 | child: Row( | 42 | child: Row( |
| 38 | children: <Widget>[ | 43 | children: <Widget>[ |
| 39 | Image.asset( | 44 | Image.asset( |
| 40 | - "assets/icon_back.png", | 45 | + needWhite |
| 46 | + ? "assets/icon_white.png" | ||
| 47 | + : "assets/icon_back.png", | ||
| 41 | width: ScreenUtil().setWidth(20), | 48 | width: ScreenUtil().setWidth(20), |
| 42 | height: ScreenUtil().setWidth(31), | 49 | height: ScreenUtil().setWidth(31), |
| 43 | ), | 50 | ), |
| @@ -58,7 +65,7 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | @@ -58,7 +65,7 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | ||
| 58 | title: Text( | 65 | title: Text( |
| 59 | title, | 66 | title, |
| 60 | style: TextStyle( | 67 | style: TextStyle( |
| 61 | - color: MyColours.color_353535, | 68 | + color: needWhite ? MyColours.color_fefefe : MyColours.color_353535, |
| 62 | fontSize: ScreenUtil().setSp(34), | 69 | fontSize: ScreenUtil().setSp(34), |
| 63 | decoration: TextDecoration.none), | 70 | decoration: TextDecoration.none), |
| 64 | ), | 71 | ), |
| 1 | # Generated by pub | 1 | # Generated by pub |
| 2 | # See https://dart.dev/tools/pub/glossary#lockfile | 2 | # See https://dart.dev/tools/pub/glossary#lockfile |
| 3 | packages: | 3 | packages: |
| 4 | + _fe_analyzer_shared: | ||
| 5 | + dependency: transitive | ||
| 6 | + description: | ||
| 7 | + name: _fe_analyzer_shared | ||
| 8 | + url: "https://pub.flutter-io.cn" | ||
| 9 | + source: hosted | ||
| 10 | + version: "14.0.0" | ||
| 4 | amap_core_fluttify: | 11 | amap_core_fluttify: |
| 5 | dependency: transitive | 12 | dependency: transitive |
| 6 | description: | 13 | description: |
| @@ -35,7 +42,7 @@ packages: | @@ -35,7 +42,7 @@ packages: | ||
| 35 | name: analyzer | 42 | name: analyzer |
| 36 | url: "https://pub.flutter-io.cn" | 43 | url: "https://pub.flutter-io.cn" |
| 37 | source: hosted | 44 | source: hosted |
| 38 | - version: "0.36.4" | 45 | + version: "0.41.2" |
| 39 | args: | 46 | args: |
| 40 | dependency: transitive | 47 | dependency: transitive |
| 41 | description: | 48 | description: |
| @@ -70,14 +77,14 @@ packages: | @@ -70,14 +77,14 @@ packages: | ||
| 70 | name: build | 77 | name: build |
| 71 | url: "https://pub.flutter-io.cn" | 78 | url: "https://pub.flutter-io.cn" |
| 72 | source: hosted | 79 | source: hosted |
| 73 | - version: "1.1.6" | 80 | + version: "1.6.2" |
| 74 | build_config: | 81 | build_config: |
| 75 | dependency: transitive | 82 | dependency: transitive |
| 76 | description: | 83 | description: |
| 77 | name: build_config | 84 | name: build_config |
| 78 | url: "https://pub.flutter-io.cn" | 85 | url: "https://pub.flutter-io.cn" |
| 79 | source: hosted | 86 | source: hosted |
| 80 | - version: "0.4.1+1" | 87 | + version: "0.4.6" |
| 81 | build_daemon: | 88 | build_daemon: |
| 82 | dependency: transitive | 89 | dependency: transitive |
| 83 | description: | 90 | description: |
| @@ -91,21 +98,21 @@ packages: | @@ -91,21 +98,21 @@ packages: | ||
| 91 | name: build_resolvers | 98 | name: build_resolvers |
| 92 | url: "https://pub.flutter-io.cn" | 99 | url: "https://pub.flutter-io.cn" |
| 93 | source: hosted | 100 | source: hosted |
| 94 | - version: "1.2.1" | 101 | + version: "1.5.3" |
| 95 | build_runner: | 102 | build_runner: |
| 96 | dependency: "direct dev" | 103 | dependency: "direct dev" |
| 97 | description: | 104 | description: |
| 98 | name: build_runner | 105 | name: build_runner |
| 99 | url: "https://pub.flutter-io.cn" | 106 | url: "https://pub.flutter-io.cn" |
| 100 | source: hosted | 107 | source: hosted |
| 101 | - version: "1.6.9" | 108 | + version: "1.11.5" |
| 102 | build_runner_core: | 109 | build_runner_core: |
| 103 | dependency: transitive | 110 | dependency: transitive |
| 104 | description: | 111 | description: |
| 105 | name: build_runner_core | 112 | name: build_runner_core |
| 106 | url: "https://pub.flutter-io.cn" | 113 | url: "https://pub.flutter-io.cn" |
| 107 | source: hosted | 114 | source: hosted |
| 108 | - version: "3.1.1" | 115 | + version: "6.1.10" |
| 109 | built_collection: | 116 | built_collection: |
| 110 | dependency: transitive | 117 | dependency: transitive |
| 111 | description: | 118 | description: |
| @@ -155,6 +162,13 @@ packages: | @@ -155,6 +162,13 @@ packages: | ||
| 155 | url: "https://pub.flutter-io.cn" | 162 | url: "https://pub.flutter-io.cn" |
| 156 | source: hosted | 163 | source: hosted |
| 157 | version: "0.10.1" | 164 | version: "0.10.1" |
| 165 | + cli_util: | ||
| 166 | + dependency: transitive | ||
| 167 | + description: | ||
| 168 | + name: cli_util | ||
| 169 | + url: "https://pub.flutter-io.cn" | ||
| 170 | + source: hosted | ||
| 171 | + version: "0.2.0" | ||
| 158 | clock: | 172 | clock: |
| 159 | dependency: transitive | 173 | dependency: transitive |
| 160 | description: | 174 | description: |
| @@ -239,13 +253,6 @@ packages: | @@ -239,13 +253,6 @@ packages: | ||
| 239 | url: "https://pub.flutter-io.cn" | 253 | url: "https://pub.flutter-io.cn" |
| 240 | source: hosted | 254 | source: hosted |
| 241 | version: "2.1.5" | 255 | version: "2.1.5" |
| 242 | - csslib: | ||
| 243 | - dependency: transitive | ||
| 244 | - description: | ||
| 245 | - name: csslib | ||
| 246 | - url: "https://pub.flutter-io.cn" | ||
| 247 | - source: hosted | ||
| 248 | - version: "0.16.2" | ||
| 249 | cupertino_icons: | 256 | cupertino_icons: |
| 250 | dependency: "direct main" | 257 | dependency: "direct main" |
| 251 | description: | 258 | description: |
| @@ -259,7 +266,7 @@ packages: | @@ -259,7 +266,7 @@ packages: | ||
| 259 | name: dart_style | 266 | name: dart_style |
| 260 | url: "https://pub.flutter-io.cn" | 267 | url: "https://pub.flutter-io.cn" |
| 261 | source: hosted | 268 | source: hosted |
| 262 | - version: "1.2.9" | 269 | + version: "1.3.12" |
| 263 | decimal: | 270 | decimal: |
| 264 | dependency: transitive | 271 | dependency: transitive |
| 265 | description: | 272 | description: |
| @@ -322,7 +329,7 @@ packages: | @@ -322,7 +329,7 @@ packages: | ||
| 322 | name: file | 329 | name: file |
| 323 | url: "https://pub.flutter-io.cn" | 330 | url: "https://pub.flutter-io.cn" |
| 324 | source: hosted | 331 | source: hosted |
| 325 | - version: "5.2.1" | 332 | + version: "6.1.0" |
| 326 | fixnum: | 333 | fixnum: |
| 327 | dependency: transitive | 334 | dependency: transitive |
| 328 | description: | 335 | description: |
| @@ -436,13 +443,6 @@ packages: | @@ -436,13 +443,6 @@ packages: | ||
| 436 | url: "https://pub.flutter-io.cn" | 443 | url: "https://pub.flutter-io.cn" |
| 437 | source: hosted | 444 | source: hosted |
| 438 | version: "0.8.12" | 445 | version: "0.8.12" |
| 439 | - front_end: | ||
| 440 | - dependency: transitive | ||
| 441 | - description: | ||
| 442 | - name: front_end | ||
| 443 | - url: "https://pub.flutter-io.cn" | ||
| 444 | - source: hosted | ||
| 445 | - version: "0.1.19" | ||
| 446 | get_it: | 446 | get_it: |
| 447 | dependency: "direct main" | 447 | dependency: "direct main" |
| 448 | description: | 448 | description: |
| @@ -456,7 +456,7 @@ packages: | @@ -456,7 +456,7 @@ packages: | ||
| 456 | name: glob | 456 | name: glob |
| 457 | url: "https://pub.flutter-io.cn" | 457 | url: "https://pub.flutter-io.cn" |
| 458 | source: hosted | 458 | source: hosted |
| 459 | - version: "1.2.0" | 459 | + version: "2.0.1" |
| 460 | graphs: | 460 | graphs: |
| 461 | dependency: transitive | 461 | dependency: transitive |
| 462 | description: | 462 | description: |
| @@ -464,13 +464,6 @@ packages: | @@ -464,13 +464,6 @@ packages: | ||
| 464 | url: "https://pub.flutter-io.cn" | 464 | url: "https://pub.flutter-io.cn" |
| 465 | source: hosted | 465 | source: hosted |
| 466 | version: "0.2.0" | 466 | version: "0.2.0" |
| 467 | - html: | ||
| 468 | - dependency: transitive | ||
| 469 | - description: | ||
| 470 | - name: html | ||
| 471 | - url: "https://pub.flutter-io.cn" | ||
| 472 | - source: hosted | ||
| 473 | - version: "0.14.0+4" | ||
| 474 | http: | 467 | http: |
| 475 | dependency: transitive | 468 | dependency: transitive |
| 476 | description: | 469 | description: |
| @@ -540,28 +533,14 @@ packages: | @@ -540,28 +533,14 @@ packages: | ||
| 540 | name: json_annotation | 533 | name: json_annotation |
| 541 | url: "https://pub.flutter-io.cn" | 534 | url: "https://pub.flutter-io.cn" |
| 542 | source: hosted | 535 | source: hosted |
| 543 | - version: "2.3.0" | ||
| 544 | - json_model: | ||
| 545 | - dependency: "direct dev" | ||
| 546 | - description: | ||
| 547 | - name: json_model | ||
| 548 | - url: "https://pub.flutter-io.cn" | ||
| 549 | - source: hosted | ||
| 550 | - version: "0.0.2" | 536 | + version: "3.1.1" |
| 551 | json_serializable: | 537 | json_serializable: |
| 552 | dependency: "direct dev" | 538 | dependency: "direct dev" |
| 553 | description: | 539 | description: |
| 554 | name: json_serializable | 540 | name: json_serializable |
| 555 | url: "https://pub.flutter-io.cn" | 541 | url: "https://pub.flutter-io.cn" |
| 556 | source: hosted | 542 | source: hosted |
| 557 | - version: "2.3.0" | ||
| 558 | - kernel: | ||
| 559 | - dependency: transitive | ||
| 560 | - description: | ||
| 561 | - name: kernel | ||
| 562 | - url: "https://pub.flutter-io.cn" | ||
| 563 | - source: hosted | ||
| 564 | - version: "0.3.19" | 543 | + version: "3.5.1" |
| 565 | latlng: | 544 | latlng: |
| 566 | dependency: transitive | 545 | dependency: transitive |
| 567 | description: | 546 | description: |
| @@ -604,20 +583,6 @@ packages: | @@ -604,20 +583,6 @@ packages: | ||
| 604 | url: "https://pub.flutter-io.cn" | 583 | url: "https://pub.flutter-io.cn" |
| 605 | source: hosted | 584 | source: hosted |
| 606 | version: "0.0.4" | 585 | version: "0.0.4" |
| 607 | - node_interop: | ||
| 608 | - dependency: transitive | ||
| 609 | - description: | ||
| 610 | - name: node_interop | ||
| 611 | - url: "https://pub.flutter-io.cn" | ||
| 612 | - source: hosted | ||
| 613 | - version: "1.2.0" | ||
| 614 | - node_io: | ||
| 615 | - dependency: transitive | ||
| 616 | - description: | ||
| 617 | - name: node_io | ||
| 618 | - url: "https://pub.flutter-io.cn" | ||
| 619 | - source: hosted | ||
| 620 | - version: "1.1.1" | ||
| 621 | octo_image: | 586 | octo_image: |
| 622 | dependency: transitive | 587 | dependency: transitive |
| 623 | description: | 588 | description: |
| @@ -646,13 +611,6 @@ packages: | @@ -646,13 +611,6 @@ packages: | ||
| 646 | url: "https://pub.flutter-io.cn" | 611 | url: "https://pub.flutter-io.cn" |
| 647 | source: hosted | 612 | source: hosted |
| 648 | version: "0.4.3" | 613 | version: "0.4.3" |
| 649 | - package_resolver: | ||
| 650 | - dependency: transitive | ||
| 651 | - description: | ||
| 652 | - name: package_resolver | ||
| 653 | - url: "https://pub.flutter-io.cn" | ||
| 654 | - source: hosted | ||
| 655 | - version: "1.0.10" | ||
| 656 | path: | 614 | path: |
| 657 | dependency: transitive | 615 | dependency: transitive |
| 658 | description: | 616 | description: |
| @@ -715,7 +673,7 @@ packages: | @@ -715,7 +673,7 @@ packages: | ||
| 715 | name: pedantic | 673 | name: pedantic |
| 716 | url: "https://pub.flutter-io.cn" | 674 | url: "https://pub.flutter-io.cn" |
| 717 | source: hosted | 675 | source: hosted |
| 718 | - version: "1.9.0" | 676 | + version: "1.11.0" |
| 719 | permission_handler: | 677 | permission_handler: |
| 720 | dependency: "direct main" | 678 | dependency: "direct main" |
| 721 | description: | 679 | description: |
| @@ -757,7 +715,7 @@ packages: | @@ -757,7 +715,7 @@ packages: | ||
| 757 | name: platform | 715 | name: platform |
| 758 | url: "https://pub.flutter-io.cn" | 716 | url: "https://pub.flutter-io.cn" |
| 759 | source: hosted | 717 | source: hosted |
| 760 | - version: "2.2.1" | 718 | + version: "3.0.0" |
| 761 | plugin_platform_interface: | 719 | plugin_platform_interface: |
| 762 | dependency: transitive | 720 | dependency: transitive |
| 763 | description: | 721 | description: |
| @@ -778,7 +736,7 @@ packages: | @@ -778,7 +736,7 @@ packages: | ||
| 778 | name: process | 736 | name: process |
| 779 | url: "https://pub.flutter-io.cn" | 737 | url: "https://pub.flutter-io.cn" |
| 780 | source: hosted | 738 | source: hosted |
| 781 | - version: "3.0.13" | 739 | + version: "4.2.1" |
| 782 | provider: | 740 | provider: |
| 783 | dependency: "direct main" | 741 | dependency: "direct main" |
| 784 | description: | 742 | description: |
| @@ -923,7 +881,7 @@ packages: | @@ -923,7 +881,7 @@ packages: | ||
| 923 | name: source_gen | 881 | name: source_gen |
| 924 | url: "https://pub.flutter-io.cn" | 882 | url: "https://pub.flutter-io.cn" |
| 925 | source: hosted | 883 | source: hosted |
| 926 | - version: "0.9.4+4" | 884 | + version: "0.9.10+3" |
| 927 | source_span: | 885 | source_span: |
| 928 | dependency: transitive | 886 | dependency: transitive |
| 929 | description: | 887 | description: |
| @@ -1149,7 +1107,7 @@ packages: | @@ -1149,7 +1107,7 @@ packages: | ||
| 1149 | name: xdg_directories | 1107 | name: xdg_directories |
| 1150 | url: "https://pub.flutter-io.cn" | 1108 | url: "https://pub.flutter-io.cn" |
| 1151 | source: hosted | 1109 | source: hosted |
| 1152 | - version: "0.1.0" | 1110 | + version: "0.1.2" |
| 1153 | yaml: | 1111 | yaml: |
| 1154 | dependency: transitive | 1112 | dependency: transitive |
| 1155 | description: | 1113 | description: |
| @@ -27,7 +27,7 @@ dependencies: | @@ -27,7 +27,7 @@ dependencies: | ||
| 27 | # Use with the CupertinoIcons class for iOS style icons. | 27 | # Use with the CupertinoIcons class for iOS style icons. |
| 28 | cupertino_icons: ^0.1.2 | 28 | cupertino_icons: ^0.1.2 |
| 29 | 29 | ||
| 30 | - json_annotation: ^2.0.0 | 30 | + json_annotation: ^3.1.0 |
| 31 | # 状态管理 | 31 | # 状态管理 |
| 32 | provider: ^4.0.4 | 32 | provider: ^4.0.4 |
| 33 | # Sp存储 | 33 | # Sp存储 |
| @@ -122,10 +122,10 @@ dev_dependencies: | @@ -122,10 +122,10 @@ dev_dependencies: | ||
| 122 | flutter_test: | 122 | flutter_test: |
| 123 | sdk: flutter | 123 | sdk: flutter |
| 124 | 124 | ||
| 125 | - json_model: ^0.0.2 | 125 | + # json_model: ^0.0.2 |
| 126 | 126 | ||
| 127 | - build_runner: ^1.0.0 | ||
| 128 | - json_serializable: ^2.0.0 | 127 | + build_runner: ^1.11.5 |
| 128 | + json_serializable: ^3.5.1 | ||
| 129 | 129 | ||
| 130 | 130 | ||
| 131 | # For information on the generic Dart part of this file, see the | 131 | # For information on the generic Dart part of this file, see the |
-
Please register or login to post a comment