Просмотр исходного кода

Merge remote-tracking branch 'origin/1.22.0_master' into 1.22.0_master

# Conflicts:
#	lib/widgets/custom/multi_nav/custom_quick_entry.dart
tags/0.0.11+8
23028876916@qq.com 3 лет назад
Родитель
Сommit
17f7790e06
49 измененных файлов: 1009 добавлений и 984 удалений
  1. +0
    -746
      .dart_tool/package_config.json
  2. +1
    -1
      android/build.gradle
  3. +31
    -29
      example/android/app/build.gradle
  4. +0
    -0
      example/android/app/libs/AMap_Location_V4.9.0_20200228.jar
  5. Двоичные данные
     
  6. +6
    -6
      example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
  7. +6
    -0
      example/android/build.gradle
  8. +18
    -22
      example/ios/Podfile.lock
  9. +6
    -0
      example/ios/Runner.xcodeproj/project.pbxproj
  10. +10
    -10
      example/ios/Runner/AppDelegate.m
  11. +5
    -4
      example/ios/Runner/Base.lproj/Main.storyboard
  12. +18
    -0
      example/ios/Runner/FNBaseFlutterViewController.h
  13. +38
    -0
      example/ios/Runner/FNBaseFlutterViewController.m
  14. +10
    -3
      example/lib/main.dart
  15. +6
    -2
      example/pubspec.yaml
  16. +2
    -0
      lib/dialog/global_dialog/activity_dialog/activity_dialog.dart
  17. +1
    -1
      lib/dialog/global_dialog/advertising_dialog/advertising_dialog.dart
  18. +21
    -7
      lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_create.dart
  19. +5
    -3
      lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_no_goods_dialog.dart
  20. +32
    -14
      lib/pages/custom_page/custom_page.dart
  21. +5
    -1
      lib/pages/goods_share_page/goods_share_image/goods_share_image.dart
  22. +114
    -14
      lib/pages/home_page/home_page.dart
  23. +14
    -3
      lib/pages/launch_page/launch_page.dart
  24. +1
    -1
      lib/pages/orders_page/views/order_tabbar_widget.dart
  25. +1
    -1
      lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart
  26. +1
    -1
      lib/pages/security_page/security_mobile/security_mobile_unbind.dart
  27. +2
    -1
      lib/pages/security_page/security_password/security_password.dart
  28. +1
    -1
      lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart
  29. +2
    -2
      lib/pages/team_page/team_page.dart
  30. +5
    -2
      lib/register.dart
  31. +4
    -0
      lib/utils/contants.dart
  32. +3
    -80
      lib/widgets/custom/multi_nav/custom_quick_entry.dart
  33. +117
    -4
      lib/widgets/custom/search/custom_search_widget.dart
  34. +81
    -10
      lib/widgets/custom/search/model/custom_search_model.dart
  35. +39
    -0
      lib/widgets/custom/share_content/bloc/custom_share_content_bloc.dart
  36. +10
    -0
      lib/widgets/custom/share_content/bloc/custom_share_content_event.dart
  37. +42
    -0
      lib/widgets/custom/share_content/bloc/custom_share_content_repository.dart
  38. +16
    -0
      lib/widgets/custom/share_content/bloc/custom_share_content_state.dart
  39. +139
    -0
      lib/widgets/custom/share_content/model/custom_share_content_model.dart
  40. +22
    -0
      lib/widgets/custom/share_content/share_content_creater.dart
  41. +8
    -0
      lib/widgets/custom/share_content/share_content_sk.dart
  42. +142
    -0
      lib/widgets/custom/share_content/share_content_widget.dart
  43. +3
    -0
      lib/widgets/goods_details/appbar/goods_details_appbar_widget.dart
  44. +1
    -1
      lib/widgets/home/home_goods/models/home_goods_list_style_model.dart
  45. +4
    -4
      lib/widgets/mine/mine_data/mine_data_widget.dart
  46. +4
    -0
      lib/widgets/mine/mine_header/mine_header_bloc.dart
  47. +7
    -5
      lib/widgets/restart_widget/restart_widget.dart
  48. +2
    -2
      lib/widgets/share/share_alert.dart
  49. +3
    -3
      pubspec.yaml

+ 0
- 746
.dart_tool/package_config.json Просмотреть файл

@@ -1,746 +0,0 @@
{
"configVersion": 2,
"packages": [
{
"name": "ali_auth_wbq",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/zhiying_ali_auth_wbq-f6421fe5735eab13738946da8fa7405e7aa952c6/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "amap_flutter_location",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/amap_flutter_location-1.0.1",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "archive",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.13",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "args",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.6.0",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "async",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.5.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "bloc",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/bloc-4.0.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "boolean_selector",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "cached_network_image",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.5.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "characters",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/characters-1.1.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "charcode",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.2.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "clock",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/clock-1.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "collection",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.15.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "connectivity",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity-0.4.9+5",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "connectivity_for_web",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_for_web-0.3.1+4",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "connectivity_macos",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_macos-0.1.0+7",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "connectivity_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_platform_interface-1.0.6",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "convert",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1",
"packageUri": "lib/",
"languageVersion": "1.17"
},
{
"name": "cookie_jar",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/cookie_jar-1.0.1",
"packageUri": "lib/",
"languageVersion": "1.20"
},
{
"name": "crypto",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.5",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "device_info",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+10",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "device_info_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info_platform_interface-1.0.1",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "dio",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "dio_cookie_manager",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio_cookie_manager-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "equatable",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/equatable-1.2.6",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "event_bus",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/event_bus-1.1.1",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "fake_async",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_async-1.2.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "ffi",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/ffi-0.1.3",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "file",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/file-5.2.1",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "flutter",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "flutter_alibc",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/zhiying_flutter_alibc-159f123705b3e3dc28d6991df5b39b24a54c41a0/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "flutter_bloc",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_bloc-4.0.1",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "flutter_blurhash",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_blurhash-0.5.0",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "flutter_cache_manager",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-2.1.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "flutter_cupertino_date_picker",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/flutter-cupertino-date-picker-82142a924a770e68dca2a2f7b51449166870d7e2/",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "flutter_native_image",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_native_image-0.0.5+3",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "flutter_page_indicator",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_plugin_android_lifecycle",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.11",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "flutter_screenutil",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_screenutil-1.1.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "flutter_slidable",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_slidable-0.5.7",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "flutter_swiper",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_test",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/packages/flutter_test",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "flutter_update_dialog",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_update_dialog-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "flutter_user_agent",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_user_agent-1.2.2",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_web_plugins",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/packages/flutter_web_plugins",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_xupdate",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/flutter_xupdate-d17c695461ee4588dec990533d7467c11884cd0f/",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "fluttertoast",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "fluwx",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluwx-2.6.2",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "http",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.2",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "http_parser",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.4",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "image",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.19",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "image_cropper",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/Image_Cropper-e32f2264f86a27a2f5d7a7a5e26c6154eaf5798e/",
"packageUri": "lib/",
"languageVersion": "1.20"
},
{
"name": "image_picker",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+22",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "image_picker_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker_platform_interface-1.1.6",
"packageUri": "lib/",
"languageVersion": "2.5"
},
{
"name": "imei_plugin",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/imei_plugin-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "intl",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/intl-0.16.1",
"packageUri": "lib/",
"languageVersion": "2.5"
},
{
"name": "jdsdk",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/jdsdk-0.0.1",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "loading_indicator",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/loading_indicator-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "matcher",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.10-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "meta",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.3.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "moblink",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/moblink-5472bb698d70e336cf55febb9b0a209411466632/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "mobpush_plugin",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/mobpush_plugin-1.1.6",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "mobsms",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/mobsms-1.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "more_picture_share",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/more_picture_share-4767c418bfe4b8d75f9f8958199384141ba88e21/",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "nested",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/nested-0.0.4",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "octo_image",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/octo_image-0.3.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "package_info",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.8.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "path_provider",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.28",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_linux",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_macos",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+8",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_windows",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "pedantic",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.9.2",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "permission_handler",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/permission_handler-b8c45c4c20221ac39fe083113fc360cc632f33a4/",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "permission_handler_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_platform_interface-2.0.2",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "petitparser",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/petitparser-3.1.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "photo_view",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.10.3",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "platform",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1",
"packageUri": "lib/",
"languageVersion": "1.24"
},
{
"name": "plugin_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-1.0.3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "process",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.13",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "provider",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/provider-4.3.3",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "pull_to_refresh",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/flutter_pulltorefresh-78a12e0ea45fdf1fbc615b8d243e0f4a8667489f/",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "rxdart",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/rxdart-0.25.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "save_image",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/save_image-b719ab2d77298cbfa5ce3397d83d5ba253ed29c1/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "secverify",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/secverify-5ec756e9fe63339209cc6906a37a778952ac61f1/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "share_extend",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share_extend-1.1.9",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "shared_preferences",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_linux",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_macos",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+11",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_platform_interface-1.0.4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_web",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_windows",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.2+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "sharesdk_plugin",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/sharesdk_plugin-f947c09803374acdc4fb720ccb5356d0779afe2f/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shimmer",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shimmer-1.1.2",
"packageUri": "lib/",
"languageVersion": "1.20"
},
{
"name": "sky_engine",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/bin/cache/pkg/sky_engine",
"packageUri": "lib/",
"languageVersion": "1.11"
},
{
"name": "source_span",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.8.0-nullsafety.2",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "sqflite",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+2",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "sqflite_common",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite_common-1.0.3+3",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "stack_trace",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.10.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "stream_channel",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "string_scanner",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.1.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "string_validator",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_validator-0.1.4",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "synchronized",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0+2",
"packageUri": "lib/",
"languageVersion": "2.8"
},
{
"name": "tab_indicator_styler",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/tab_indicator_styler-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "term_glyph",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.2.0-nullsafety.1",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "test_api",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.19-nullsafety.2",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "tobias",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/git/tobias-15f6acb72df68703c96b2d8a14e1ab28f5dcc008/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "transformer_page_view",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "typed_data",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.3.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "url_launcher",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.10",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_linux",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_macos",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+9",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_platform_interface",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_platform_interface-1.0.9",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_web",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.5+3",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "url_launcher_windows",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "uuid",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/uuid-2.2.2",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "vector_math",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.1.0-nullsafety.3",
"packageUri": "lib/",
"languageVersion": "2.10"
},
{
"name": "webview_flutter",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-1.0.7",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "win32",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/win32-1.7.4+1",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "xdg_directories",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/xdg_directories-0.1.2",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "xml",
"rootUri": "file:///Users/fnuoos/development/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/xml-4.5.1",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "zhiying_comm",
"rootUri": "../../zhiying_comm",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "zhiying_base_widget",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "2.8"
}
],
"generated": "2021-03-27T01:30:55.826166Z",
"generator": "pub",
"generatorVersion": "2.10.0"
}

+ 1
- 1
android/build.gradle Просмотреть файл

@@ -33,6 +33,6 @@ android {
}

dependencies {
// implementation 'com.amap.api:location:5.2.0'
}
}

+ 31
- 29
example/android/app/build.gradle Просмотреть файл

@@ -53,8 +53,8 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//选择要添加的对应cpu类型的.so库。
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
//abiFilters 'armeabi-v7a','x86_64','arm64-v8a'
// abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
abiFilters 'armeabi-v7a','x86_64'
}
}

@@ -109,33 +109,33 @@ android {


// 应用信息配置
// productFlavors {
// // 智夜生活
// zhiying {
// applicationId "cn.zhios.zhiying"
// versionCode 57
// dimension "app"
// versionName '1.3.17'
// // 签名信息
// 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 60
dimension "app"
versionName '1.3.20'
// 签名信息
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 ->
@@ -185,7 +185,9 @@ dependencies {
implementation 'com.alibaba.sdk.android:AlibcTradeBiz:4.0.0.16@aar'
implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar'
implementation 'com.alibaba:fastjson:1.2.41@jar'
implementation 'com.amap.api:location:5.2.0'

implementation (name: 'kaduofensdk', ext: 'aar')

}



android/libs/AMap_Location_V4.9.0_20200228.jar → example/android/app/libs/AMap_Location_V4.9.0_20200228.jar Просмотреть файл


Двоичные данные
Просмотреть файл


+ 6
- 6
example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java Просмотреть файл

@@ -160,14 +160,14 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
// map.put("secret_key", "123456");

///正式
// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
// map.put("master_id", "99813608");
// map.put("secret_key", "123456");
map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
map.put("master_id", "99813608");
map.put("secret_key", "123456");

//客户测试
map.put("domain", "http://admin.asmetymj.com/");//45678910,api.zhios.cn84198689
map.put("master_id", "32053480");
map.put("secret_key", "123456");
// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
// map.put("master_id", "13376168");
// map.put("secret_key", "123456");

// map.put("token", "123465");
return map;


+ 6
- 0
example/android/build.gradle Просмотреть файл

@@ -2,6 +2,9 @@ buildscript {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}

dependencies {
@@ -18,6 +21,9 @@ allprojects {
maven {
url "http://repo.baichuan-android.taobao.com/content/groups/BaichuanRepositories/"
}
flatDir {
dirs 'libs'
}

}
}


+ 18
- 22
example/ios/Podfile.lock Просмотреть файл

@@ -12,13 +12,6 @@ PODS:
- AMapFoundation (~> 1.6.4)
- BCUserTrack (5.2.0.18-appkeys):
- UTDID
- connectivity (0.0.1):
- Flutter
- Reachability
- connectivity_for_web (0.1.0):
- Flutter
- connectivity_macos (0.0.1):
- Flutter
- device_info (0.0.1):
- Flutter
- Flutter (1.0.0)
@@ -32,6 +25,8 @@ PODS:
- securityGuard (= 5.4.191)
- UTDID (= 1.1.0.16)
- WindVane (= 8.5.0.46-bc11)
- flutter_kaduofen (0.0.1):
- Flutter
- flutter_native_image (0.0.1):
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
@@ -142,7 +137,6 @@ PODS:
- Flutter
- "permission_handler (5.0.1+1)":
- Flutter
- Reachability (3.2)
- save_image (0.0.1):
- Flutter
- securityGuard (5.4.191)
@@ -209,12 +203,16 @@ PODS:
- WindVane/Basic (8.5.0.46-bc11)
- WindVane/Core (8.5.0.46-bc11)
- WindVane/WindVane (8.5.0.46-bc11)
- zhiying_acquisition (0.0.1):
- Flutter
- zhiying_base_widget (0.0.1):
- Flutter
- zhiying_business_college (0.0.1):
- Flutter
- zhiying_comm (0.0.1):
- Flutter
- zhiying_credit_card (0.0.1):
- Flutter
- zhiying_equity_card (0.0.1):
- Flutter
- zhiying_member_upgrade (0.0.1):
@@ -229,12 +227,10 @@ PODS:
DEPENDENCIES:
- ali_auth_wbq (from `.symlinks/plugins/ali_auth_wbq/ios`)
- amap_flutter_location (from `.symlinks/plugins/amap_flutter_location/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- Flutter (from `Flutter`)
- flutter_alibc (from `.symlinks/plugins/flutter_alibc/ios`)
- flutter_kaduofen (from `.symlinks/plugins/flutter_kaduofen/ios`)
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- flutter_user_agent (from `.symlinks/plugins/flutter_user_agent/ios`)
@@ -275,9 +271,11 @@ DEPENDENCIES:
- video_player (from `.symlinks/plugins/video_player/ios`)
- video_player_web (from `.symlinks/plugins/video_player_web/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
- zhiying_acquisition (from `.symlinks/plugins/zhiying_acquisition/ios`)
- zhiying_base_widget (from `.symlinks/plugins/zhiying_base_widget/ios`)
- zhiying_business_college (from `.symlinks/plugins/zhiying_business_college/ios`)
- zhiying_comm (from `.symlinks/plugins/zhiying_comm/ios`)
- zhiying_credit_card (from `.symlinks/plugins/zhiying_credit_card/ios`)
- zhiying_equity_card (from `.symlinks/plugins/zhiying_equity_card/ios`)
- zhiying_member_upgrade (from `.symlinks/plugins/zhiying_member_upgrade/ios`)
- zhiying_new_user_free (from `.symlinks/plugins/zhiying_new_user_free/ios`)
@@ -304,7 +302,6 @@ SPEC REPOS:
- mob_sharesdk
- mob_smssdk
- MOBFoundation
- Reachability
- TOCropViewController
- WechatOpenSDK

@@ -313,18 +310,14 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/ali_auth_wbq/ios"
amap_flutter_location:
:path: ".symlinks/plugins/amap_flutter_location/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_for_web:
:path: ".symlinks/plugins/connectivity_for_web/ios"
connectivity_macos:
:path: ".symlinks/plugins/connectivity_macos/ios"
device_info:
:path: ".symlinks/plugins/device_info/ios"
Flutter:
:path: Flutter
flutter_alibc:
:path: ".symlinks/plugins/flutter_alibc/ios"
flutter_kaduofen:
:path: ".symlinks/plugins/flutter_kaduofen/ios"
flutter_native_image:
:path: ".symlinks/plugins/flutter_native_image/ios"
flutter_plugin_android_lifecycle:
@@ -405,12 +398,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/video_player_web/ios"
webview_flutter:
:path: ".symlinks/plugins/webview_flutter/ios"
zhiying_acquisition:
:path: ".symlinks/plugins/zhiying_acquisition/ios"
zhiying_base_widget:
:path: ".symlinks/plugins/zhiying_base_widget/ios"
zhiying_business_college:
:path: ".symlinks/plugins/zhiying_business_college/ios"
zhiying_comm:
:path: ".symlinks/plugins/zhiying_comm/ios"
zhiying_credit_card:
:path: ".symlinks/plugins/zhiying_credit_card/ios"
zhiying_equity_card:
:path: ".symlinks/plugins/zhiying_equity_card/ios"
zhiying_member_upgrade:
@@ -431,12 +428,10 @@ SPEC CHECKSUMS:
AMapFoundation: b67560a6f21aab81c8c12f84616b55a3833b6253
AMapLocation: a46c30d9930d0f3a3bd21139d8f845d10ac3f01d
BCUserTrack: 49251c6fb7c65cbbc221a492bbd3f3e142f1fb0f
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_alibc: 0e2a29e7c1de759672d87a260051240d209964b9
flutter_kaduofen: 12c2c62ef2346a8899796e03c05ad8060002f59f
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
flutter_user_agent: 27c45d034dc31b80948d29998cea52cd3a7bf936
@@ -466,7 +461,6 @@ SPEC CHECKSUMS:
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
save_image: 1d4bdcb69832f573215c0e2971fe9e572dfc1c84
securityGuard: 9c04c44a3b663f36e15064042abfc107fa07133c
secverify: f4bc7284766a8804646c377e61f37252964842dd
@@ -491,9 +485,11 @@ SPEC CHECKSUMS:
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
WindVane: 56e096abae757397ccd3accb66a959f3ffcbf949
zhiying_acquisition: d18b272f27cdda68733e7becc54f17e0a64f9806
zhiying_base_widget: 00868c0d2723a3a425c18b27204fbc67e3f7e59d
zhiying_business_college: dc3ba7fb32aad4db421aa94dbbc1ef712e7d00cd
zhiying_comm: 0daef4a480f4f4dbea3e11b615f3264aafea924b
zhiying_credit_card: 1ebff7a1f74683c6d4adc7bf2dc3aa3b83bbf7da
zhiying_equity_card: 1afe5c3c8e5317dcebf55159b4087cd0d57e49ff
zhiying_member_upgrade: 1207671575ad01ed3336c604e235843a98fa1a0c
zhiying_new_user_free: 1640f83c12643475f03fabffcba13f498e555243


+ 6
- 0
example/ios/Runner.xcodeproj/project.pbxproj Просмотреть файл

@@ -10,6 +10,7 @@
0AE1282E2855C01A7663C354 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A860D105A09AEA74261219D2 /* libPods-Runner.a */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1F2F55D7256DFF5400A97630 /* app_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F2F55D6256DFF5400A97630 /* app_icon.png */; };
1F5407E52616FE4800C6A831 /* FNBaseFlutterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F5407E42616FE4800C6A831 /* FNBaseFlutterViewController.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
@@ -41,6 +42,8 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
1F2F55D6256DFF5400A97630 /* app_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = app_icon.png; sourceTree = "<group>"; };
1F5407E32616FE4800C6A831 /* FNBaseFlutterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FNBaseFlutterViewController.h; sourceTree = "<group>"; };
1F5407E42616FE4800C6A831 /* FNBaseFlutterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FNBaseFlutterViewController.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3CF5E07C1CDF5F802B057127 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
5F28AF46041AA2464EF2701A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
@@ -123,6 +126,8 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
1F5407E32616FE4800C6A831 /* FNBaseFlutterViewController.h */,
1F5407E42616FE4800C6A831 /* FNBaseFlutterViewController.m */,
9F5F7EA525626514009BD779 /* Runner.entitlements */,
9FFCE2F3251ADE0600F4F353 /* 项目资源 */,
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
@@ -362,6 +367,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1F5407E52616FE4800C6A831 /* FNBaseFlutterViewController.m in Sources */,
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,


+ 10
- 10
example/ios/Runner/AppDelegate.m Просмотреть файл

@@ -27,19 +27,19 @@

// 获取设置
- (NSDictionary*)getSetting {
// return @{
// @"domain": @"http://inapi.izhyin.cn",
// @"master_id": @"123456",
// @"secret_key": @"123456"
return @{
@"domain": @"http://inapi.izhyin.cn",
@"master_id": @"123456",
@"secret_key": @"123456"
//@"domain": @"http://192.168.0.113:5000"
// };
};

return @{
@"domain": @"http://api.zhios.cn",
@"master_id": @"99813608",
@"secret_key": @"123456"
// return @{
// @"domain": @"http://api.zhios.cn",
// @"master_id": @"99813608",
// @"secret_key": @"123456"
//@"domain": @"http://192.168.0.113:5000"
};
// };
}

#pragma mark -- 第三方应用跳转


+ 5
- 4
example/ios/Runner/Base.lproj/Main.storyboard Просмотреть файл

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<!--Base Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="FNBaseFlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
@@ -20,6 +20,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<navigationItem key="navigationItem" id="Nba-kd-4am"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>


+ 18
- 0
example/ios/Runner/FNBaseFlutterViewController.h Просмотреть файл

@@ -0,0 +1,18 @@
//
// FNBaseFlutterViewController.h
// Runner
//
// Created by FNUser on 2020/10/28.
//

#import <UIKit/UIKit.h>
#import "Flutter/FlutterViewController.h"

NS_ASSUME_NONNULL_BEGIN

@interface FNBaseFlutterViewController : FlutterViewController


@end

NS_ASSUME_NONNULL_END

+ 38
- 0
example/ios/Runner/FNBaseFlutterViewController.m Просмотреть файл

@@ -0,0 +1,38 @@
//
// FNBaseFlutterViewController.m
// Runner
//
// Created by FNUser on 2020/10/28.
//

#import "FNBaseFlutterViewController.h"

@interface FNBaseFlutterViewController ()


@end

@implementation FNBaseFlutterViewController


- (void)viewDidLoad {
[super viewDidLoad];
UIWindow *window = [UIApplication sharedApplication].delegate.window;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self];
window.rootViewController = navController;
navController.navigationBar.hidden = YES;
}

- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.navigationController setNavigationBarHidden:NO animated:animated];
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
}


@end

+ 10
- 3
example/lib/main.dart Просмотреть файл

@@ -23,6 +23,8 @@ import 'package:zhiying_member_upgrade/register.dart';
import 'package:zhiying_equity_card/zhiying_equity_card.dart';
import 'package:zhiying_official/register.dart';
import 'package:zhiying_base_widget/zhiying_base_widget.dart';
import 'package:zhiying_acquisition/register.dart';
import 'package:zhiying_credit_card/register.dart';

void main() {
FlutterError.onError = (FlutterErrorDetails details) {
@@ -65,6 +67,8 @@ class _MyAppState extends State<MyApp> {
MemberUpgradeRegister.init();
EquityCardRegister.init();
OfficialRegister.init();
AcquisitionRegister.init();
CreditCardRegister.init();
print('初始化百川');
FlutterAlibc.initAlibc(version: "", appName: "").then((result) {
print("白川" + '${result.errorCode} ${result.errorMessage}');
@@ -72,9 +76,11 @@ class _MyAppState extends State<MyApp> {
MobPushUtil.setCanPush();

EventUtil.instance.on().listen((event) {});

// app更新插件
AppUpdateUtil.initXUpdate();
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
if (!inProduction) {
//debug app不更新 app更新插件
AppUpdateUtil.initXUpdate();
}
}

@override
@@ -101,6 +107,7 @@ class _MyAppState extends State<MyApp> {
child: child,
);
},
navigatorObservers: [lifeObserver],
theme: ThemeData(
fontFamily: 'PingFang',
primaryColor: HexColor.fromHex('#FF4242'),


+ 6
- 2
example/pubspec.yaml Просмотреть файл

@@ -32,11 +32,15 @@ dev_dependencies:
path: ../../zhiying_equity_card
zhiying_official:
path: ../../zhiying_official
zhiying_acquisition:
path: ../../zhiying_acquisition
zhiying_credit_card:
path: ../../zhiying_credit_card
#微信导师
zhiying_wechat_teacher:
#path: ../zhiying_wechat_teacher
git:
ref: 0.0.1+1
ref: 0.0.2
url: http://192.168.0.138:3000/FnuoOS_ZhiYing/zhiying_wechat_teacher.git
#朋友圈
zhiying_moments:
@@ -48,7 +52,7 @@ dev_dependencies:
zhiying_member_upgrade:
#path: ../Zhiying_Member_Upgrade
git:
ref: 0.0.2
ref: 0.0.6
url: http://192.168.0.138:3000/FnuoOS_ZhiYing/Zhiying_Member_Upgrade.git
plugin_platform_interface: "1.0.2"
permission_handler_platform_interface: "2.0.1"


+ 2
- 0
lib/dialog/global_dialog/activity_dialog/activity_dialog.dart Просмотреть файл

@@ -14,6 +14,8 @@ class ActivityDialog extends StatelessWidget {

const ActivityDialog(this.model, {Key key}) : super(key: key);



static Future show(BuildContext context) async {
try {
Map result = await NetUtil.post('/api/v1/mod/pub.flutter.current_activity_dialog', method: NetMethod.GET);


+ 1
- 1
lib/dialog/global_dialog/advertising_dialog/advertising_dialog.dart Просмотреть файл

@@ -25,8 +25,8 @@ class AdvertisingDialog extends StatelessWidget {
if (!EmptyUtil.isEmpty(item)) {
AdvertisingDialogModel model = AdvertisingDialogModel.fromJson(item);
if (!EmptyUtil.isEmpty(model)) {
await Future.delayed(Duration(milliseconds: model?.interval*1000));
await showCupertinoDialog(context: context, builder: (_) => AdvertisingDialog(model));
await Future.delayed(Duration(milliseconds: (model?.interval ?? 0) * 1000 * 60));
}
}
}


+ 21
- 7
lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_create.dart Просмотреть файл

@@ -1,9 +1,11 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_clipboard_plugin/flutter_clipboard_plugin.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/Intellect_search_set_model.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/intellect_dialog_data_model.dart';
import 'package:zhiying_base_widget/utils/contants.dart';
@@ -18,9 +20,19 @@ class IntellectCreate {
static IntellectSearchSetModel _setModel;
static bool isRequest = false;

//是否检查粘贴板
static bool check = false;

static setCheck(bool isCheck){
check=isCheck;
}

///判断规则
static checkAndCreate(AppLifecycleState state, BuildContext context) async {
if (state == AppLifecycleState.resumed && !isRequest) {


if (state == AppLifecycleState.resumed && !isRequest &&check) {
print("读取粘贴版");
isRequest = true;
Timer(Duration(milliseconds: 2000), () {
@@ -30,8 +42,7 @@ class IntellectCreate {
await _requestSetData(context);
} catch (e, s) {
isRequest = false;
print(e);
print(s);
Logger.error(e, s);
}
}
// Timer(Duration(milliseconds: 500), () async {
@@ -95,7 +106,11 @@ class IntellectCreate {
///弹起存在不存在商品的弹窗
if (!Constants.isShowIntellectDialog) {
Constants.isShowIntellectDialog = true;
await showDialog(context: context, child: IntellectSearchNoGoodsDialog(setModel: _setModel,));
await showDialog(
context: context,
child: IntellectSearchNoGoodsDialog(
setModel: _setModel,
));
Constants.isShowIntellectDialog = false;
}
} else if (data.toString() == "403032") {
@@ -119,8 +134,7 @@ class IntellectCreate {
///检查字段是否被监听
static void validate(BuildContext context, IntellectSearchSetModel setModel) async {
//获取粘贴板的文字
ClipboardData data = await Clipboard.getData(Clipboard.kTextPlain);
String content = data?.text?.trim() ?? "";
String content = await FlutterClipboardPlugin.getData;

///粘贴版的文字如果是空直接跳出不检索
if (content == null || content.length == 0) {
@@ -162,6 +176,6 @@ class IntellectCreate {
}
}
}
requestDialog(context, content,setModel);
requestDialog(context, content, setModel);
}
}

+ 5
- 3
lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_no_goods_dialog.dart Просмотреть файл

@@ -1,6 +1,7 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_clipboard_plugin/flutter_clipboard_plugin.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/intellect_dialog_data_model.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/no_goods_dialog_style_model.dart';
import 'package:cached_network_image/cached_network_image.dart';
@@ -34,9 +35,10 @@ class _IntellectSearchNoGoodsDialogState extends State<IntellectSearchNoGoodsDia

///获取粘贴板内容
_getClipBoardData() async {
ClipboardData data = await Clipboard.getData(Clipboard.kTextPlain);
_textEditingController.text = data.text.trim();
searchText = data.text.trim();
// ClipboardData data = await Clipboard.getData(Clipboard.kTextPlain);
String result = await FlutterClipboardPlugin.getData;
_textEditingController.text = result;
searchText = result;
requestStyle();
setState(() {});
}


+ 32
- 14
lib/pages/custom_page/custom_page.dart Просмотреть файл

@@ -2,14 +2,11 @@ import 'dart:convert';

import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
import 'package:zhiying_base_widget/pages/custom_page/custom_item_page.dart';
import 'package:zhiying_base_widget/pages/main_page/model/background_model.dart';
import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_bg_notifier.dart';
import 'package:zhiying_base_widget/widgets/custom/search/custom_search_widget.dart';
import 'package:zhiying_base_widget/widgets/empty/empty_widget.dart';
import 'package:zhiying_base_widget/widgets/others/mine_header_bg_widget.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -19,8 +16,8 @@ import 'bloc/custom_page_bloc.dart';
import 'bloc/custom_page_state.dart';
import 'bloc/custom_page_event.dart';
import 'bloc/custom_page_repository.dart';
import 'package:zhiying_base_widget/widgets/search/widget/my_tab.dart';
import 'dart:ui';
import 'package:fluttertoast/fluttertoast.dart';

///
/// 通用模块页面
@@ -258,24 +255,24 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
String parentTitle = !EmptyUtil.isEmpty(widget?.data) ? widget?.data['title'] ?? '' : '';
_isHasAppbar = true;
return AppBar(
backgroundColor: HexColor.fromHex(null != data ? data['app_bar_bg_color'] ?? '#FFFFFF' : '#FFFFFF'),
backgroundColor: HexColor.fromHex(!EmptyUtil.isEmpty(data) ? data['app_bar_bg_color'] ?? '#FFFFFF' : '#FFFFFF'),
brightness: Brightness.light,
leading: IconButton(
leading: Navigator.canPop(context) ? IconButton(
icon: Icon(
Icons.arrow_back_ios,
size: 22,
color: HexColor.fromHex('#333333'),
color: HexColor.fromHex(!EmptyUtil.isEmpty(data) ? data['app_bar_name_color'] ?? '#333333' : '#333333'),
),
onPressed: () => Navigator.maybePop(context),
),
) : null,
title: Text(
null != data && data.containsKey('app_bar_name')
? data['app_bar_name'] != '自定义页面'
!EmptyUtil.isEmpty(data) && data.containsKey('app_bar_name')
// ? data['app_bar_name'] != '自定义页面'
? data['app_bar_name']
: parentTitle
// : parentTitle
: parentTitle,
style: TextStyle(
color: HexColor.fromHex(null != data ? data['app_bar_name_color'] ?? '#333333' : '#333333'),
color: HexColor.fromHex(!EmptyUtil.isEmpty(data) ? data['app_bar_name_color'] ?? '#333333' : '#333333'),
fontSize: 16,
fontWeight: FontWeight.bold,
),
@@ -314,6 +311,15 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single

// 2、导航栏开启的情况
if (listStyle.length > 0) {

// 获取分类类型,如果第一位type等于imageAndText说明是带有小图标的
bool haveIcon = false;
try {
haveIcon = listStyle[0]['type']?.toString() == 'imageAndText';
} catch (e, s){
Logger.error(e, s);
}

// tabContorller 初始化
if (null == _tabController || _tabController.length != listStyle.length) {
_tabController = new TabController(length: listStyle.length, vsync: this);
@@ -321,6 +327,7 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single

result.add(Container(
height: 40,
padding: const EdgeInsets.only(bottom: 5),
width: double.infinity,
color: HexColor.fromHex(data['bg_color']),
child: TabBar(
@@ -340,7 +347,18 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
height: 2.5,
horizontalPadding: 5,
),
tabs: listStyle.map((e) => Text(e['name'])).toList(),
// 不带图标
tabs: !haveIcon ? listStyle.map((e) => Text(e['name'])).toList() :
// 带图标
listStyle.map((item) {
return MyTab(
icon: CachedNetworkImage(
imageUrl: item['choose_image_url'] ?? '',
width: 14,
),
text: item['name'],
);
}).toList()
),
));

@@ -372,6 +390,7 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
return result;
}

/// 背景颜色
_buildBackground(BackgroundModel backgroundModel) {
if (backgroundModel != null) {
var headerBg = backgroundModel.headerBg;
@@ -422,7 +441,6 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
}

@override
// TODO: implement wantKeepAlive
bool get wantKeepAlive => true;
}



+ 5
- 1
lib/pages/goods_share_page/goods_share_image/goods_share_image.dart Просмотреть файл

@@ -368,7 +368,7 @@ class _GoodsShareImageContentState extends State<_GoodsShareImageContent> with A
Loading.show(context);
ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png);
Uint8List pngBytes = byteData.buffer.asUint8List();
File file = await EncodeUtil.compressImage(context,images: pngBytes, size: 400);
File file = await EncodeUtil.compressImage(context, images: pngBytes, size: 400);
Loading.dismiss();
_shareModel.poster = file.readAsBytesSync();
}
@@ -406,6 +406,10 @@ class _GoodsShareImageContentState extends State<_GoodsShareImageContent> with A
// ============= 复制文案 =================
Clipboard.setData(ClipboardData(text: _content));

if(_shareModel.image==null){
_shareModel.image=List();
}

showCupertinoModalPopup(
context: context,
builder: (context) => ShareAlert(


+ 114
- 14
lib/pages/home_page/home_page.dart Просмотреть файл

@@ -1,26 +1,17 @@
import 'dart:async';
import 'dart:convert' as convert;
import 'dart:convert';
import 'dart:io';

import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:moblink/moblink.dart';
import 'package:mobpush_plugin/mobpush_custom_message.dart';
import 'package:mobpush_plugin/mobpush_notify_message.dart';
import 'package:mobpush_plugin/mobpush_plugin.dart';
import 'package:provider/provider.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/activity_dialog/activity_dialog.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/advertising_dialog/advertising_dialog.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/intellect_create.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/tip_dialog/tip_dialog.dart';
import 'package:zhiying_base_widget/models/app_config_model.dart';
import 'package:zhiying_base_widget/pages/custom_page/event/reload_event.dart';
import 'package:zhiying_base_widget/utils/contants.dart';
@@ -36,10 +27,6 @@ import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:zhiying_comm/util/event_util/login_success_event.dart';
import 'package:zhiying_comm/util/event_util/event_util.dart';
import 'package:zhiying_comm/util/event_util/log_out.dart';
import 'package:zhiying_comm/util/event_util/login_success_event.dart';
import 'package:zhiying_comm/util/event_util/event_util.dart';
import 'package:zhiying_comm/util/event_util/log_out.dart';
import 'package:package_info/package_info.dart';

class HomeCenterPage extends StatefulWidget {
@override
@@ -60,7 +47,7 @@ class HomePage extends StatefulWidget {
_HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> with WidgetsBindingObserver, TickerProviderStateMixin {
class _HomePageState extends LifeState<HomePage> with WidgetsBindingObserver, TickerProviderStateMixin {
int _currentIndex = 0;
List<Map<String, dynamic>> _data = List();
static const EventChannel _eventChannel = const EventChannel('JAVA_TO_FLUTTER');
@@ -290,6 +277,63 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
items: items);
}

// Widget createBottomNavigationBarNew(List<Map<String, dynamic>> tabs) {
//
// List<TabItem> items = List<TabItem>();
// for (int i = 0; i < tabs.length; i++) {
// BaseTabModel model = BaseTabModel.fromJson(tabs[i]);
// String icon = ImageUtil.getUrl(model.icon);
// String selectedIcon = ImageUtil.getUrl(model.chooseIcon ?? model.icon);
// String textColor = model.fontColor;
// String chooseColor = model.chooseColor ?? textColor;
//
// if (model.isShow == "1") {
// items.add(TabItem<Image>(
// icon: Image.network(icon ?? ''),
// activeIcon: Image.network(selectedIcon ?? ''),
// title: model.name ?? ''
// ));
// }
// }
//
// if (items.length < 2) {
// return Container();
// }
// String bgColor = '#ffffff';
// String textColor = '#999999';
// String activeColor = '#FF4242';
// if (tabs.first != null) {
// BaseTabModel model = BaseTabModel.fromJson(tabs.first);
// bgColor = model.bgColor ?? bgColor;
// textColor = model?.fontColor ?? textColor;
// activeColor = model?.chooseColor ?? activeColor;
// }
//
// return ConvexAppBar(
// elevation: 0,
// backgroundColor: HexColor.fromHex(bgColor),
// items: items,
// height: 50,
// color: HexColor.fromHex(textColor),
// activeColor: HexColor.fromHex(activeColor),
// initialActiveIndex: _currentIndex,
// style: TabStyle.react,
// onTap: (int index) async {
// BaseTabModel model = BaseTabModel.fromJson(tabs[index]);
// if (await _checkLimit(model)) {
// ///避免同一个页面多次点击多次重绘
// if (_currentIndex == index) {
// return;
// } else {
// setState(() {
// _currentIndex = index;
// });
// }
// }
// },
// );
// }

Future<bool> _checkLimit(BaseTabModel model) async {
if (model.requiredLogin == '1') {
UserInfoModel user = await Provider.of<UserInfoNotifier>(context, listen: false).getUserInfoModel();
@@ -320,6 +364,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
// 活动弹窗
await AdvertisingDialog.show(context);

// 检查app更新
await AppUpdateUtil.updateApp(context);

IntellectCreate.checkAndCreateFirst(context);
@@ -384,4 +429,59 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
)
]));
}

@override
void onPaused() {
print("首页调用不可见");
IntellectCreate.setCheck(false);
}

@override
void onResume() {
print("首页调用可见");
IntellectCreate.setCheck(true);
}
}

final RouteObserver<Route> lifeObserver = RouteObserver();

abstract class LifeState<T extends StatefulWidget> extends State<T>
with RouteAware {
@override
void initState() {
super.initState();
}

@override
void didChangeDependencies() {
lifeObserver.subscribe(this, ModalRoute.of(context));
super.didChangeDependencies();
}

@override
void dispose() {
lifeObserver.unsubscribe(this);
super.dispose();
}


void didPop() {
onPaused();
}

void didPopNext() {
onResume();
}

void didPush() {
onResume();
}

void didPushNext() {
onPaused();
}

void onResume();

void onPaused();
}

+ 14
- 3
lib/pages/launch_page/launch_page.dart Просмотреть файл

@@ -3,7 +3,6 @@ import 'dart:async';
import 'dart:io';
import 'dart:typed_data';

import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@@ -40,12 +39,10 @@ class LaunchPage extends StatefulWidget {
class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
final GlobalKey navigatorKey = new GlobalKey();


int showTime = 0;

@override
void initState() {

validateInit();
super.initState();
}
@@ -56,6 +53,20 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
// I am connected to a wifi network.
Logger.debug('ConnectivityResult.wifi');
print('ConnectivityResult.wifi');

///检查是否覆盖安装
//取masterId
String lasterMasterId = await SharedPreferencesUtil.getStringValue(Constants.masterId, defaultVal: "1");
Map setting = await NativeUtil.getSetting();
String masterId = setting['master_id'];
if (lasterMasterId != "1") {
if (masterId != lasterMasterId) {
await SharedPreferencesUtil.clean();
}
}

SharedPreferencesUtil.setStringValue(Constants.masterId, masterId);

Application.init().then((_) async {
///引导页
PackageInfo packageInfo = await PackageInfo.fromPlatform();


+ 1
- 1
lib/pages/orders_page/views/order_tabbar_widget.dart Просмотреть файл

@@ -29,7 +29,7 @@ class OrderTabbarWidget extends StatelessWidget {
Expanded(
child: TabBar(
controller: controller,
isScrollable: false,
isScrollable: (controller?.length ?? 0) >=4 ? true : false,
indicatorSize: TabBarIndicatorSize.label,
// tabs: widgets,
indicatorColor:


+ 1
- 1
lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart Просмотреть файл

@@ -80,7 +80,7 @@ class _SecurityBindAlipayContainerState
void _verifiy() {
bool canConfirm = _nameController.text.length > 0 &&
_accountController.text.length > 0 &&
_codeController.text.length == 6;
_codeController.text.length >= 4 && _codeController.text.length <= 4;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 1
- 1
lib/pages/security_page/security_mobile/security_mobile_unbind.dart Просмотреть файл

@@ -130,7 +130,7 @@ class _SecurityMobileUnbindState extends State<SecurityMobileUnbind> {
}

void _verifiy() {
bool canConfirm = _codeController.text.length == 6;
bool canConfirm = _codeController.text.length >= 4 && _codeController.text.length <= 6;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 2
- 1
lib/pages/security_page/security_password/security_password.dart Просмотреть файл

@@ -145,7 +145,8 @@ class _SecurityPasswordState extends State<SecurityPassword> {
}

void _verifiy() {
bool canConfirm = _passwordController.text.length >= 6 && _confirmController.text.length >= 6 && _codeController.text.length == 6;
bool canConfirm = _passwordController.text.length >= 6 && _confirmController.text.length >= 6 &&
_codeController.text.length >= 4 && _codeController.text.length <= 6;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 1
- 1
lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart Просмотреть файл

@@ -36,7 +36,7 @@ class _SecurityUnbinAlipayState extends State<SecurityUnbinAlipay> {
}

void _verifiy() {
bool canConfirm = _codeController.text.length == 6;
bool canConfirm = _codeController.text.length >= 4 && _codeController.text.length <= 6;
if (canConfirm != _canConfirm) {
setState(() {
_canConfirm = canConfirm;


+ 2
- 2
lib/pages/team_page/team_page.dart Просмотреть файл

@@ -133,7 +133,7 @@ class _TeamPageContainerState extends State<_TeamPageContainer> {
SliverPersistentHeader(
delegate: new _SliverTabBarDelegate(
tabBar: TabBar(
isScrollable: false,
isScrollable: (styleModel?.userLvTabs?.length ?? 0) <= 4 ? false : true,
labelStyle: TextStyle(fontWeight: FontWeight.bold, fontSize: 13),
unselectedLabelStyle: TextStyle(fontSize: 13),
indicator: MaterialIndicator(
@@ -143,7 +143,7 @@ class _TeamPageContainerState extends State<_TeamPageContainer> {
bottomLeftRadius: 8,
bottomRightRadius: 8,
color: HexColor.fromHex(styleModel?.userLvTabsLineColor ?? '#F94B47'),
horizontalPadding: 30,
horizontalPadding: (styleModel?.userLvTabs?.length ?? 0) <= 4 ? 30 : 20,
),
controller: _controller,
// tabs: tabTitle.map((f) => Tab(text: f)).toList(),


+ 5
- 2
lib/register.dart Просмотреть файл

@@ -41,6 +41,7 @@ import 'package:zhiying_base_widget/widgets/custom/goods/custom_goods_creater.da
import 'package:zhiying_base_widget/widgets/custom/multi_nav/custom_quick_entry.dart';
import 'package:zhiying_base_widget/widgets/custom/notice/custom_notice_widget.dart';
import 'package:zhiying_base_widget/widgets/custom/search/custom_search_widget.dart';
import 'package:zhiying_base_widget/widgets/custom/share_content/share_content_widget.dart';
import 'package:zhiying_base_widget/widgets/custom/slide_banner/custom_slide_banner_creater.dart';
import 'package:zhiying_base_widget/widgets/goods_details/footer/goods_details_footer_widget.dart';
import 'package:zhiying_base_widget/widgets/goods_details/price/goods_details_price_widget.dart';
@@ -121,8 +122,8 @@ class BaseWidgetRegister {
// ================ Weixin
register.setupWechat(config.keys?.weixin?.appId ?? '', config.keys?.weixin?.secret ?? '', config.keys?.weixin?.universalLink ?? '');

// ================ Weibo
// register.setupSinaWeibo(config.keys?.weibo?.appkey ?? '', config.keys?.weibo?.secret ?? '', config.keys?.weibo?.redirectUrl ?? '');
//================ Weibo
register.setupSinaWeibo(config.keys?.weibo?.appkey ?? '', config.keys?.weibo?.secret ?? '', config.keys?.weibo?.redirectUrl ?? '',config.keys?.weibo?.universalLink??'templink');

// ================ QQ
register.setupQQ(config.keys?.qq?.appId ?? '', config.keys?.qq?.appkey ?? '');
@@ -410,5 +411,7 @@ class BaseWidgetRegister {
WidgetFactory.regist('placard', DefaultWidgetCreater((model) => CustomNoticeWidget(model)));
// 授权
WidgetFactory.regist('audit_tip', DefaultWidgetCreater((model) => HomeAuth(model)));
// 分享内容组件
WidgetFactory.regist('share_content', DefaultWidgetCreater((model) => CustomShareContentWidget(model)));
}
}

+ 4
- 0
lib/utils/contants.dart Просмотреть файл

@@ -29,4 +29,8 @@ class Constants {

//==============================版本号,控制引导页显示===================================
static String versionNumber = "versionNumber";


///masterId
static String masterId="sp_master_id";
}

+ 3
- 80
lib/widgets/custom/multi_nav/custom_quick_entry.dart Просмотреть файл

@@ -120,7 +120,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer>
// 图标的高度
double iconHeight = 40.0;
// 标题的高度
double titleHeight = 20.0;
double titleHeight = 21.0;

// 子元素的高度
double itemHeight = iconHeight;
@@ -443,7 +443,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer>
child: Text(
item?.title ?? '',
style:
TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)),
TextStyle(fontSize: 12, color: HexColor.fromHex(model?.titleColor)),
),
),
),
@@ -558,83 +558,6 @@ class MyNetWorkImage extends StatelessWidget {
child: CachedNetworkImage(width: width, imageUrl: imgUrl),
);
}

// Widget _getMainWidget(CustomQuickEntryModel model) {
// // 数据总数
// int totalDataSize = model?.listStyle?.length ?? 0;
//
// // 展示的总行数
// int totalRowSize = 1;int.parse(model?.rowSize ?? '1');
//
// // 展示的列数
// int columSize = 5;int.parse(model?.columnSize ?? '5');
//
// // 图标的高度
// double iconHeight = 40.0;
// // 标题的高度
// double titleHeight = 20.0;
//
// // 子元素的高度
// double itemHeight = iconHeight;
//
// // 如果有一级标题
// if (!EmptyUtil.isEmpty(model?.isShowTitle) && model.isShowTitle == '1') {
// itemHeight = iconHeight + titleHeight;
// }
//
// //如果有二级标题
// if (!EmptyUtil.isEmpty(model?.isShowSubTitle) && model.isShowSubTitle == '1') {
// itemHeight = iconHeight + titleHeight * 2;
// }
//
// // 进度条的边距
// double barMargin = 15.0;
// // 总页数
// int totalPage = totalDataSize % (totalRowSize * columSize) == 0 ? totalDataSize ~/ (totalRowSize * columSize) : (totalDataSize ~/ (totalRowSize * columSize)) + 1;
//
// // 总体高度 = 行数 * (子元素高度 + 边距高度) + 进度条的高度
// double totalHeight = totalRowSize * (itemHeight + barMargin) + 4;
// if (!EmptyUtil.isEmpty(model?.pagination) && model.pagination != 'type_null' /*model.pagination_open == '0'*/) {
// totalHeight = totalRowSize * (itemHeight + barMargin);
// }
//
// return Container(
// color: HexColor.fromHex(widget?.model['bg_color']),
// // color: Colors.yellow,
// child: Container(
// margin: EdgeInsets.only(top: 15, bottom: totalPage > 1 ? 15 : 0),
// height: totalHeight,
// // 总体高度
// width: double.infinity,
// color: HexColor.fromHex(widget?.model['bg_color']),
// child: Swiper(
// controller: _controller,
// itemCount: totalPage,
// loop: false,
// itemBuilder: (context, index) {
// return Container(
// height: double.infinity,
// width: double.infinity,
// padding: const EdgeInsets.symmetric(horizontal: 12.5),
// child: _getPageWidget(
// iconHeight: iconHeight,
// titleHeight: titleHeight,
// totalDataSize: totalDataSize,
// totalPage: totalPage,
// currentPage: index,
// totalRowSize: totalRowSize,
// columSize: columSize,
// model: model,
// itemHeight: itemHeight,
// ),
// );
// },
// pagination: totalPage <= 1 ? null : _getSwiperPaginationContorl(model, totalPage),
// ),
// ),
// );
// }

}

class CustomQuickCateEntry extends StatefulWidget {
@@ -739,7 +662,7 @@ class _CustomQuickCateEntryState extends State<CustomQuickCateEntry>
// 图标的高度
double iconHeight = 40;
// 标题的高度
double titleHeight = 20.0;
double titleHeight = 21.0;

// 子元素的高度
double itemHeight = iconHeight;


+ 117
- 4
lib/widgets/custom/search/custom_search_widget.dart Просмотреть файл

@@ -48,12 +48,18 @@ class CustomSearchWidget extends StatelessWidget {
if (EmptyUtil.isEmpty(model)) return Container();
Widget rlt;
switch (model.moduleType) {
case 'search_1':
case 'search_1': // 右1图标
rlt = _buildStyle1Widget(context);
break;
case 'search_2':
case 'search_2': // 无图标
rlt = _buildStyle2Widget(context);
break;
case 'search_3': // 左1右1图标
rlt = _buildStyle3Widget(context);
break;
case 'search_4': // 右按钮
rlt = _buildStyle4Widget(context);
break;
default:
rlt = Container();
break;
@@ -62,6 +68,113 @@ class CustomSearchWidget extends StatelessWidget {
return rlt;
}

/// 左1右1图标
Widget _buildStyle3Widget(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () => _onClickListener(context, model?.listStyle?.leftCss),
child: CachedNetworkImage(
width: 30,
height: 30,
imageUrl: model?.listStyle?.leftCss?.image ?? '',
)),
// 图标1
SizedBox(width: 10),
// 中间
Expanded(
child: GestureDetector(
onTap: () => _onClickListener(context, model?.listStyle?.searchCss),
behavior: HitTestBehavior.opaque,
child: Container(
// height: 30,
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 9),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(60 / 2), color: HexColor.fromHex(model?.listStyle?.searchCss?.bgColor)),
child: Row(
children: <Widget>[
CachedNetworkImage(
width: 15,
height: 15,
imageUrl: model?.listStyle?.searchCss?.image ?? '',
),
SizedBox(width: 4),
Text(model?.listStyle?.searchCss?.text ?? '输入搜索内容,领券省钱', style: TextStyle(fontSize: 13, color: HexColor.fromHex(model?.listStyle?.searchCss?.textColor??"#FFFFFF")))
],
),
),
)),
SizedBox(width: 10),
// 图标2
GestureDetector(
onTap: () => _onClickListener(context, model?.listStyle?.rightCss),
child: CachedNetworkImage(
width: 30,
height: 30,
imageUrl: model?.listStyle?.rightCss?.image ?? '',
)),
],
);
}

/// 右按钮
Widget _buildStyle4Widget(BuildContext context) {
return GestureDetector(
onTap: () => _onClickListener(context, model?.listStyle?.rightBtnCss),
child: Container(
height: 38,
padding: EdgeInsets.only(left: 10.5),
decoration: BoxDecoration(
border: Border.all(color: HexColor.fromHex(model?.listStyle?.searchCss?.borderColor ?? "")),
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(ParseUtil.stringParseDouble(model?.bottomRightRadius)),
bottomLeft: Radius.circular(ParseUtil.stringParseDouble(model?.bottomLeftRadius)),
topLeft: Radius.circular(ParseUtil.stringParseDouble(model?.topLeftRadius)),
topRight: Radius.circular(ParseUtil.stringParseDouble(model?.topRightRadius)),
)),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
///搜索图标
CachedNetworkImage(
imageUrl: model?.listStyle?.searchCss?.image ?? '',
width: 16,
fit: BoxFit.fitWidth,
),
SizedBox(
width: 4,
),
Expanded(
child: TextField(
style: TextStyle(fontSize: 13),
decoration: InputDecoration(
isDense: true,
enabled: false,
border: InputBorder.none,
hintText: model?.listStyle?.searchCss?.text ?? "",
hintStyle: TextStyle(color: HexColor.fromHex(model?.listStyle?.searchCss?.textColor ?? ""))),
),
),
Container(
padding: EdgeInsets.only(left: 16, right: 16),
decoration: BoxDecoration(
image: DecorationImage(image: CachedNetworkImageProvider(model?.listStyle?.rightBtnCss?.bgImg ?? ""), fit: BoxFit.fitHeight),
borderRadius: BorderRadius.circular(2)),
height: double.infinity,
child: Center(
child: Text(
model?.listStyle?.rightBtnCss?.text ?? "",
style: TextStyle(color: HexColor.fromHex(model?.listStyle?.rightBtnCss?.textColor ?? "#FFFFFF"), fontWeight: FontWeight.w500, fontSize: 13),
)),
)
],
),
),
);
}

/// 右1图标
Widget _buildStyle1Widget(BuildContext context) {
return Row(
@@ -78,8 +191,8 @@ class CustomSearchWidget extends StatelessWidget {
child: Row(
children: <Widget>[
CachedNetworkImage(
width: 13,
height: 13,
width: 15,
height: 15,
imageUrl: model?.listStyle?.searchCss?.image ?? '',
),
SizedBox(width: 4),


+ 81
- 10
lib/widgets/custom/search/model/custom_search_model.dart Просмотреть файл

@@ -83,12 +83,16 @@ class CustomSearchModel {
class ListStyle {
SearchCss searchCss;
RightCss rightCss;
RightCss leftCss;
RightBtnCss rightBtnCss;

ListStyle({this.searchCss, this.rightCss});
ListStyle({this.searchCss, this.rightCss, this.leftCss, this.rightBtnCss});

ListStyle.fromJson(Map<String, dynamic> json) {
searchCss = json['search_css'] != null ? new SearchCss.fromJson(json['search_css']) : null;
rightCss = json['right_css'] != null ? new RightCss.fromJson(json['right_css']) : null;
leftCss = json['left_css'] != null ? new RightCss.fromJson(json['left_css']) : null;
rightBtnCss = json['right_btn_css'] != null ? new RightBtnCss.fromJson(json['right_btn_css']) : null;
}

Map<String, dynamic> toJson() {
@@ -99,6 +103,12 @@ class ListStyle {
if (this.rightCss != null) {
data['right_css'] = this.rightCss.toJson();
}
if (this.leftCss != null) {
data['left_css'] = this.leftCss.toJson();
}
if (this.rightBtnCss != null) {
data['right_btn_css'] = this.rightBtnCss.toJson();
}
return data;
}
}
@@ -112,19 +122,21 @@ class SearchCss extends SkipModel {
String requiredLogin;
String requiredTaobaoAuth;
String skipIdentifier;
String borderColor;

SearchCss({this.name, this.text, this.image, this.bgColor, this.textColor, this.requiredLogin, this.requiredTaobaoAuth, this.skipIdentifier});
SearchCss({this.name, this.text, this.image, this.bgColor, this.textColor, this.requiredLogin, this.requiredTaobaoAuth, this.skipIdentifier, this.borderColor});

SearchCss.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
name = json['name'];
text = json['text'];
image = json['image'];
bgColor = json['bg_color'];
textColor = json['text_color'];
requiredLogin = json['required_login'];
requiredTaobaoAuth = json['required_taobao_auth'];
skipIdentifier = json['skip_identifier'];
name = json['name']?.toString();
text = json['text']?.toString();
image = json['image']?.toString();
bgColor = json['bg_color']?.toString();
textColor = json['text_color']?.toString();
requiredLogin = json['required_login']?.toString();
requiredTaobaoAuth = json['required_taobao_auth']?.toString();
skipIdentifier = json['skip_identifier']?.toString();
borderColor = json['border_color']?.toString();
}

Map<String, dynamic> toJson() {
@@ -137,6 +149,7 @@ class SearchCss extends SkipModel {
data['required_login'] = this.requiredLogin;
data['required_taobao_auth'] = this.requiredTaobaoAuth;
data['skip_identifier'] = this.skipIdentifier;
data['border_color'] = this.borderColor;
return data;
}
}
@@ -175,3 +188,61 @@ class RightCss extends SkipModel {
return data;
}
}

class RightBtnCss extends SkipModel {
String name;
String text;
String textColor;
String bgImg;
String bgImgUrl;
String skipIdentifier;
String skipName;
String requiredLogin;
String requiredTaobaoAuth;
String isJump;
String cateTag;

RightBtnCss(
{this.name,
this.text,
this.textColor,
this.bgImg,
this.bgImgUrl,
this.skipIdentifier,
this.skipName,
this.requiredLogin,
this.requiredTaobaoAuth,
this.isJump,
this.cateTag});

RightBtnCss.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
name = json['name'];
text = json['text'];
textColor = json['text_color'];
bgImg = json['bg_img'];
bgImgUrl = json['bg_img_url'];
skipIdentifier = json['skip_identifier'];
skipName = json['skip_name'];
requiredLogin = json['required_login'];
requiredTaobaoAuth = json['required_taobao_auth'];
isJump = json['is_jump'];
cateTag = json['cate_tag'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = super.toJson();
data['name'] = this.name;
data['text'] = this.text;
data['text_color'] = this.textColor;
data['bg_img'] = this.bgImg;
data['bg_img_url'] = this.bgImgUrl;
data['skip_identifier'] = this.skipIdentifier;
data['skip_name'] = this.skipName;
data['required_login'] = this.requiredLogin;
data['required_taobao_auth'] = this.requiredTaobaoAuth;
data['is_jump'] = this.isJump;
data['cate_tag'] = this.cateTag;
return data;
}
}

+ 39
- 0
lib/widgets/custom/share_content/bloc/custom_share_content_bloc.dart Просмотреть файл

@@ -0,0 +1,39 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:meta/meta.dart';
import 'package:zhiying_base_widget/widgets/custom/share_content/model/custom_share_content_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'custom_share_content_repository.dart';
part 'custom_share_content_event.dart';
part 'custom_share_content_state.dart';

class CustomShareContentBloc extends Bloc<CustomShareContentEvent, CustomShareContentState> {
CustomShareContentBloc({this.repository}) : super(CustomShareContentInitial());
CustomShareContentRepository repository;

@override
Stream<CustomShareContentState> mapEventToState(
CustomShareContentEvent event,
) async* {
/// 初始化
if (event is CustomShareContentInitEvent) {
yield* _mapInitEventToState(event);
}
}

/// 初始化事件
Stream<CustomShareContentState> _mapInitEventToState(CustomShareContentInitEvent event) async* {
var parentData = await repository.fetchParentStyle(event.model);
if (!EmptyUtil.isEmpty(parentData)) {
yield CustomShareContentLoadedState(model: parentData);
var netData = await repository.fetchNetData(event.model);
if (!EmptyUtil.isEmpty(netData)) {
parentData..text = netData?.toString();
yield CustomShareContentLoadedState(model: parentData);
}
} else {
yield CustomShareContentErrorState();
}
}
}

+ 10
- 0
lib/widgets/custom/share_content/bloc/custom_share_content_event.dart Просмотреть файл

@@ -0,0 +1,10 @@
part of 'custom_share_content_bloc.dart';

@immutable
abstract class CustomShareContentEvent {}

/// 初始化事件
class CustomShareContentInitEvent extends CustomShareContentEvent {
final Map<String, dynamic> model;
CustomShareContentInitEvent({this.model});
}

+ 42
- 0
lib/widgets/custom/share_content/bloc/custom_share_content_repository.dart Просмотреть файл

@@ -0,0 +1,42 @@

import 'dart:convert';
import 'package:zhiying_base_widget/widgets/custom/share_content/model/custom_share_content_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class CustomShareContentRepository {

///
/// 获取缓存的数据
///
Future<CustomShareContentModel> fetchParentStyle(Map<String, dynamic> model) async {
try {
if (!EmptyUtil.isEmpty(model)) {
return CustomShareContentModel.fromJson(jsonDecode(model['data']));
}
} catch (e, s) {
Logger.error(e, s);
}
return null;
}

///
/// 获取网络的数据
///
Future<String> fetchNetData(Map<String, dynamic> model) async {
try {
if (!EmptyUtil.isEmpty(model)) {
var result = await NetUtil.post('/api/v1/third_party/content/${model['mod_id']?.toString()}', method: NetMethod.GET );
if (NetUtil.isSuccess(result) && !EmptyUtil.isEmpty(result[GlobalConfig.HTTP_RESPONSE_KEY_DATA])) {
var data = result[GlobalConfig.HTTP_RESPONSE_KEY_DATA]['content'];
if (!EmptyUtil.isEmpty(data)) {
return data;
}
}
}
} catch (e, s) {
Logger.error(e, s);
}
return null;
}

}

+ 16
- 0
lib/widgets/custom/share_content/bloc/custom_share_content_state.dart Просмотреть файл

@@ -0,0 +1,16 @@
part of 'custom_share_content_bloc.dart';

@immutable
abstract class CustomShareContentState {}

/// 初始化
class CustomShareContentInitial extends CustomShareContentState {}

/// 数据加载成功
class CustomShareContentLoadedState extends CustomShareContentState {
CustomShareContentModel model;
CustomShareContentLoadedState({this.model});
}

/// 数据加载失败
class CustomShareContentErrorState extends CustomShareContentState {}

+ 139
- 0
lib/widgets/custom/share_content/model/custom_share_content_model.dart Просмотреть файл

@@ -0,0 +1,139 @@
import 'package:zhiying_comm/zhiying_comm.dart';

class CustomShareContentModel extends SkipModel{
String name;
String desc;
String text;
String moduleType;
String moduleKey;
String isTopMargin;
String isLeftRightMargin;
String isShow;
String topMargin;
String leftRightMargin;
String topLeftRadius;
String topRightRadius;
String bottomLeftRadius;
String bottomRightRadius;
String bgColor;
String isShowShareFriend;
String bgImage;
String bgImageUrl;
String titleImage;
String titleImageUrl;
String copyImage;
String copyImageUrl;
String copyLongImage;
String copyLongImageUrl;
String shareImage;
String shareImageUrl;
String textColor;
String skipName;
String cateTag;

CustomShareContentModel(
{this.name,
this.desc,
this.text,
this.moduleType,
this.moduleKey,
this.isTopMargin,
this.isLeftRightMargin,
this.isShow,
this.topMargin,
this.leftRightMargin,
this.topLeftRadius,
this.topRightRadius,
this.bottomLeftRadius,
this.bottomRightRadius,
this.bgColor,
this.isShowShareFriend,
this.bgImage,
this.bgImageUrl,
this.titleImage,
this.titleImageUrl,
this.copyImage,
this.copyImageUrl,
this.copyLongImage,
this.copyLongImageUrl,
this.shareImage,
this.shareImageUrl,
this.textColor,
this.skipName,
this.cateTag});

CustomShareContentModel.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
name = json['name'];
desc = json['desc'];
text = json['text'];
moduleType = json['module_type'];
moduleKey = json['module_key'];
isTopMargin = json['is_top_margin'];
isLeftRightMargin = json['is_left_right_margin'];
isShow = json['is_show'];
topMargin = json['top_margin'];
leftRightMargin = json['left_right_margin'];
topLeftRadius = json['top_left_radius'];
topRightRadius = json['top_right_radius'];
bottomLeftRadius = json['bottom_left_radius'];
bottomRightRadius = json['bottom_right_radius'];
bgColor = json['bg_color'];
isShowShareFriend = json['is_show_share_friend'];
bgImage = json['bg_image'];
bgImageUrl = json['bg_image_url'];
titleImage = json['title_image'];
titleImageUrl = json['title_image_url'];
copyImage = json['copy_image'];
copyImageUrl = json['copy_image_url'];
copyLongImage = json['copy_long_image'];
copyLongImageUrl = json['copy_long_image_url'];
shareImage = json['share_image'];
shareImageUrl = json['share_image_url'];
textColor = json['text_color'];
skipIdentifier = json['skip_identifier'];
skipName = json['skip_name'];
requiredLogin = json['required_login'];
requiredTaobaoAuth = json['required_taobao_auth'];
isJump = json['is_jump'];
cateTag = json['cate_tag'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = super.toJson();
data['name'] = this.name;
data['desc'] = this.desc;
data['text'] = this.text;
data['module_type'] = this.moduleType;
data['module_key'] = this.moduleKey;
data['is_top_margin'] = this.isTopMargin;
data['is_left_right_margin'] = this.isLeftRightMargin;
data['is_show'] = this.isShow;
data['top_margin'] = this.topMargin;
data['left_right_margin'] = this.leftRightMargin;
data['top_left_radius'] = this.topLeftRadius;
data['top_right_radius'] = this.topRightRadius;
data['bottom_left_radius'] = this.bottomLeftRadius;
data['bottom_right_radius'] = this.bottomRightRadius;
data['bg_color'] = this.bgColor;
data['is_show_share_friend'] = this.isShowShareFriend;
data['bg_image'] = this.bgImage;
data['bg_image_url'] = this.bgImageUrl;
data['title_image'] = this.titleImage;
data['title_image_url'] = this.titleImageUrl;
data['copy_image'] = this.copyImage;
data['copy_image_url'] = this.copyImageUrl;
data['copy_long_image'] = this.copyLongImage;
data['copy_long_image_url'] = this.copyLongImageUrl;
data['share_image'] = this.shareImage;
data['share_image_url'] = this.shareImageUrl;
data['text_color'] = this.textColor;
data['skip_identifier'] = this.skipIdentifier;
data['skip_name'] = this.skipName;
data['required_login'] = this.requiredLogin;
data['required_taobao_auth'] = this.requiredTaobaoAuth;
data['is_jump'] = this.isJump;
data['cate_tag'] = this.cateTag;
return data;
}
}

+ 22
- 0
lib/widgets/custom/share_content/share_content_creater.dart Просмотреть файл

@@ -0,0 +1,22 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/custom/share_content/share_content_sk.dart';
import 'package:zhiying_base_widget/widgets/custom/share_content/share_content_widget.dart';
import 'package:zhiying_comm/zhiying_comm.dart';


///
/// 可以滚动Banner
///
class CustomShareContentCreater extends WidgetCreater {
@override
List<Widget> createSkeleton(Map<String, dynamic> model) {
return [CustomShareContentSkeleton()];
}

@override
List<Widget> createWidgets(Map<String, dynamic> model) {
return [
CustomShareContentWidget(model),
];
}
}

+ 8
- 0
lib/widgets/custom/share_content/share_content_sk.dart Просмотреть файл

@@ -0,0 +1,8 @@
import 'package:flutter/material.dart';

class CustomShareContentSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 142
- 0
lib/widgets/custom/share_content/share_content_widget.dart Просмотреть файл

@@ -0,0 +1,142 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:zhiying_base_widget/widgets/custom/share_content/model/custom_share_content_model.dart';
import 'package:zhiying_base_widget/widgets/custom/share_content/share_content_sk.dart';
import 'package:zhiying_base_widget/widgets/share/models/share_alert_model.dart';
import 'package:zhiying_base_widget/widgets/share/models/share_data_model.dart';
import 'package:zhiying_base_widget/widgets/share/share_alert.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'bloc/custom_share_content_bloc.dart';
import 'bloc/custom_share_content_repository.dart';
import 'package:flutter/cupertino.dart';

///
/// 分享内容组件
///
class CustomShareContentWidget extends StatelessWidget {

final Map<String, dynamic> model;

const CustomShareContentWidget(this.model, {Key key}) : super(key: key);

@override
Widget build(BuildContext context) {
return BlocProvider(
create: (_) => CustomShareContentBloc(repository: CustomShareContentRepository())..add(CustomShareContentInitEvent(model: model)),
child: _CustomShareContentContainerWidget(),
);
}
}

class _CustomShareContentContainerWidget extends StatefulWidget {
@override
_CustomShareContentContainerWidgetState createState() => _CustomShareContentContainerWidgetState();
}

class _CustomShareContentContainerWidgetState extends State<_CustomShareContentContainerWidget> {

/// 分享方法
void _clickShareButton(val) {
showCupertinoModalPopup(
context: context,
builder: (context) => ShareAlert(ShareDataModel(content: val), 'pub.flutter.share_icon', isContentShow: false),
);
}

/// 复制方法
void _clickCopyButton(String val) {
if (!EmptyUtil.isEmpty(val)) {
Clipboard.setData(ClipboardData(text: val));
Fluttertoast.showToast(msg: '复制成功');
}
}

@override
Widget build(BuildContext context) {
return BlocConsumer<CustomShareContentBloc, CustomShareContentState>(
listener: (prev, next) {},
buildWhen: (context, state) {
return true;
},
builder: (context, state) {
Logger.log('商品详情刷新了 builder state = ' + state?.toString());
/// 数据加载完毕
if (state is CustomShareContentLoadedState) {
return _getMainWidget(state?.model);
}

/// 异常
if (state is CustomShareContentErrorState) {
return _errorWidget();
}
/// 骨架图
return _getSkeletonWidget();
},
);
}

/// 主视图
Widget _getMainWidget(CustomShareContentModel model) {
return Container(
width: double.infinity,
// height: 98,
margin: EdgeInsets.only(top: ParseUtil.stringParseDouble(model?.topMargin), left: ParseUtil.stringParseDouble(model?.leftRightMargin, defVal: 12.5), right: ParseUtil.stringParseDouble(model?.leftRightMargin, defVal: 12.5)),
decoration: BoxDecoration(
// color: Colors.red,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(ParseUtil.stringParseDouble(model?.bottomLeftRadius)),
bottomRight: Radius.circular(ParseUtil.stringParseDouble(model?.bottomRightRadius)),
topLeft: Radius.circular(ParseUtil.stringParseDouble(model?.topLeftRadius)),
topRight: Radius.circular(ParseUtil.stringParseDouble(model?.topRightRadius)),
)),
child: Container(
padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 14),
height: 200,
width: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
image: CachedNetworkImageProvider(model?.bgImageUrl ?? '')
)
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// 标题
CachedNetworkImage(imageUrl: model?.titleImageUrl, width: 90,),
// SizedBox(height: 20),
// 文案
Text(model?.text?? '', style: TextStyle(color: HexColor.fromHex(model?.textColor), fontSize: 15),),
// SizedBox(height: 22),
// 复制按钮 or 分享 按钮
Visibility(
visible: (model?.isShowShareFriend ?? '0') == '1',
// 仅仅复制按钮
replacement: GestureDetector( onTap: () => _clickCopyButton(model?.text) ,child: CachedNetworkImage(imageUrl: model?.copyLongImageUrl ?? '', width: double.infinity)),
child: Row(
children: [
// 复制按钮
Flexible(flex: 1, child: GestureDetector(onTap: () => _clickCopyButton(model?.text),child: CachedNetworkImage(imageUrl: model?.copyImageUrl, width: double.infinity,))),
SizedBox(width: 20),
// 分享按钮
Flexible(flex: 1,child: GestureDetector(onTap: ()=> _clickShareButton(model?.text), child: CachedNetworkImage(imageUrl: model?.shareImageUrl, width: double.infinity,)))
],
))
],
),
)
);
}

/// 骨架图
Widget _getSkeletonWidget() {
return CustomShareContentSkeleton();
}

/// 无数据视图 or 异常
Widget _errorWidget() {
return Container();
}

}


+ 3
- 0
lib/widgets/goods_details/appbar/goods_details_appbar_widget.dart Просмотреть файл

@@ -14,6 +14,7 @@ class GoodsDetailsAppBarWidget extends StatefulWidget {
GoodsDetailsAppBarWidget(this.data, {Key key}) : super(key: key){
try{
model = GoodsDetailsAppBarModel.fromJson(jsonDecode(data['data']));
Logger.log('商品详情页面数据 = ${model.toJson()}');
}catch(e, s){
Logger.error(e, s);
}
@@ -54,6 +55,8 @@ class _GoodsDetailsAppBarWidgetState extends State<GoodsDetailsAppBarWidget> {

@override
Widget build(BuildContext context) {
_endTextColor = HexColor.fromHex(widget?.model?.appBarNameColor ?? '#FFFFFF' );
_endBgColor = HexColor.fromHex(widget?.model?.appBarBgColor ?? '#FF4242');
// Logger.log('^-^');
return Container(
width: double.infinity,


+ 1
- 1
lib/widgets/home/home_goods/models/home_goods_list_style_model.dart Просмотреть файл

@@ -33,7 +33,7 @@ class HomeGoodsListStyleModel {
});

HomeGoodsListStyleModel.fromJson(Map<String, dynamic> json) {
hotRankIconList = json['hot_rank_icon_list']. cast<String>();
hotRankIconList = json['hot_rank_icon_list'].cast<String>();
topMargin = json['top_margin'];
listColumn = json['list_column'];
leftRighMargin = json['left_righ_margin'];


+ 4
- 4
lib/widgets/mine/mine_data/mine_data_widget.dart Просмотреть файл

@@ -127,7 +127,7 @@ class _MineDataWidgetState extends State<MineDataWidget> {
),
),
Text(
widget?.profile?.gridViews[0]?.value ?? "¥0",
EmptyUtil.isEmpty(widget?.profile?.gridViews) ? '¥0' : widget?.profile?.gridViews[0]?.value ?? "¥0",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w800,
@@ -158,8 +158,8 @@ class _MineDataWidgetState extends State<MineDataWidget> {
),
Center(
child: Text(
_style.cashBtn.btnText,
style: TextStyle(fontSize: 12, color: HexColor.fromHex(_style.cashBtn.btnTextColor)),
_style?.cashBtn?.btnText ?? '',
style: TextStyle(fontSize: 12, color: HexColor.fromHex(_style?.cashBtn?.btnTextColor)),
),
)
],
@@ -167,7 +167,7 @@ class _MineDataWidgetState extends State<MineDataWidget> {
),
behavior: HitTestBehavior.opaque,
onTap: () {
RouterUtil.route(_style.cashBtn, _style.cashBtn.toJson(), context);
RouterUtil.route(_style?.cashBtn, _style?.cashBtn?.toJson(), context);
},
)
],


+ 4
- 0
lib/widgets/mine/mine_header/mine_header_bloc.dart Просмотреть файл

@@ -26,9 +26,13 @@ class MineHeaderBloc extends BlocBase {
Logger.log("我的数据:"+ json.encode(data));
_profile = MineProfileModel.fromJson(Map<String, dynamic>.from(data));
_profileController.add(_profile);
///信用卡初始化
///只有在用户数据被加载时调用
Application.doStringMethod("initCreditCard");
}, onError: (err) {
_profile = MineProfileModel();
_profileController.add(_profile);
});

}
}

+ 7
- 5
lib/widgets/restart_widget/restart_widget.dart Просмотреть файл

@@ -68,11 +68,12 @@ class _RestartWidgetState extends State<RestartWidget> {

@override
Widget build(BuildContext context) {
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
if (!inProduction) {
///debug阶段可重启
isFirst=true;
}
// const bool inProduction = const bool.fromEnvironment("dart.vm.product");
// if (!inProduction) {
// ///debug阶段可重启
// isFirst=true;
// }
isFirst = true;
return StreamBuilder(stream: outData,builder: (context,asyn){
if(asyn.data==null&&!isFirst){
return Scaffold(
@@ -82,6 +83,7 @@ class _RestartWidgetState extends State<RestartWidget> {
isFirst=false;
return widget?.child;
}
// return widget?.child;
});

}


+ 2
- 2
lib/widgets/share/share_alert.dart Просмотреть файл

@@ -278,9 +278,9 @@ class _ShareAlertContentState extends State<_ShareAlertContent> {
} else {
var type = SSDKContentTypes.auto;

if (widget?.model?.image?.length != 0 && widget.model?.url != null) {
if ((widget?.model?.image?.length ?? 0) != 0 && widget.model?.url != null) {
type = SSDKContentTypes.webpage;
} else if (widget?.model?.image?.length != 0) {
} else if ((widget?.model?.image?.length ?? 0) != 0) {
type = SSDKContentTypes.image;
} else if (widget?.model?.title != null || widget.model?.content != null) {
type = SSDKContentTypes.text;


+ 3
- 3
pubspec.yaml Просмотреть файл

@@ -24,7 +24,7 @@ dependencies:
ref: '0.0.1'
image_picker: ^0.6.7+3
tab_indicator_styler: 1.0.0
connectivity: ^0.4.9+3
image_cropper:
git:
url: 'http://192.168.0.138:3000/FnuoOS_Flutter_Components/Image_Cropper.git'
@@ -60,8 +60,8 @@ dependencies:
permission_handler_platform_interface: "2.0.1"

flutter_user_agent: ^1.2.2
# 特效底部
# convex_bottom_bar: ^2.7.1+2

dev_dependencies:
flutter_test:


Загрузка…
Отмена
Сохранить