datangyun 11 mēneši atpakaļ
vecāks
revīzija
f061b0b078
100 mainītis faili ar 10665 papildinājumiem un 0 dzēšanām
  1. 25 0
      ysairplane/.flutter-plugins 2
  2. 0 0
      ysairplane/.flutter-plugins-dependencies 2
  3. 43 0
      ysairplane/.gitignore
  4. 10 0
      ysairplane/.metadata
  5. 1 0
      ysairplane/ios/Flutter/.last_build_id
  6. 14 0
      ysairplane/ios/Flutter/Generated 2.xcconfig
  7. 14 0
      ysairplane/ios/Flutter/Generated 3.xcconfig
  8. 14 0
      ysairplane/ios/Flutter/Generated 4.xcconfig
  9. 15 0
      ysairplane/ios/Flutter/flutter_export_environment 2.sh
  10. 15 0
      ysairplane/ios/Flutter/flutter_export_environment 3.sh
  11. 15 0
      ysairplane/ios/Flutter/flutter_export_environment 4.sh
  12. 15 0
      ysairplane/ios/Flutter/flutter_export_environment 5.sh
  13. 193 0
      ysairplane/ios/Podfile.lock
  14. 75 0
      ysairplane/lib/tools/YSFutureNetWork.dart
  15. 43 0
      ysairplane1/.gitignore
  16. 10 0
      ysairplane1/.metadata
  17. 16 0
      ysairplane1/README.md
  18. 7 0
      ysairplane1/android/.gitignore
  19. 83 0
      ysairplane1/android/app/build.gradle
  20. 19 0
      ysairplane1/android/app/src/debug/AndroidManifest.xml
  21. 48 0
      ysairplane1/android/app/src/main/AndroidManifest.xml
  22. 7 0
      ysairplane1/android/app/src/main/kotlin/yscom/example/ysairplane/MainActivity.kt
  23. 12 0
      ysairplane1/android/app/src/main/res/drawable/launch_background.xml
  24. BIN
      ysairplane1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  25. BIN
      ysairplane1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  26. BIN
      ysairplane1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  27. BIN
      ysairplane1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  28. BIN
      ysairplane1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  29. 18 0
      ysairplane1/android/app/src/main/res/values/styles.xml
  30. 19 0
      ysairplane1/android/app/src/profile/AndroidManifest.xml
  31. 31 0
      ysairplane1/android/build.gradle
  32. 4 0
      ysairplane1/android/gradle.properties
  33. 6 0
      ysairplane1/android/gradle/wrapper/gradle-wrapper.properties
  34. 7 0
      ysairplane1/android/key.properties
  35. 15 0
      ysairplane1/android/settings.gradle
  36. 32 0
      ysairplane1/ios/.gitignore
  37. 26 0
      ysairplane1/ios/Flutter/AppFrameworkInfo.plist
  38. 2 0
      ysairplane1/ios/Flutter/Debug.xcconfig
  39. 2 0
      ysairplane1/ios/Flutter/Release.xcconfig
  40. 84 0
      ysairplane1/ios/Podfile
  41. 506 0
      ysairplane1/ios/Runner.xcodeproj/project.pbxproj
  42. 7 0
      ysairplane1/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  43. 8 0
      ysairplane1/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  44. 8 0
      ysairplane1/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  45. 91 0
      ysairplane1/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  46. 7 0
      ysairplane1/ios/Runner.xcworkspace/contents.xcworkspacedata
  47. 8 0
      ysairplane1/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  48. 8 0
      ysairplane1/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  49. 13 0
      ysairplane1/ios/Runner/AppDelegate.swift
  50. 122 0
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  51. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  52. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  53. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  54. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  55. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  56. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  57. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  58. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  59. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  60. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  61. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  62. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  63. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  64. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  65. BIN
      ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  66. 23 0
      ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  67. BIN
      ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  68. BIN
      ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  69. BIN
      ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  70. 5 0
      ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  71. 37 0
      ysairplane1/ios/Runner/Base.lproj/LaunchScreen.storyboard
  72. 26 0
      ysairplane1/ios/Runner/Base.lproj/Main.storyboard
  73. 45 0
      ysairplane1/ios/Runner/Info.plist
  74. 1 0
      ysairplane1/ios/Runner/Runner-Bridging-Header.h
  75. 43 0
      ysairplane1/lib/base/YSBase.dart
  76. 310 0
      ysairplane1/lib/code/YSAddSquare.dart
  77. 440 0
      ysairplane1/lib/code/YSAuthorSquare.dart
  78. 122 0
      ysairplane1/lib/code/YSBill.dart
  79. 196 0
      ysairplane1/lib/code/YSBind.dart
  80. 412 0
      ysairplane1/lib/code/YSChangePayPass.dart
  81. 78 0
      ysairplane1/lib/code/YSChooseLocation.dart
  82. 99 0
      ysairplane1/lib/code/YSChoosePlane.dart
  83. 361 0
      ysairplane1/lib/code/YSCity.dart
  84. 475 0
      ysairplane1/lib/code/YSCodeLogin.dart
  85. 68 0
      ysairplane1/lib/code/YSCollection.dart
  86. 238 0
      ysairplane1/lib/code/YSComment.dart
  87. 268 0
      ysairplane1/lib/code/YSCommnetAdd.dart
  88. 109 0
      ysairplane1/lib/code/YSContact.dart
  89. 997 0
      ysairplane1/lib/code/YSContractPlane.dart
  90. 1082 0
      ysairplane1/lib/code/YSContractPlaneDetail.dart
  91. 203 0
      ysairplane1/lib/code/YSCourse.dart
  92. 648 0
      ysairplane1/lib/code/YSCourseDetail.dart
  93. 880 0
      ysairplane1/lib/code/YSDoctorPlane.dart
  94. 72 0
      ysairplane1/lib/code/YSFeedback.dart
  95. 566 0
      ysairplane1/lib/code/YSHelpPlane.dart
  96. 666 0
      ysairplane1/lib/code/YSHome.dart
  97. 111 0
      ysairplane1/lib/code/YSHomeMsg.dart
  98. 42 0
      ysairplane1/lib/code/YSHomeMsgDetail.dart
  99. 50 0
      ysairplane1/lib/code/YSHomeMsgSetting.dart
  100. 274 0
      ysairplane1/lib/code/YSInputPayPass.dart

+ 25 - 0
ysairplane/.flutter-plugins 2

@@ -0,0 +1,25 @@
+# This is a generated file; do not edit or check into version control.
+flutter_alipay=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_alipay-1.0.0/
+flutter_plugin_android_lifecycle=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.11/
+fluwx=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluwx-2.4.0/
+image_picker=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+11/
+jpush_flutter=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/jpush_flutter-0.5.9/
+path_provider=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.18/
+path_provider_linux=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2/
+path_provider_macos=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+4/
+path_provider_windows=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+1/
+shared_preferences=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12/
+shared_preferences_linux=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+2/
+shared_preferences_macos=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10/
+shared_preferences_web=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7/
+shared_preferences_windows=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+1/
+sqflite=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+2/
+sy_flutter_qiniu_storage=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sy_flutter_qiniu_storage-0.2.1/
+url_launcher=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.2/
+url_launcher_linux=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+1/
+url_launcher_macos=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+8/
+url_launcher_web=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.4+1/
+url_launcher_windows=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+1/
+video_player=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player-0.10.12+4/
+video_player_web=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player_web-0.1.3+2/
+webview_flutter=/Users/datangyun/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.24/

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
ysairplane/.flutter-plugins-dependencies 2


+ 43 - 0
ysairplane/.gitignore

@@ -0,0 +1,43 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Exceptions to above rules.
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

+ 10 - 0
ysairplane/.metadata

@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+  revision: 981afe39ae3de8d779466aca0d8af752b7323538
+  channel: master
+
+project_type: app

+ 1 - 0
ysairplane/ios/Flutter/.last_build_id

@@ -0,0 +1 @@
+211a581b64a3cdd22dcd903ca2a73048

+ 14 - 0
ysairplane/ios/Flutter/Generated 2.xcconfig

@@ -0,0 +1,14 @@
+// This is a generated file; do not edit or check into version control.
+FLUTTER_ROOT=/Users/datangyun/Downloads/flutter
+FLUTTER_APPLICATION_PATH=/Users/datangyun/Desktop/ys/flutter/airplane/ysairplane
+FLUTTER_TARGET=lib/main.dart
+FLUTTER_BUILD_DIR=build
+SYMROOT=${SOURCE_ROOT}/../build/ios
+OTHER_LDFLAGS=$(inherited) -framework Flutter
+FLUTTER_FRAMEWORK_DIR=/Users/datangyun/Downloads/flutter/bin/cache/artifacts/engine/ios
+FLUTTER_BUILD_NAME=1.0.0
+FLUTTER_BUILD_NUMBER=1
+DART_OBFUSCATION=false
+TRACK_WIDGET_CREATION=false
+TREE_SHAKE_ICONS=false
+PACKAGE_CONFIG=.packages

+ 14 - 0
ysairplane/ios/Flutter/Generated 3.xcconfig

@@ -0,0 +1,14 @@
+// This is a generated file; do not edit or check into version control.
+FLUTTER_ROOT=/Users/datangyun/Downloads/flutter
+FLUTTER_APPLICATION_PATH=/Users/datangyun/Desktop/ys/flutter/airplane/ysairplane
+FLUTTER_TARGET=lib/main.dart
+FLUTTER_BUILD_DIR=build
+SYMROOT=${SOURCE_ROOT}/../build/ios
+OTHER_LDFLAGS=$(inherited) -framework Flutter
+FLUTTER_FRAMEWORK_DIR=/Users/datangyun/Downloads/flutter/bin/cache/artifacts/engine/ios
+FLUTTER_BUILD_NAME=1.0.0
+FLUTTER_BUILD_NUMBER=1
+DART_OBFUSCATION=false
+TRACK_WIDGET_CREATION=false
+TREE_SHAKE_ICONS=false
+PACKAGE_CONFIG=.packages

+ 14 - 0
ysairplane/ios/Flutter/Generated 4.xcconfig

@@ -0,0 +1,14 @@
+// This is a generated file; do not edit or check into version control.
+FLUTTER_ROOT=/Users/datangyun/Downloads/flutter
+FLUTTER_APPLICATION_PATH=/Users/datangyun/Desktop/ys/flutter/airplane/ysairplane
+FLUTTER_TARGET=lib/main.dart
+FLUTTER_BUILD_DIR=build
+SYMROOT=${SOURCE_ROOT}/../build/ios
+OTHER_LDFLAGS=$(inherited) -framework Flutter
+FLUTTER_FRAMEWORK_DIR=/Users/datangyun/Downloads/flutter/bin/cache/artifacts/engine/ios
+FLUTTER_BUILD_NAME=1.0.0
+FLUTTER_BUILD_NUMBER=1
+DART_OBFUSCATION=false
+TRACK_WIDGET_CREATION=false
+TREE_SHAKE_ICONS=false
+PACKAGE_CONFIG=.packages

+ 15 - 0
ysairplane/ios/Flutter/flutter_export_environment 2.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=/Users/datangyun/Downloads/flutter"
+export "FLUTTER_APPLICATION_PATH=/Users/datangyun/Desktop/ys/flutter/airplane/ysairplane"
+export "FLUTTER_TARGET=lib/main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "SYMROOT=${SOURCE_ROOT}/../build/ios"
+export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
+export "FLUTTER_FRAMEWORK_DIR=/Users/datangyun/Downloads/flutter/bin/cache/artifacts/engine/ios"
+export "FLUTTER_BUILD_NAME=1.0.0"
+export "FLUTTER_BUILD_NUMBER=1"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"

+ 15 - 0
ysairplane/ios/Flutter/flutter_export_environment 3.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=/Users/datangyun/Downloads/flutter"
+export "FLUTTER_APPLICATION_PATH=/Users/datangyun/Desktop/ys/flutter/airplane/ysairplane"
+export "FLUTTER_TARGET=lib/main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "SYMROOT=${SOURCE_ROOT}/../build/ios"
+export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
+export "FLUTTER_FRAMEWORK_DIR=/Users/datangyun/Downloads/flutter/bin/cache/artifacts/engine/ios"
+export "FLUTTER_BUILD_NAME=1.0.0"
+export "FLUTTER_BUILD_NUMBER=1"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"

+ 15 - 0
ysairplane/ios/Flutter/flutter_export_environment 4.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=/Users/datangyun/Downloads/flutter"
+export "FLUTTER_APPLICATION_PATH=/Users/datangyun/Desktop/ys/flutter/airplane/ysairplane"
+export "FLUTTER_TARGET=lib/main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "SYMROOT=${SOURCE_ROOT}/../build/ios"
+export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
+export "FLUTTER_FRAMEWORK_DIR=/Users/datangyun/Downloads/flutter/bin/cache/artifacts/engine/ios"
+export "FLUTTER_BUILD_NAME=1.0.0"
+export "FLUTTER_BUILD_NUMBER=1"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"

+ 15 - 0
ysairplane/ios/Flutter/flutter_export_environment 5.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=/Users/datangyun/Downloads/flutter"
+export "FLUTTER_APPLICATION_PATH=/Users/datangyun/Desktop/ys/flutter/airplane/ysairplane"
+export "FLUTTER_TARGET=lib/main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "SYMROOT=${SOURCE_ROOT}/../build/ios"
+export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
+export "FLUTTER_FRAMEWORK_DIR=/Users/datangyun/Downloads/flutter/bin/cache/artifacts/engine/ios"
+export "FLUTTER_BUILD_NAME=1.0.0"
+export "FLUTTER_BUILD_NUMBER=1"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"

+ 193 - 0
ysairplane/ios/Podfile.lock

@@ -0,0 +1,193 @@
+PODS:
+  - AlipaySDK-iOS (15.7.9)
+  - Flutter (1.0.0)
+  - flutter_alipay (0.0.1):
+    - AlipaySDK-iOS
+    - Flutter
+  - flutter_plugin_android_lifecycle (0.0.1):
+    - Flutter
+  - fluwx (0.0.1):
+    - Flutter
+    - WechatOpenSDK (= 1.8.7.1)
+  - FMDB (2.7.5):
+    - FMDB/standard (= 2.7.5)
+  - FMDB/standard (2.7.5)
+  - HappyDNS (0.3.17)
+  - image_picker (0.0.1):
+    - Flutter
+  - JCore (2.4.0)
+  - JPush (3.3.6):
+    - JCore (< 3.0.0, >= 2.0.0)
+  - jpush_flutter (0.0.2):
+    - Flutter
+    - JPush
+  - path_provider (0.0.1):
+    - Flutter
+  - path_provider_linux (0.0.1):
+    - Flutter
+  - path_provider_macos (0.0.1):
+    - Flutter
+  - path_provider_windows (0.0.1):
+    - Flutter
+  - Qiniu (8.0.4):
+    - HappyDNS (~> 0.3.17)
+  - shared_preferences (0.0.1):
+    - Flutter
+  - shared_preferences_linux (0.0.1):
+    - Flutter
+  - shared_preferences_macos (0.0.1):
+    - Flutter
+  - shared_preferences_web (0.0.1):
+    - Flutter
+  - shared_preferences_windows (0.0.1):
+    - Flutter
+  - sqflite (0.0.1):
+    - Flutter
+    - FMDB (~> 2.7.2)
+  - sy_flutter_qiniu_storage (0.0.1):
+    - Flutter
+    - Qiniu
+  - url_launcher (0.0.1):
+    - Flutter
+  - url_launcher_linux (0.0.1):
+    - Flutter
+  - url_launcher_macos (0.0.1):
+    - Flutter
+  - url_launcher_web (0.0.1):
+    - Flutter
+  - url_launcher_windows (0.0.1):
+    - Flutter
+  - video_player (0.0.1):
+    - Flutter
+  - video_player_web (0.0.1):
+    - Flutter
+  - webview_flutter (0.0.1):
+    - Flutter
+  - WechatOpenSDK (1.8.7.1)
+
+DEPENDENCIES:
+  - Flutter (from `Flutter`)
+  - flutter_alipay (from `.symlinks/plugins/flutter_alipay/ios`)
+  - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
+  - fluwx (from `.symlinks/plugins/fluwx/ios`)
+  - image_picker (from `.symlinks/plugins/image_picker/ios`)
+  - jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
+  - path_provider (from `.symlinks/plugins/path_provider/ios`)
+  - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
+  - path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
+  - path_provider_windows (from `.symlinks/plugins/path_provider_windows/ios`)
+  - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
+  - shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
+  - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
+  - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
+  - shared_preferences_windows (from `.symlinks/plugins/shared_preferences_windows/ios`)
+  - sqflite (from `.symlinks/plugins/sqflite/ios`)
+  - sy_flutter_qiniu_storage (from `.symlinks/plugins/sy_flutter_qiniu_storage/ios`)
+  - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
+  - url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
+  - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
+  - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
+  - url_launcher_windows (from `.symlinks/plugins/url_launcher_windows/ios`)
+  - 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`)
+
+SPEC REPOS:
+  trunk:
+    - AlipaySDK-iOS
+    - FMDB
+    - HappyDNS
+    - JCore
+    - JPush
+    - Qiniu
+    - WechatOpenSDK
+
+EXTERNAL SOURCES:
+  Flutter:
+    :path: Flutter
+  flutter_alipay:
+    :path: ".symlinks/plugins/flutter_alipay/ios"
+  flutter_plugin_android_lifecycle:
+    :path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
+  fluwx:
+    :path: ".symlinks/plugins/fluwx/ios"
+  image_picker:
+    :path: ".symlinks/plugins/image_picker/ios"
+  jpush_flutter:
+    :path: ".symlinks/plugins/jpush_flutter/ios"
+  path_provider:
+    :path: ".symlinks/plugins/path_provider/ios"
+  path_provider_linux:
+    :path: ".symlinks/plugins/path_provider_linux/ios"
+  path_provider_macos:
+    :path: ".symlinks/plugins/path_provider_macos/ios"
+  path_provider_windows:
+    :path: ".symlinks/plugins/path_provider_windows/ios"
+  shared_preferences:
+    :path: ".symlinks/plugins/shared_preferences/ios"
+  shared_preferences_linux:
+    :path: ".symlinks/plugins/shared_preferences_linux/ios"
+  shared_preferences_macos:
+    :path: ".symlinks/plugins/shared_preferences_macos/ios"
+  shared_preferences_web:
+    :path: ".symlinks/plugins/shared_preferences_web/ios"
+  shared_preferences_windows:
+    :path: ".symlinks/plugins/shared_preferences_windows/ios"
+  sqflite:
+    :path: ".symlinks/plugins/sqflite/ios"
+  sy_flutter_qiniu_storage:
+    :path: ".symlinks/plugins/sy_flutter_qiniu_storage/ios"
+  url_launcher:
+    :path: ".symlinks/plugins/url_launcher/ios"
+  url_launcher_linux:
+    :path: ".symlinks/plugins/url_launcher_linux/ios"
+  url_launcher_macos:
+    :path: ".symlinks/plugins/url_launcher_macos/ios"
+  url_launcher_web:
+    :path: ".symlinks/plugins/url_launcher_web/ios"
+  url_launcher_windows:
+    :path: ".symlinks/plugins/url_launcher_windows/ios"
+  video_player:
+    :path: ".symlinks/plugins/video_player/ios"
+  video_player_web:
+    :path: ".symlinks/plugins/video_player_web/ios"
+  webview_flutter:
+    :path: ".symlinks/plugins/webview_flutter/ios"
+
+SPEC CHECKSUMS:
+  AlipaySDK-iOS: 94ff4c0e17c5e7d126b8207596d5033006534c25
+  Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
+  flutter_alipay: feedc0200a70b37c2f230b9fc33674f32e272327
+  flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
+  fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
+  FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+  HappyDNS: 848ef73e24f2b0e2752064223ce2dc0dd88900ea
+  image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
+  JCore: a29e4b0ee54e1301446dc02d8e1c350404108b34
+  JPush: a401b946dcc76b37335422487201bc1ecc8dd296
+  jpush_flutter: 69133df35eaf9135e540549b154d992c44f8ee44
+  path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
+  path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
+  path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
+  path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
+  Qiniu: 967efbfa2366d14c87899757013c0fd0ebb896e0
+  shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
+  shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
+  shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
+  shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
+  shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae
+  sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
+  sy_flutter_qiniu_storage: 3a33fb552bb77f4777d261469111f52ad35307fb
+  url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
+  url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
+  url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
+  url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
+  url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5
+  video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
+  video_player_web: da8cadb8274ed4f8dbee8d7171b420dedd437ce7
+  webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
+  WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
+
+PODFILE CHECKSUM: 7d7c1a836127f2de52f33a738499e58dbface745
+
+COCOAPODS: 1.10.0

+ 75 - 0
ysairplane/lib/tools/YSFutureNetWork.dart

@@ -0,0 +1,75 @@
+import 'package:dio/dio.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+import 'YSNetWorking.dart';
+
+typedef widgetCallback = Widget Function(dynamic value);
+String base = 'http://192.168.1.77:8082';
+int outTime = 20000;
+
+getFeatureDisplayShowData(HttpModel model) async{
+  String url = base+model.api;
+  SharedPreferences prefs = await SharedPreferences.getInstance();
+  String token = prefs.getString('token');
+  Map<String, dynamic> httpHeaders = {
+    'Accept': 'application/json,*/*',
+    'Content-Type': 'application/json',
+    if(model.isToken==true)'Authentication': token??''
+  };
+  Response response;
+  if(model.type==requestType.put){
+    response = await Dio().put(url,data: model.parameter,options: Options(receiveTimeout: outTime,headers: httpHeaders));
+  }else if(model.type==requestType.post){
+    response = await Dio().post(url,data: model.parameter,options: Options(receiveTimeout: outTime,headers: httpHeaders));
+  }else if(model.type==requestType.delete){
+    response = await Dio().delete(url,data: model.parameter,options: Options(receiveTimeout: outTime,headers: httpHeaders));
+  }else{
+    response = await Dio().get(url,queryParameters: Map<String, dynamic>.from(model.parameter),options: Options(receiveTimeout: outTime,headers: httpHeaders));
+  }
+  print(response.data);
+  return response.data['data'];
+}
+
+futureWidget({widgetCallback data,HttpModel model}){
+  return FutureBuilder(
+    future: getFeatureDisplayShowData(model),
+    builder: (context, snapshot) {
+      var widget;
+      if (snapshot.connectionState == ConnectionState.done) {
+        if (snapshot.hasError) {
+          widget = Icon(
+            Icons.error,
+            color: Colors.red,
+            size: 48,
+          );
+        } else {
+          widget = data(snapshot);
+        }
+      } else {
+        widget = Padding(
+          padding: EdgeInsets.all(20),
+          child: CircularProgressIndicator(),
+        );
+      }
+      return Center(
+        child: Container(
+          child: widget,
+        ),
+      );
+    },
+  );
+}
+
+class HttpModel{
+  final requestType type;
+  final String api;
+  final parameter;
+  final VoidCallback refresh;
+  final bool isToken;
+  HttpModel(this.type, this.api, this.parameter, this.refresh, this.isToken);
+}
+
+
+

+ 43 - 0
ysairplane1/.gitignore

@@ -0,0 +1,43 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Exceptions to above rules.
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

+ 10 - 0
ysairplane1/.metadata

@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+  revision: 981afe39ae3de8d779466aca0d8af752b7323538
+  channel: master
+
+project_type: app

+ 16 - 0
ysairplane1/README.md

@@ -0,0 +1,16 @@
+# ysairplane
+
+A new Flutter application.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
+
+For help getting started with Flutter, view our
+[online documentation](https://flutter.dev/docs), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.

+ 7 - 0
ysairplane1/android/.gitignore

@@ -0,0 +1,7 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java

+ 83 - 0
ysairplane1/android/app/build.gradle

@@ -0,0 +1,83 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+    localPropertiesFile.withReader('UTF-8') { reader ->
+        localProperties.load(reader)
+    }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+    flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+    flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+def keystorePropertiesFile = rootProject.file("key.properties")
+def keystoreProperties = new Properties()
+keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+
+android {
+    compileSdkVersion 28
+
+    sourceSets {
+        main.java.srcDirs += 'src/main/kotlin'
+    }
+
+    lintOptions {
+        disable 'InvalidPackage'
+        checkReleaseBuilds false
+        abortOnError false
+    }
+
+    defaultConfig {
+        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+        applicationId "yscom.example.ysairplane"
+        minSdkVersion 17
+        targetSdkVersion 28
+        versionCode flutterVersionCode.toInteger()
+        versionName flutterVersionName
+        manifestPlaceholders = [
+            JPUSH_PKGNAME: applicationId,
+            JPUSH_APPKEY : "5cdf5bc06073b6ba4b3eaf86", /*NOTE: JPush 上注册的包名对应的 Appkey.*/
+            JPUSH_CHANNEL: "developer-default", /*暂时填写默认值即可.*/
+        ]
+    }
+
+    signingConfigs {
+        release {
+            keyAlias keystoreProperties['keyAlias']
+            keyPassword keystoreProperties['keyPassword']
+            storeFile file(keystoreProperties['storeFile'])
+            storePassword keystoreProperties['storePassword']
+        }
+    }
+
+    buildTypes {
+        release {
+            // TODO: Add your own signing config for the release build.
+            // Signing with the debug keys for now, so `flutter run --release` works.
+            signingConfig signingConfigs.debug
+        }
+    }
+}
+
+flutter {
+    source '../..'
+}
+
+dependencies {
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}

+ 19 - 0
ysairplane1/android/app/src/debug/AndroidManifest.xml

@@ -0,0 +1,19 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="yscom.example.ysairplane">
+    <!-- Flutter needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <!--腾讯地图 SDK 要求的权限(开始)-->
+    <!--访问网络获取地图服务-->
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <!--检查网络可用性-->
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+    <!-- 访问WiFi状态 -->
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+    <!--需要外部存储写权限用于保存地图缓存-->
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <!--获取 device id 辨别设备-->
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+    <!--腾讯地图 SDK 要求的权限(结束)-->
+</manifest>

+ 48 - 0
ysairplane1/android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,48 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="yscom.example.ysairplane">
+    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
+         calls FlutterMain.startInitialization(this); in its onCreate method.
+         In most cases you can leave this as-is, but you if you want to provide
+         additional functionality it is fine to subclass or reimplement
+         FlutterApplication and put your custom class here. -->
+<!--    io.flutter.app.FlutterApplication  .MyApplication -->
+    <application
+        android:name="io.flutter.app.FlutterApplication"
+        android:label="通用航空"
+        android:icon="@mipmap/ic_launcher">
+        <activity
+            android:name=".MainActivity"
+            android:launchMode="singleTop"
+            android:theme="@style/LaunchTheme"
+            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
+            android:hardwareAccelerated="true"
+            android:windowSoftInputMode="adjustResize">
+            <!-- Specifies an Android theme to apply to this Activity as soon as
+                 the Android process has started. This theme is visible to the user
+                 while the Flutter UI initializes. After that, this theme continues
+                 to determine the Window background behind the Flutter UI. -->
+            <meta-data
+              android:name="io.flutter.embedding.android.NormalTheme"
+              android:resource="@style/NormalTheme"
+              />
+            <!-- Displays an Android View that continues showing the launch screen
+                 Drawable until Flutter paints its first frame, then this splash
+                 screen fades out. A splash screen is useful to avoid any visual
+                 gap between the end of Android's launch screen and the painting of
+                 Flutter's first frame. -->
+            <meta-data
+              android:name="io.flutter.embedding.android.SplashScreenDrawable"
+              android:resource="@drawable/launch_background"
+              />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+        <!-- Don't delete the meta-data below.
+             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
+    </application>
+</manifest>

+ 7 - 0
ysairplane1/android/app/src/main/kotlin/yscom/example/ysairplane/MainActivity.kt

@@ -0,0 +1,7 @@
+package yscom.example.ysairplane
+import io.flutter.embedding.android.FlutterActivity
+
+
+class MainActivity: FlutterActivity() {
+
+}

+ 12 - 0
ysairplane1/android/app/src/main/res/drawable/launch_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@android:color/white" />
+
+    <!-- You can insert your own image assets here -->
+    <!-- <item>
+        <bitmap
+            android:gravity="center"
+            android:src="@mipmap/launch_image" />
+    </item> -->
+</layer-list>

BIN
ysairplane1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
ysairplane1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
ysairplane1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
ysairplane1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
ysairplane1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


+ 18 - 0
ysairplane1/android/app/src/main/res/values/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             Flutter draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+         
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <item name="android:windowBackground">@android:color/white</item>
+    </style>
+</resources>

+ 19 - 0
ysairplane1/android/app/src/profile/AndroidManifest.xml

@@ -0,0 +1,19 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="yscom.example.ysairplane">
+    <!-- Flutter needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <!--腾讯地图 SDK 要求的权限(开始)-->
+    <!--访问网络获取地图服务-->
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <!--检查网络可用性-->
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+    <!-- 访问WiFi状态 -->
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+    <!--需要外部存储写权限用于保存地图缓存-->
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <!--获取 device id 辨别设备-->
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+    <!--腾讯地图 SDK 要求的权限(结束)-->
+</manifest>

+ 31 - 0
ysairplane1/android/build.gradle

@@ -0,0 +1,31 @@
+buildscript {
+    ext.kotlin_version = '1.3.50'
+    repositories {
+        google()
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.5.0'
+        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+    project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+    project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 4 - 0
ysairplane1/android/gradle.properties

@@ -0,0 +1,4 @@
+org.gradle.jvmargs=-Xmx1536M
+android.enableR8=true
+android.useAndroidX=true
+android.enableJetifier=true

+ 6 - 0
ysairplane1/android/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

+ 7 - 0
ysairplane1/android/key.properties

@@ -0,0 +1,7 @@
+//输入上一步创建KEY时输入的 密钥库 密码
+storePassword=datangyun
+//输入上一步创建KEY时输入的 密钥 密码
+keyPassword=datangyun    
+keyAlias=key
+//key.jks的存放路径
+storeFile=/Users/datangyun/Desktop/flutter/key.jks

+ 15 - 0
ysairplane1/android/settings.gradle

@@ -0,0 +1,15 @@
+include ':app'
+
+def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
+
+def plugins = new Properties()
+def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
+if (pluginsFile.exists()) {
+    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
+}
+
+plugins.each { name, path ->
+    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
+    include ":$name"
+    project(":$name").projectDir = pluginDirectory
+}

+ 32 - 0
ysairplane1/ios/.gitignore

@@ -0,0 +1,32 @@
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3

+ 26 - 0
ysairplane1/ios/Flutter/AppFrameworkInfo.plist

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>$(DEVELOPMENT_LANGUAGE)</string>
+  <key>CFBundleExecutable</key>
+  <string>App</string>
+  <key>CFBundleIdentifier</key>
+  <string>io.flutter.flutter.app</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>App</string>
+  <key>CFBundlePackageType</key>
+  <string>FMWK</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1.0</string>
+  <key>MinimumOSVersion</key>
+  <string>8.0</string>
+</dict>
+</plist>

+ 2 - 0
ysairplane1/ios/Flutter/Debug.xcconfig

@@ -0,0 +1,2 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"

+ 2 - 0
ysairplane1/ios/Flutter/Release.xcconfig

@@ -0,0 +1,2 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"

+ 84 - 0
ysairplane1/ios/Podfile

@@ -0,0 +1,84 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+  'Debug' => :debug,
+  'Profile' => :release,
+  'Release' => :release,
+}
+
+def parse_KV_file(file, separator='=')
+  file_abs_path = File.expand_path(file)
+  if !File.exists? file_abs_path
+    return [];
+  end
+  generated_key_values = {}
+  skip_line_start_symbols = ["#", "/"]
+  File.foreach(file_abs_path) do |line|
+    next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
+    plugin = line.split(pattern=separator)
+    if plugin.length == 2
+      podname = plugin[0].strip()
+      path = plugin[1].strip()
+      podpath = File.expand_path("#{path}", file_abs_path)
+      generated_key_values[podname] = podpath
+    else
+      puts "Invalid plugin specification: #{line}"
+    end
+  end
+  generated_key_values
+end
+
+target 'Runner' do
+  # Flutter Pod
+
+  copied_flutter_dir = File.join(__dir__, 'Flutter')
+  copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
+  copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
+  unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
+    # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
+    # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
+    # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
+
+    generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
+    unless File.exist?(generated_xcode_build_settings_path)
+      raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+    end
+    generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
+    cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
+
+    unless File.exist?(copied_framework_path)
+      FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
+    end
+    unless File.exist?(copied_podspec_path)
+      FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
+    end
+  end
+
+  # Keep pod path relative so it can be checked into Podfile.lock.
+  pod 'Flutter', :path => 'Flutter'
+
+  # Plugin Pods
+
+  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
+  # referring to absolute paths on developers' machines.
+  system('rm -rf .symlinks')
+  system('mkdir -p .symlinks/plugins')
+  plugin_pods = parse_KV_file('../.flutter-plugins')
+  plugin_pods.each do |name, path|
+    symlink = File.join('.symlinks', 'plugins', name)
+    File.symlink(path, symlink)
+    pod name, :path => File.join(symlink, 'ios')
+  end
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    target.build_configurations.each do |config|
+      config.build_settings['ENABLE_BITCODE'] = 'NO'
+    end
+  end
+end

+ 506 - 0
ysairplane1/ios/Runner.xcodeproj/project.pbxproj

@@ -0,0 +1,506 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+		74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		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>"; };
+		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
+		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		97C146EB1CF9000F007C117D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		9740EEB11CF90186004384FC /* Flutter */ = {
+			isa = PBXGroup;
+			children = (
+				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+				9740EEB21CF90195004384FC /* Debug.xcconfig */,
+				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+				9740EEB31CF90195004384FC /* Generated.xcconfig */,
+			);
+			name = Flutter;
+			sourceTree = "<group>";
+		};
+		97C146E51CF9000F007C117D = {
+			isa = PBXGroup;
+			children = (
+				9740EEB11CF90186004384FC /* Flutter */,
+				97C146F01CF9000F007C117D /* Runner */,
+				97C146EF1CF9000F007C117D /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		97C146EF1CF9000F007C117D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				97C146EE1CF9000F007C117D /* Runner.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		97C146F01CF9000F007C117D /* Runner */ = {
+			isa = PBXGroup;
+			children = (
+				97C146FA1CF9000F007C117D /* Main.storyboard */,
+				97C146FD1CF9000F007C117D /* Assets.xcassets */,
+				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+				97C147021CF9000F007C117D /* Info.plist */,
+				97C146F11CF9000F007C117D /* Supporting Files */,
+				1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+				1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+				74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+				74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+			);
+			path = Runner;
+			sourceTree = "<group>";
+		};
+		97C146F11CF9000F007C117D /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		97C146ED1CF9000F007C117D /* Runner */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+			buildPhases = (
+				9740EEB61CF901F6004384FC /* Run Script */,
+				97C146EA1CF9000F007C117D /* Sources */,
+				97C146EB1CF9000F007C117D /* Frameworks */,
+				97C146EC1CF9000F007C117D /* Resources */,
+				9705A1C41CF9048500538489 /* Embed Frameworks */,
+				3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Runner;
+			productName = Runner;
+			productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		97C146E61CF9000F007C117D /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 1020;
+				ORGANIZATIONNAME = "";
+				TargetAttributes = {
+					97C146ED1CF9000F007C117D = {
+						CreatedOnToolsVersion = 7.3.1;
+						LastSwiftMigration = 1100;
+					};
+				};
+			};
+			buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+			compatibilityVersion = "Xcode 9.3";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 97C146E51CF9000F007C117D;
+			productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				97C146ED1CF9000F007C117D /* Runner */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		97C146EC1CF9000F007C117D /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+				97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+				97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Thin Binary";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+		};
+		9740EEB61CF901F6004384FC /* Run Script */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Run Script";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		97C146EA1CF9000F007C117D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+				1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C146FB1CF9000F007C117D /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C147001CF9000F007C117D /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		249021D3217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Profile;
+		};
+		249021D4217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = yscom.example.ysairplane;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Profile;
+		};
+		97C147031CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		97C147041CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		97C147061CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = yscom.example.ysairplane;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Debug;
+		};
+		97C147071CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = yscom.example.ysairplane;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147031CF9000F007C117D /* Debug */,
+				97C147041CF9000F007C117D /* Release */,
+				249021D3217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147061CF9000F007C117D /* Debug */,
+				97C147071CF9000F007C117D /* Release */,
+				249021D4217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}

+ 7 - 0
ysairplane1/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
ysairplane1/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
ysairplane1/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 91 - 0
ysairplane1/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1020"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+               BuildableName = "Runner.app"
+               BlueprintName = "Runner"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Profile"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 7 - 0
ysairplane1/ios/Runner.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
ysairplane1/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
ysairplane1/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 13 - 0
ysairplane1/ios/Runner/AppDelegate.swift

@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+  override func application(
+    _ application: UIApplication,
+    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+  ) -> Bool {
+    GeneratedPluginRegistrant.register(with: self)
+    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+  }
+}

+ 122 - 0
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,122 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-83.5x83.5@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "1024x1024",
+      "idiom" : "ios-marketing",
+      "filename" : "Icon-App-1024x1024@1x.png",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


+ 23 - 0
ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png


BIN
ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png


+ 5 - 0
ysairplane1/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md

@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

+ 37 - 0
ysairplane1/ios/Runner/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="LaunchImage" width="168" height="185"/>
+    </resources>
+</document>

+ 26 - 0
ysairplane1/ios/Runner/Base.lproj/Main.storyboard

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--Flutter View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>

+ 45 - 0
ysairplane1/ios/Runner/Info.plist

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>ysairplane</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>$(FLUTTER_BUILD_NAME)</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>$(FLUTTER_BUILD_NUMBER)</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UIViewControllerBasedStatusBarAppearance</key>
+	<false/>
+</dict>
+</plist>

+ 1 - 0
ysairplane1/ios/Runner/Runner-Bridging-Header.h

@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"

+ 43 - 0
ysairplane1/lib/base/YSBase.dart

@@ -0,0 +1,43 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+
+class YSBase extends StatefulWidget {
+  final Widget yschild;
+  final String ystitle;
+  final Widget ysright;
+  final Color yscolor;
+  const YSBase({Key key, this.yschild,this.ystitle,this.ysright, this.yscolor}) : super(key: key);
+  @override
+  _YSBaseState createState() => _YSBaseState();
+}
+
+class _YSBaseState extends State<YSBase> {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: widget.yscolor==null?Colors.white:widget.yscolor,
+      appBar: CupertinoNavigationBar(
+        backgroundColor: Colors.white,
+        border: Border(bottom: BorderSide(color: Color(0xFFEEEEEE),width: 0.5)),
+        leading: Container(
+          height: 30,
+          width: 20,
+          margin: EdgeInsets.only(right: 35),
+          child: CupertinoButton(
+            padding: EdgeInsets.all(0),
+            child: Icon(Icons.arrow_back_ios,size: 20,color: Color(0xFF000000),),
+            onPressed: (){
+              FocusScope.of(context).unfocus();
+              Navigator.pop(context);
+            },
+          ),
+        ),
+        middle: Text(widget.ystitle,style: TextStyle(color: Color(0xFF000000),fontSize: 16,decoration: TextDecoration.none,fontWeight: FontWeight.w600),textAlign: TextAlign.center,),
+        trailing: widget.ysright,
+      ),
+      body: SingleChildScrollView(
+        child: widget.yschild,
+      ),
+    );
+  }
+}

+ 310 - 0
ysairplane1/lib/code/YSAddSquare.dart

@@ -0,0 +1,310 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:sy_flutter_qiniu_storage/sy_flutter_qiniu_storage.dart';
+import 'dart:io';
+
+class YSAddSquare extends StatefulWidget {
+  final bool isPhoto;
+  const YSAddSquare({Key key, this.isPhoto}) : super(key: key);
+  @override
+  _YSAddSquareState createState() => _YSAddSquareState();
+}
+
+class _YSAddSquareState extends State<YSAddSquare> {
+  ImagePicker _picker = ImagePicker();
+  TextEditingController _title = TextEditingController();
+  TextEditingController _content = TextEditingController();
+  List _images = [];
+  String _tokenStr = '';
+  String _urlStr = '';
+  String _videoPath = '';
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getQiNiuTokenData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '发布',
+      yschild: Column(
+        children: [
+          Container(
+            padding: EdgeInsets.all(15),
+            height: 120,
+            child: ListView.separated(
+              scrollDirection: Axis.horizontal,
+              itemBuilder: (context,index){
+                return GestureDetector(
+                  onTap: (){
+                    showCupertinoModalPopup(
+                        context: context,
+                        builder: (context) {
+                          return CupertinoActionSheet(
+                            actions: <Widget>[
+                              CupertinoActionSheetAction(
+                                child: Text(widget.isPhoto==true?'拍摄照片':'拍摄视频'),
+                                onPressed: () {
+                                  Navigator.pop(context);
+                                  widget.isPhoto==true?_picker.getImage(source: ImageSource.camera).then((value){
+                                    _onUpload(value);
+                                  }):_picker.getVideo(source: ImageSource.camera).then((value){
+                                    _onUpload(value);
+                                  });
+                                },
+                              ),
+                              CupertinoActionSheetAction(
+                                child: Text(widget.isPhoto==true?'选择图片':'选择视频'),
+                                onPressed: () {
+                                  Navigator.pop(context);
+                                  widget.isPhoto==true?_picker.getImage(source: ImageSource.gallery).then((value){
+                                    _onUpload(value);
+                                  }):_picker.getVideo(source: ImageSource.gallery).then((value){
+                                    _onUpload(value);
+                                  });
+                                },
+                              ),
+                            ],
+                            cancelButton: CupertinoActionSheetAction(
+                              child: Text('取消'),
+                              onPressed: () {
+                                Navigator.pop(context);
+                              },
+                            ),
+                          );
+                        }
+                    );
+                  },
+                  child: (index==_images.length&&widget.isPhoto==true)||(_videoPath.isEmpty&&widget.isPhoto==false)?Container(
+                    height: 90,
+                    width: 90,
+                    padding: EdgeInsets.only(top: 20,bottom: 20),
+                    decoration: BoxDecoration(
+                      border: Border.all(color: Color(0xFFEDEDED),width: 1),
+                      borderRadius: BorderRadius.all(Radius.circular(10))
+                    ),
+                    child: Column(
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                      children: [
+                        Icon(Icons.add,size: 25,color: Color(0xFF9A9A9A),),
+                        Text(widget.isPhoto==true?'上传图片':'上传视频',style: TextStyle(fontSize: 14,color: Color(0xFF9A9A9A),decoration: TextDecoration.none),),
+                      ],
+                    ),
+                  ):(_videoPath.isNotEmpty&&widget.isPhoto==false)?Container(
+                    height: 90,
+                    width: 90,
+                    padding: EdgeInsets.only(top: 20,bottom: 20),
+                    decoration: BoxDecoration(
+                      border: Border.all(color: Color(0xFFEDEDED),width: 1),
+                      borderRadius: BorderRadius.all(Radius.circular(10)),
+                      color: Colors.black54,
+                    ),
+                    child: Container(
+                      height: 20,
+                      width: 20,
+                      child: Icon(Icons.play_circle_filled,color: Colors.white,),
+                    ),
+                  ):Container(
+                    height: 90,
+                    width: 90,
+                    padding: EdgeInsets.only(top: 20,bottom: 20),
+                    decoration: BoxDecoration(
+                      border: Border.all(color: Color(0xFFEDEDED),width: 1),
+                      borderRadius: BorderRadius.all(Radius.circular(10)),
+                      image: DecorationImage(image: NetworkImage(_images[index]),fit: BoxFit.fill)
+                    ),
+                  ),
+                );
+              },
+              separatorBuilder: (context,index){
+                return Container(
+                  width: 10,
+                );
+              },
+              itemCount: _images.length+1
+            ),
+          ),
+          GestureDetector(
+            onTap: (){
+              Navigator.push(context, PopRoute(child: BottomInputDialog(
+                height: 50,
+                inputView: Row(
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Container(
+                      width: MediaQuery.of(context).size.width-100,
+                      child: CupertinoTextField(
+                        placeholder: '说点儿好听的~',
+                        style: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                        placeholderStyle: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                        autofocus: true,
+                        decoration: BoxDecoration(),
+                        controller: _title,
+                        maxLength: 20,
+                      ),
+                    ),
+                    Icon(Icons.alternate_email,size: 25,color: Color(0xFFA1A1A2),),
+                    Icon(Icons.tag_faces,size: 25,color: Color(0xFFA1A1A2),),
+                  ],
+                ),
+              )));
+            },
+            child: Container(
+              height: 50,
+              margin: EdgeInsets.only(left: 15,right: 15,top: 5,bottom: 15),
+              decoration: BoxDecoration(
+                border: Border(bottom: BorderSide(color: Color(0xFFE6E6E6),width: 0.5))
+              ),
+              child: Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                children: [
+                  Text(_title.text.isEmpty?'填写标题会有很多赞哦~':_title.text,style: TextStyle(fontSize: 16,color: Color(0xFF9A9A9A)),),
+                  Text('${_title.text.length}/20',style: TextStyle(fontSize: 17,color: Color(0xFF9A9A9A)),),
+                ],
+              )
+            ),
+          ),
+          GestureDetector(
+            onTap: (){
+              Navigator.push(context, PopRoute(child: BottomInputDialog(
+                height: 50,
+                inputView: Row(
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Container(
+                      width: MediaQuery.of(context).size.width-100,
+                      child: CupertinoTextField(
+                        placeholder: '说点儿好听的~',
+                        style: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                        placeholderStyle: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                        autofocus: true,
+                        decoration: BoxDecoration(),
+                        controller: _content,
+                      ),
+                    ),
+                    Icon(Icons.alternate_email,size: 25,color: Color(0xFFA1A1A2),),
+                    Icon(Icons.tag_faces,size: 25,color: Color(0xFFA1A1A2),),
+                  ],
+                ),
+              )));
+            },
+            child: Container(
+              height: 200,
+              width: MediaQuery.of(context).size.width-30,
+              margin: EdgeInsets.only(left: 15,right: 15),
+              child: SingleChildScrollView(
+                child: Text(_content.text.isEmpty?'添加正文':_content.text,style: TextStyle(fontSize: 15,color: Color(0xFF9A9A9A)),),
+              ),
+            ),
+          ),
+          Container(
+            width: MediaQuery.of(context).size.width-30,
+            margin: EdgeInsets.only(top: 10,bottom: 10,left: 145),
+            child: Row(
+              children: [
+                Text('写50字,有机会评为',style: TextStyle(fontSize: 14,color: Color(0xFF9A9A9A)),),
+                Text('优质内容 ',style: TextStyle(fontSize: 14,color: Color(0xFF007AFF)),),
+                Image(image: AssetImage('lib/images/tips.png'),height: 15,width: 15,)
+              ],
+            ),
+          ),
+          Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE6E6E6),indent: 15,endIndent: 15,),
+          GestureDetector(
+            onTap: (){
+              _postAddSquareData();
+            },
+            child: Container(
+              margin: EdgeInsets.only(top: 60),
+              width: MediaQuery.of(context).size.width-70,
+              height: 44,
+              alignment: Alignment.center,
+              decoration: BoxDecoration(
+                color: Color(0xFF007EFF),
+                borderRadius: BorderRadius.all(Radius.circular(22))
+              ),
+              child: Text('发布',style: TextStyle(fontSize: 18,color: Colors.white),),
+            ),
+          )
+        ],
+      ),
+    );
+  }
+
+  _getQiNiuTokenData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/getToken',parameter: {},isLoading: false,isToken: false);
+    if(dict!=null){
+      _tokenStr = dict['token'];
+      _urlStr = dict['prefix'];
+    }
+  }
+
+  _onUpload(var value) async {
+    if (value == null) {
+      return;
+    }
+    print(value.path);
+    print(_tokenStr);
+    final syStorage = new SyFlutterQiniuStorage();
+    //监听上传进度
+    syStorage.onChanged().listen((dynamic percent) {
+      print(percent);
+    });
+    //上传文件
+    var result = await syStorage.upload(value.path, _tokenStr, DateTime.now().millisecondsSinceEpoch.toString() +'.' +value.path.split('.').last);
+    if(result.success==true){
+      setState(() {
+        widget.isPhoto==true?_images.add(_urlStr+'${result.result['key']}'):_videoPath = _urlStr+'${result.result['key']}';
+      });
+    }
+    print(result);
+   }
+
+  //取消上传
+  _onCancel() {
+    SyFlutterQiniuStorage.cancelUpload();
+  }
+//0为视频,1为文章
+  _postAddSquareData() async{
+    if(widget.isPhoto==true&&_images.length==0){
+      ysFlutterToast(context, '请添加图片');
+      return;
+    }
+    if(widget.isPhoto==false&&_videoPath.isEmpty){
+      ysFlutterToast(context, '请添加视频');
+      return;
+    }
+    if(_title.text.isEmpty){
+      ysFlutterToast(context, '请输入标题');
+      return;
+    }
+    if(_content.text.isEmpty){
+      ysFlutterToast(context, '请输入内容');
+      return;
+    }
+    Map request ={};
+    request['typeId'] = 1;
+    if(widget.isPhoto==true){
+      request['type'] = 1;
+      request['topicTitle'] = _title.text;
+      request['topicContent'] = _content.text;
+      request['topicPic'] = _images.join(',');
+    }else{
+      request['type'] = 0;
+      request['videoTitle'] = _title.text;
+      request['videoContent'] = _content.text;
+      request['videoPath'] = _videoPath;
+    }
+    Map dict = await ysRequestHttp(context,type: requestType.post,api: '/app/piazza/SquareCommunity/publish',parameter: request,isLoading: true,isToken: true,refresh: (){
+      _postAddSquareData();
+    });
+    if(dict!=null){
+      Navigator.of(context).pop('');
+    }
+  }
+}

+ 440 - 0
ysairplane1/lib/code/YSAuthorSquare.dart

@@ -0,0 +1,440 @@
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_easyrefresh/easy_refresh.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
+
+import 'YSSquareArticle.dart';
+import 'YSSquareVideo.dart';
+
+class YSAuthorSquare extends StatefulWidget {
+  final int authorId;
+  const YSAuthorSquare({Key key, this.authorId}) : super(key: key);
+  @override
+  _YSAuthorSquareState createState() => _YSAuthorSquareState();
+}
+
+class _YSAuthorSquareState extends State<YSAuthorSquare> {
+  ScrollController _scrollController = ScrollController();
+  Map _dict;
+  int _selected = 0;
+  List _dataArray = [];
+  int _page = 1;
+  int _isAttention = 0;
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getUserInfoData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: Colors.white,
+      body: EasyRefresh(
+        onRefresh: _refresh,
+        onLoad: _loadMore,
+        header: MaterialHeader(
+
+        ),
+        footer: BezierBounceFooter(
+          backgroundColor: Colors.transparent,
+          color: Colors.transparent,
+        ),
+        child: SingleChildScrollView(
+          child: Stack(
+            children: [
+              Container(
+                height: hsp(300)+MediaQuery.of(context).padding.top,
+                width: MediaQuery.of(context).size.width,
+                child: Image(
+                  image: _dict==null?AssetImage('lib/images/squareBg2.png'):NetworkImage('${_dict['backGroundUrl']}'),
+                  fit: BoxFit.fill,
+                ),
+              ),
+              Container(
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+10,left: 15,right: 15),
+                height: 50,
+                child: Row(
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    GestureDetector(
+                      child: Icon(Icons.arrow_back_ios,size: 20,color: Colors.white,),
+                      onTap: (){
+                        Navigator.pop(context);
+                      },
+                    ),
+                  ],
+                ),
+              ),
+              Container(
+                height: hsp(160),
+                width: hsp(160),
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(220),left: wsp(40)),
+                decoration: BoxDecoration(
+                  image: DecorationImage(image: _dict==null?AssetImage('lib/images/head.png'):NetworkImage('${_dict['user']['avatar']}')),
+                  borderRadius: BorderRadius.all(Radius.circular(35))
+                ),
+              ),
+              GestureDetector(
+                onTap: (){
+                  _postAuthorAttention();
+                },
+                child: Container(
+                  height: hsp(60),
+                  width: wsp(160),
+                  margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(314),left: MediaQuery.of(context).size.width-wsp(200)),
+                  decoration: BoxDecoration(
+                    color: _isAttention==0?Color(0xFFED4946):Color(0xFFBCBCBC),
+                    borderRadius: BorderRadius.all(Radius.circular(3))
+                  ),
+                  alignment: Alignment.center,
+                  child: Text(_isAttention==0?'+ 关注':'取消关注',style: TextStyle(color: Colors.white,fontSize: zsp(24)),),
+                ),
+              ),
+              Container(
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(400)),
+                width: MediaQuery.of(context).size.width,
+                child: Column(
+                  children: [
+                    Container(
+                      child: Column(
+                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Container(
+                            child: Row(
+                              children: [
+                                Text(_dict==null?'':(_dict['user']['nickname']).toString().length>10?(_dict['user']['nickname']).toString().substring(0,10)+'..':(_dict['user']['nickname']).toString(),
+                                  style: TextStyle(fontSize: 16,color: Color(0xFF333333),fontWeight: FontWeight.bold,decoration: TextDecoration.none),maxLines: 1,overflow: TextOverflow.ellipsis,),
+                                Icon(Icons.pregnant_woman,color: Colors.pinkAccent,),
+                              ],
+                            ),
+                          ),
+                          Container(
+                            child: Text(_dict==null?'':'${_dict['labelIds']}',
+                              style: TextStyle(fontSize: 12,color: Color(0xFF333333),fontWeight: FontWeight.normal,decoration: TextDecoration.none),),
+                            margin: EdgeInsets.only(top: hsp(20),bottom: hsp(20)),
+                          ),
+                          Row(
+                            children: [
+                              Container(
+                                child: Text('陕西西安',
+                                  style: TextStyle(fontSize: 10,color: Color(0xFF666666),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                ),
+                                decoration: BoxDecoration(
+                                    color: Color(0xFFEEEEEE),
+                                    borderRadius: BorderRadius.all(Radius.circular(5))
+                                ),
+                                padding: EdgeInsets.all(5),
+                                margin: EdgeInsets.only(bottom: hsp(20)),
+                              ),
+                              Container(
+                                child: Text(_dict==null?'':'${_dict['user']['school']}',
+                                  style: TextStyle(fontSize: 10,color: Color(0xFF666666),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                ),
+                                decoration: BoxDecoration(
+                                    color: Color(0xFFEEEEEE),
+                                    borderRadius: BorderRadius.all(Radius.circular(5))
+                                ),
+                                padding: EdgeInsets.all(5),
+                                margin: EdgeInsets.only(left: 5,bottom: hsp(20)),
+                              ),
+                            ],
+                          ),
+                          Row(
+                            children: [
+                              Column(
+                                children: [
+                                  Text(_dict==null?'':'${_dict['attention']}',
+                                    style: TextStyle(fontSize: 14,color: Color(0xFF333333),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                  ),
+                                  Text('关注',
+                                    style: TextStyle(fontSize: 12,color: Color(0xFF666666),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                  )
+                                ],
+                              ),
+                              Container(
+                                margin: EdgeInsets.only(left: wsp(50),right: wsp(50)),
+                                child: Column(
+                                  children: [
+                                    Text(_dict==null?'':'${_dict['fans']}',
+                                      style: TextStyle(fontSize: 14,color: Color(0xFF333333),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                    ),
+                                    Text('粉丝',
+                                      style: TextStyle(fontSize: 12,color: Color(0xFF666666),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                    )
+                                  ],
+                                ),
+                              ),
+                              Column(
+                                children: [
+                                  Text(_dict==null?'':'${_dict['likeCount']}',
+                                    style: TextStyle(fontSize: 14,color: Color(0xFF333333),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                  ),
+                                  Text('喜欢',
+                                    style: TextStyle(fontSize: 12,color: Color(0xFF666666),fontWeight: FontWeight.normal,decoration: TextDecoration.none),
+                                  )
+                                ],
+                              )                          ],
+                          ),
+                        ],
+                      ),
+                      padding: EdgeInsets.only(left: wsp(50),right: wsp(50),bottom: hsp(10)),
+                    ),
+                    Divider(color: Color(0xFFF4F4F4),height: hsp(40),thickness: hsp(10),),
+                    Container(
+                      width: MediaQuery.of(context).size.width,
+                      height: hsp(77),
+                      color: Colors.white,
+                      padding: EdgeInsets.only(left: 20,right: 20),
+                      child: ListView.separated(
+                          scrollDirection: Axis.horizontal,
+                          itemBuilder: (context,index){
+                            return GestureDetector(
+                              onTap: (){
+                                setState(() {
+                                  _selected = index;
+                                });
+                              },
+                              child: Container(
+                                height: hsp(70),
+                                width: (MediaQuery.of(context).size.width-80)/3,
+                                child: Column(
+                                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                  children: [
+                                    Text(index==0?'作品':index==1?'关注':'收藏',style: TextStyle(fontSize: 16,color: index==_selected?Color(0xFF333333):Color(0xFF666666),decoration: TextDecoration.none,
+                                        fontWeight: index==_selected?FontWeight.bold:FontWeight.normal),),
+                                    Container(height: 2,width: wsp(30),color: index==_selected?Color(0xFF333333):Colors.transparent,)
+                                  ],
+                                ),
+                              ),
+                            );
+                          },
+                          separatorBuilder: (context,index){
+                            return Container(width: 20,);
+                          },
+                          itemCount: 3
+                      ),
+                    ),
+                    Divider(color: Color(0xFFF4F4F4),height: hsp(2),thickness: hsp(2),),
+                    Container(
+                      margin: EdgeInsets.only(left: 10,right: 10),
+                      child: StaggeredGridView.countBuilder(
+                        shrinkWrap: true,
+                        controller: _scrollController,
+                        crossAxisCount: 4,
+                        crossAxisSpacing: 8,
+                        mainAxisSpacing: 8,
+                        itemCount: _dataArray.length,
+                        itemBuilder: (context, index) {
+                          return GestureDetector(
+                            onTap: (){
+                              Navigator.of(context,rootNavigator: true).push(
+                                  CupertinoPageRoute(
+                                      builder: (context){
+                                        return _dataArray[index]['type']==1?YSSquareArticle(squareId: _dataArray[index]['id'],typeId: _dataArray[index]['type'],)
+                                            :YSSquareVideo(squareId: _dataArray[index]['id'],typeId: _dataArray[index]['type'],);
+                                      }
+                                  )
+                              );
+                            },
+                            child: Stack(
+                              children: [
+                                Container(
+                                  color: Colors.white,
+                                  child:Column(
+                                    children: [
+                                      AspectRatio(
+                                          child: Container(
+                                            decoration: BoxDecoration(
+                                              borderRadius: BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)),
+                                            ),
+                                            child: ClipRRect(
+                                              borderRadius: BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)),
+                                              child: CachedNetworkImage(
+                                                  imageUrl: _dataArray[index]['type']==0?'${_dataArray[index]['coverPath']}':'${_dataArray[index]['topicCover']}',
+                                                  fit: BoxFit.fill
+                                              ),
+                                            ),
+                                          ),
+                                          aspectRatio: double.parse('${_dataArray[index]['coverWidth']}')/double.parse('${_dataArray[index]['coverHeight']}')
+                                      ),
+                                      Container(
+                                        child: Text(_dataArray[index]['type']==0?'${_dataArray[index]['videoTitle']}':'${_dataArray[index]['topicTitle']}',
+                                          style: TextStyle(fontSize: 13,color: Color(0xFF333333),decoration: TextDecoration.none,),maxLines: 2,overflow: TextOverflow.ellipsis,),
+                                        padding: EdgeInsets.all(5),
+                                        alignment: Alignment.centerLeft,
+                                      ),
+                                      Container(
+                                        child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            Row(
+                                              children: [
+                                                Container(
+                                                  height: 20,
+                                                  width: 20,
+                                                  margin: EdgeInsets.only(right: 5),
+                                                  decoration: BoxDecoration(
+                                                    color: Colors.black12,
+                                                    borderRadius: BorderRadius.all(Radius.circular(10)),
+                                                  ),
+                                                  child: ClipRRect(
+                                                    borderRadius: BorderRadius.all(Radius.circular(10)),
+                                                    child: CachedNetworkImage(
+                                                      imageUrl: '${_dataArray[index]['user']['avatar']}',
+                                                      fit: BoxFit.fill,
+                                                    ),
+                                                  ),
+                                                ),
+                                                Container(
+                                                  width: 70,
+                                                  child: Text('${_dataArray[index]['user']['nickname']}',
+                                                    style: TextStyle(fontSize: 12,color: Color(0xFF333333),decoration: TextDecoration.none,),overflow: TextOverflow.ellipsis,),
+                                                )
+                                              ],
+                                            ),
+                                            GestureDetector(
+                                              behavior: HitTestBehavior.opaque,
+                                              child: Row(
+                                                children: [
+                                                  Container(
+                                                      height: 15,
+                                                      width: 15,
+                                                      margin: EdgeInsets.only(right: 5),
+                                                      child: Image.asset(_dataArray[index]['likeStatus']==0?'lib/images/love.png':'lib/images/love2.png')
+                                                  ),
+                                                  Container(
+                                                    child: Text('${_dataArray[index]['likeCounts']}',style: TextStyle(fontSize: 12,color: Color(0xFFEE564C),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
+                                                  )
+                                                ],
+                                                mainAxisSize: MainAxisSize.min,
+                                              ),
+                                              onTap: (){
+                                                _postAgreementData(index);
+                                              },
+                                            ),
+                                          ],
+                                        ),
+                                        padding: EdgeInsets.only(left: 5,right: 5,top: 3,bottom: 5),
+                                      ),
+                                    ],
+                                  ),
+                                ),
+                                Container(
+                                  height: 15,
+                                  margin: EdgeInsets.only(top: 10,left: 10),
+                                  decoration: BoxDecoration(
+                                    color: Colors.black12,
+                                    borderRadius: BorderRadius.all(Radius.circular(7.5)),
+                                  ),
+                                  child: Row(
+                                    mainAxisSize: MainAxisSize.min,
+                                    children: [
+                                      Container(
+                                          height: 10,
+                                          width: 15,
+                                          margin: EdgeInsets.only(right: 3),
+                                          child: Image.asset('lib/images/eyes2.png')
+                                      ),
+                                      Container(
+                                        child: Text('${_dataArray[index]['likeCounts']}',style: TextStyle(fontSize: 12,color: Colors.white,decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
+                                      )
+                                    ],
+                                  ),
+                                  padding: EdgeInsets.only(left: 8,right: 8),
+                                ),
+                                _dataArray[index]['type']==0?Container(
+                                  margin: EdgeInsets.only(left: (MediaQuery.of(context).size.width-25)/2-30,
+                                      top: (MediaQuery.of(context).size.width-25)/2/(double.parse('${_dataArray[index]['coverWidth']}')/double.parse('${_dataArray[index]['coverHeight']}'))-30),
+                                  height: 20,
+                                  width: 20,
+                                  child: Icon(Icons.play_circle_filled,color: Colors.white,),
+                                ):Container()
+                              ],
+                            ),
+                          );
+                        },
+                        staggeredTileBuilder: (index) =>StaggeredTile.fit(2),
+                        padding: EdgeInsets.only(top: 10),
+                      ),
+                    )
+                  ],
+                ),
+              )
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  _getUserInfoData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/piazza/SquareCommunity/community',parameter: {'userId':widget.authorId},isLoading: true,isToken: true);
+    if(dict!=null){
+      _refresh();
+      setState(() {
+        _dict = dict['data'];
+        _isAttention = _dict['isAttention'];
+      });
+    }
+  }
+
+  Future<void> _refresh() async{
+    _page = 1;
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/piazza/SquareCommunity/look',parameter: {'pageNo':_page,'pageSize':10,'type':_selected,'userId':widget.authorId},isLoading: false,isToken: true);
+    if(dict!=null){
+      setState(() {
+        _dataArray.addAll(dict['data']['resultList']);
+      });
+    }
+  }
+
+  Future<void> _loadMore() async{
+    _page++;
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/piazza/SquareCommunity/look',parameter: {'pageNo':_page,'pageSize':10,'type':_selected,'userId':widget.authorId},isLoading: false,isToken: true);
+    if(dict!=null){
+      setState(() {
+        _dataArray.addAll(dict['data']['resultList']);
+      });
+    }
+  }
+
+  _postAgreementData(int index) async{
+    Map request = {'type':1};
+    if(_dataArray[index]['type']==0){
+      request['squareId'] = _dataArray[index]['id'];
+    }else{
+      request['topicId'] = _dataArray[index]['id'];
+    }
+    Map dict = await ysRequestHttp(context,type: requestType.post,api: '/app/piazza/SquareCommunity/likeAndCollect',parameter: request,isLoading: false,isToken: true,refresh: (){
+
+    });
+    if(dict!=null){
+      setState(() {
+        _dataArray[index]['likeStatus'] = dict['data'];
+        if(dict['data'] == 0){
+          _dataArray[index]['likeCounts'] = int.parse('${_dataArray[index]['likeCounts']}') - 1;
+        }else{
+          _dataArray[index]['likeCounts'] = int.parse('${_dataArray[index]['likeCounts']}') + 1;
+        }
+      });
+    }
+  }
+
+  _postAuthorAttention() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/piazza/SquareCommunity/attention',parameter: {'userId':widget.authorId},isLoading: false,isToken: true,refresh: (){
+
+    });
+    if(dict!=null){
+      setState(() {
+        _isAttention = dict['data'];
+      });
+    }
+  }
+
+}

+ 122 - 0
ysairplane1/lib/code/YSBill.dart

@@ -0,0 +1,122 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSBill extends StatefulWidget {
+  @override
+  _YSBillState createState() => _YSBillState();
+}
+
+class _YSBillState extends State<YSBill> {
+  List array = ['','','','','','','','','','','','','','','',''];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '账单',
+      yschild: Column(
+        children: [
+          Container(
+            height: hsp(155),
+            padding: EdgeInsets.only(left: wsp(44),right: wsp(44),top: hsp(25),bottom: hsp(25)),
+            color: Color(0xFFF5F5F5),
+            child: Column(
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              crossAxisAlignment: CrossAxisAlignment.start,
+              children: [
+                GestureDetector(
+                  onTap: (){
+                    showModalBottomSheet(
+                      context: context,
+                      builder: (context){
+                        return YSDatePicker(
+                          choose: (value){
+                            print(value);
+                          },
+                        );
+                      }
+                    );
+                  },
+                  child: Row(
+                    children: [
+                      Text('2020年8月',style: TextStyle(fontSize: zsp(34),color: Color(0xFF131318),fontWeight: FontWeight.bold),),
+                      Icon(Icons.keyboard_arrow_down,size: 20,color: Color(0xFF131318),)
+                    ],
+                  ),
+                ),
+                Text('支出¥28987.87',style: TextStyle(fontSize: zsp(30),color: Color(0xFF898989)),),
+              ],
+            ),
+          ),
+          Container(
+            height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(155),
+            child: ListView.builder(
+              itemBuilder: (context,index){
+                return Dismissible(
+                  key: Key(UniqueKey().toString()),
+                  onDismissed: (direction) async{
+
+                  },
+                  secondaryBackground: Container(
+                    color: Color(0xFFDE4242),
+                    height: hsp(159),
+                    padding: EdgeInsets.only(right: wsp(36)),
+                    alignment: Alignment.centerRight,
+                    child: Text('删除',style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: zsp(37)),),
+                  ),
+                  background: Container(color: Colors.transparent,),
+                  direction: DismissDirection.endToStart,
+                  child: Container(
+                    height: hsp(159),
+                    padding: EdgeInsets.only(left: wsp(36),right: wsp(36),top: hsp(25)),
+                    child: Column(
+                      children: [
+                        Row(
+                          children: [
+                            Container(
+                              height: hsp(100),
+                              width: hsp(100),
+                              decoration: BoxDecoration(
+                                  color: Color(0xFFF5F5F5),
+                                  borderRadius: BorderRadius.all(Radius.circular(hsp(50)))
+                              ),
+                              child: Image.asset('lib/images/wallet.png'),
+                            ),
+                            Container(
+                              height: hsp(100),
+                              width: MediaQuery.of(context).size.width/2-10,
+                              margin: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                              child: Column(
+                                children: [
+                                  Text('支付订单-9863865386',style: TextStyle(fontSize: zsp(32),color: Color(0xFF131318)),maxLines: 1,),
+                                  Text('8月26日 13:02',style: TextStyle(fontSize: zsp(24),color: Color(0xFFA7A7A7)),)
+                                ],
+                                crossAxisAlignment: CrossAxisAlignment.start,
+                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                              ),
+                            ),
+                            Container(
+                              width: MediaQuery.of(context).size.width/2-103,
+                              child: Text('-5800.00',style: TextStyle(fontSize: zsp(35),color: Color(0xFF000000),fontWeight: FontWeight.bold),maxLines: 1,overflow: TextOverflow.ellipsis,),
+                              alignment: Alignment.centerRight,
+                            )
+                          ],
+                        ),
+                        Container(
+                          margin: EdgeInsets.only(left: wsp(147),top: hsp(24)),
+                          height: hsp(1),
+                          color: Color(0xFFF5F5F5),
+                        )
+                      ],
+                    ),
+                  ),
+                );
+              },
+              itemCount: array.length
+            ),
+          )
+        ],
+      ),
+    );
+  }
+}

+ 196 - 0
ysairplane1/lib/code/YSBind.dart

@@ -0,0 +1,196 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/code/YSTabbar.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSBind extends StatefulWidget {
+  @override
+  _YSBindState createState() => _YSBindState();
+}
+
+class _YSBindState extends State<YSBind> {
+  TextEditingController _userName = TextEditingController();
+  TextEditingController _password = TextEditingController();
+  bool _isHave = false;
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: Colors.white,
+      body: SingleChildScrollView(
+        padding: EdgeInsets.all(wsp(50)),
+        child: Container(
+          width: MediaQuery.of(context).size.width,
+          child: Column(
+            children: [
+              Container(
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(190),bottom: hsp(140)),
+                alignment: Alignment.centerLeft,
+                child: Row(
+                  children: [
+                    Container(
+                      child: GestureDetector(
+                        child: Text('新建账号',style: TextStyle(fontSize: zsp(30),color: _isHave==false?Color(0xFF3B7EF2):Color(0xFF999999)),),
+                        onTap: (){
+                          setState(() {
+                            _isHave = false;
+                          });
+                        },
+                      ),
+                      margin: EdgeInsets.only(right: wsp(50)),
+                    ),
+                    GestureDetector(
+                      child: Text('已有账号',style: TextStyle(fontSize: zsp(30),color: _isHave==true?Color(0xFF3B7EF2):Color(0xFF999999)),),
+                      onTap: (){
+                        setState(() {
+                          _isHave = true;
+                        });
+                      },
+                    )
+                  ],
+                )
+              ),
+              Container(
+                height: hsp(90),
+                padding: EdgeInsets.only(left: wsp(20),right: wsp(20)),
+                color: Color(0xFFF5F5F7),
+                child: CupertinoTextField(
+                  placeholder: '请输入账号',
+                  style: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  placeholderStyle: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  decoration: BoxDecoration(),
+                  suffix: Icon(Icons.close,color: Color(0xFF75788C),size: hsp(40),),
+                  suffixMode: OverlayVisibilityMode.editing,
+                  controller: _userName,
+                ),
+              ),
+              Container(
+                height: hsp(90),
+                padding: EdgeInsets.only(left: wsp(20),right: wsp(20)),
+                margin: EdgeInsets.only(top: hsp(50)),
+                color: Color(0xFFF5F5F7),
+                child: CupertinoTextField(
+                  placeholder: '请输入密码',
+                  style: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  placeholderStyle: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  decoration: BoxDecoration(),
+                  suffix: Icon(Icons.remove_red_eye,color: Color(0xFF75788C),size: hsp(40),),
+                  suffixMode: OverlayVisibilityMode.editing,
+                  controller: _password,
+                ),
+              ),
+              GestureDetector(
+                onTap: (){
+                  showGeneralDialog(
+                      context: context,
+                      barrierDismissible:true,
+                      barrierColor: Colors.black.withOpacity(0.6),
+                      barrierLabel: '',
+                      transitionDuration: Duration(milliseconds: 200),
+                      pageBuilder: (BuildContext context, Animation<double> animation,
+                          Animation<double> secondaryAnimation) {
+                        return Center(
+                          child: Container(
+                            height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2),
+                            width: MediaQuery.of(context).size.width-wsp(100),
+                            decoration: BoxDecoration(
+                                color: Colors.white,
+                                borderRadius: BorderRadius.all(Radius.circular(5))
+                            ),
+                            child: Column(
+                              children: [
+                                Container(
+                                  height: hsp(100),
+                                  padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                                  child: Row(
+                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                    children: [
+                                      Container(),
+                                      Text('隐私声明',style: TextStyle(fontSize: zsp(34),color: Color(0xFF242329),decoration: TextDecoration.none),),
+                                      Icon(Icons.close,size: hsp(50),color: Color(0xFF242329))
+                                    ],
+                                  ),
+                                ),
+                                Container(
+                                  height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2)-hsp(200),
+                                  width: MediaQuery.of(context).size.width-wsp(100),
+                                  padding: EdgeInsets.all(wsp(20)),
+                                  color: Color(0xFFF9F9F9),
+                                  child: Text('',style: TextStyle(fontSize: zsp(30),color: Color(0xFF242329),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                                ),
+                                Container(
+                                    height: hsp(100),
+                                    alignment: Alignment.center,
+                                    child: Row(
+                                      children: [
+                                        Container(
+                                          width: (MediaQuery.of(context).size.width-wsp(100))/2-wsp(1),
+                                          alignment: Alignment.center,
+                                          child: Text('不同意',style: TextStyle(fontSize: zsp(34),color: Color(0xFF999999),decoration: TextDecoration.none),),
+                                        ),
+                                        Container(
+                                          height: hsp(100),
+                                          width: wsp(2),
+                                          color: Color(0xFFF9F9F9),
+                                        ),
+                                        Container(
+                                          width: (MediaQuery.of(context).size.width-wsp(100))/2-wsp(1),
+                                          alignment: Alignment.center,
+                                          child: Text('同意',style: TextStyle(fontSize: zsp(34),color: Color(0xFF0079FF),decoration: TextDecoration.none),),
+                                        )
+                                      ],
+                                    )
+                                ),
+                              ],
+                            ),
+                          ),
+                        );
+                      }
+                  );
+                },
+                child: GestureDetector(
+                  onTap: (){
+                    FocusScope.of(context).unfocus();
+                    _postCreateAccountData();
+                  },
+                  child: Container(
+                    height: hsp(90),
+                    width: MediaQuery.of(context).size.width-wsp(50)*2,
+                    alignment: Alignment.center,
+                    margin: EdgeInsets.only(top: hsp(116)),
+                    decoration: BoxDecoration(
+                        color: Color(0xFF3B7EF2),
+                        borderRadius: BorderRadius.all(Radius.circular(5))
+                    ),
+                    child: Text('注册绑定',style: TextStyle(fontSize: zsp(34),color: Colors.white),),
+                  ),
+                ),
+              ),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  _postCreateAccountData() async{
+    if(_userName.text.isEmpty){
+      ysFlutterToast(context, '账号不能为空');
+      return;
+    }
+    if(_password.text.isEmpty){
+      ysFlutterToast(context, '密码不能为空');
+      return;
+    }
+    var result = await ysRequestHttpEncrypt(context,type: requestType.post,api: '/app/applets/createAccount',parameter: {'username':_userName.text,'password':_password.text},isLoading: true,isToken: true);
+    if(result!=null){
+      Navigator.pushAndRemoveUntil(context,
+        MaterialPageRoute(
+          builder: (context){
+            return YSTabbar();
+          }
+        ), (route) => false);
+    }
+  }
+}
+

+ 412 - 0
ysairplane1/lib/code/YSChangePayPass.dart

@@ -0,0 +1,412 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+import 'YSSetPayPass.dart';
+
+class YSChangeOldPayPass extends StatefulWidget {
+  @override
+  _YSChangeOldPayPassState createState() => _YSChangeOldPayPassState();
+}
+
+class _YSChangeOldPayPassState extends State<YSChangeOldPayPass> {
+  List _passArray = [];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '修改支付密码',
+      ysright: GestureDetector(
+        child: Text('忘记密码',style: TextStyle(fontSize: zsp(32),color: Color(0xFF333333)),),
+          onTap: (){
+            Navigator.of(context).push(
+              CupertinoPageRoute(
+                builder: (context){
+                  return YSSetPayPass();
+                }
+              )
+            );
+          }
+      ),
+      yschild: Stack(
+        children: [
+          Column(
+            children: [
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(150)),
+                child: Text('请输入旧的支付密码',style: TextStyle(fontSize: zsp(40),color: Color(0xFF333333),fontWeight: FontWeight.bold),),
+              ),
+              Container(
+                width: MediaQuery.of(context).size.width-hsp(100),
+                height: hsp(100),
+                margin: EdgeInsets.only(top: hsp(200)),
+                decoration: BoxDecoration(
+                    border: Border.all(color: Color(0xFF108EE9),width: 2),
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                ),
+                child: ListView.separated(
+                  itemBuilder: (context,index){
+                    return Container(
+                      height: hsp(100),
+                      width: (MediaQuery.of(context).size.width-hsp(100)-9)/6,
+                      child: Container(
+                        height: hsp(20),
+                        width: hsp(20),
+                        decoration: BoxDecoration(
+                            color: index<_passArray.length?Colors.black:Colors.transparent,
+                            borderRadius: BorderRadius.all(Radius.circular(50))
+                        ),
+                      ),
+                      alignment: Alignment.center,
+                    );
+                  },
+                  separatorBuilder: (context,index){
+                    return Container(width: 1,color: Color(0xFF9A9A9A),height: hsp(100),);
+                  },
+                  itemCount: 6,
+                  padding: EdgeInsets.all(0),
+                  scrollDirection: Axis.horizontal,
+                ),
+              ),
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                child: Text('支付密码不能是重复、连续的数字',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),),
+              ),
+            ],
+          ),
+          Container(
+              margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(432)-MediaQuery.of(context).padding.top-44),
+              width: MediaQuery.of(context).size.width,
+              decoration: BoxDecoration(
+                  color: Color(0xFF8C8C8C),
+                  border: Border(top: BorderSide(width: 1,color: Color(0xFF8C8C8C)))
+              ),
+              height: hsp(432),
+              child: GridView.builder(
+                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                    crossAxisCount: 3,
+                    mainAxisSpacing: 1,
+                    crossAxisSpacing: 1,
+                    childAspectRatio: ((MediaQuery.of(context).size.width-2)/3)/((hsp(432)-3)/4)
+                ),
+                itemBuilder: (context, index) {
+                  return GestureDetector(
+                    onTap: (){
+                      if(index==9){
+                        if(_passArray.length>0){
+                          _passArray.removeAt(_passArray.length-1);
+                        }
+                        setState(() {});
+                      }else if(index==11){
+                        if(_passArray.length==6){
+                          Navigator.of(context).push(
+                              CupertinoPageRoute(
+                                  builder: (context){
+                                    return YSChangePayPass(oldPass: _passArray.join(''),);
+                                  }
+                              )
+                          );
+                        }else{
+                          ysFlutterToast(context, '支付密码为6位数字');
+                        }
+                      }else{
+                        if(_passArray.length<6){
+                          _passArray.add(index+1);
+                          setState(() {});
+                        }
+                      }
+                    },
+                    child: Container(
+                      color: index==9||index==11?Color(0xFFD0D5DC):Colors.white,
+                      child: Text(index==9?'删除':index==10?'0':index==11?'确认':'${index+1}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),),
+                      alignment: Alignment.center,
+                    ),
+                  );
+                },
+                itemCount: 12,
+                padding: EdgeInsets.all(0),
+                physics: NeverScrollableScrollPhysics(),
+              )
+          )
+        ],
+      ),
+    );
+  }
+}
+
+class YSChangePayPass extends StatefulWidget {
+  final String oldPass;
+  const YSChangePayPass({Key key, this.oldPass}) : super(key: key);
+  @override
+  _YSChangePayPassState createState() => _YSChangePayPassState();
+}
+
+class _YSChangePayPassState extends State<YSChangePayPass> {
+  List _passArray = [];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '修改支付密码',
+      yschild: Stack(
+        children: [
+          Column(
+            children: [
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(150)),
+                child: Text('请输入新的支付密码',style: TextStyle(fontSize: zsp(40),color: Color(0xFF333333),fontWeight: FontWeight.bold),),
+              ),
+              Container(
+                width: MediaQuery.of(context).size.width-hsp(100),
+                height: hsp(100),
+                margin: EdgeInsets.only(top: hsp(200)),
+                decoration: BoxDecoration(
+                    border: Border.all(color: Color(0xFF108EE9),width: 2),
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                ),
+                child: ListView.separated(
+                  itemBuilder: (context,index){
+                    return Container(
+                      height: hsp(100),
+                      width: (MediaQuery.of(context).size.width-hsp(100)-9)/6,
+                      child: Container(
+                        height: hsp(20),
+                        width: hsp(20),
+                        decoration: BoxDecoration(
+                            color: index<_passArray.length?Colors.black:Colors.transparent,
+                            borderRadius: BorderRadius.all(Radius.circular(50))
+                        ),
+                      ),
+                      alignment: Alignment.center,
+                    );
+                  },
+                  separatorBuilder: (context,index){
+                    return Container(width: 1,color: Color(0xFF9A9A9A),height: hsp(100),);
+                  },
+                  itemCount: 6,
+                  padding: EdgeInsets.all(0),
+                  scrollDirection: Axis.horizontal,
+                ),
+              ),
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                child: Text('支付密码不能是重复、连续的数字',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),),
+              ),
+            ],
+          ),
+          Container(
+              margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(432)-MediaQuery.of(context).padding.top-44),
+              width: MediaQuery.of(context).size.width,
+              decoration: BoxDecoration(
+                  color: Color(0xFF8C8C8C),
+                  border: Border(top: BorderSide(width: 1,color: Color(0xFF8C8C8C)))
+              ),
+              height: hsp(432),
+              child: GridView.builder(
+                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                    crossAxisCount: 3,
+                    mainAxisSpacing: 1,
+                    crossAxisSpacing: 1,
+                    childAspectRatio: ((MediaQuery.of(context).size.width-2)/3)/((hsp(432)-3)/4)
+                ),
+                itemBuilder: (context, index) {
+                  return GestureDetector(
+                    onTap: (){
+                      if(index==9){
+                        if(_passArray.length>0){
+                          _passArray.removeAt(_passArray.length-1);
+                        }
+                        setState(() {});
+                      }else if(index==11){
+                        if(_passArray.length==6){
+                          Navigator.of(context).push(
+                              CupertinoPageRoute(
+                                  builder: (context){
+                                    return YSChangePayPassAgain(oldPass: widget.oldPass,pass: _passArray.join(''),);
+                                  }
+                              )
+                          );
+                        }else{
+                          ysFlutterToast(context, '支付密码为6位数字');
+                        }
+                      }else{
+                        if(_passArray.length<6){
+                          _passArray.add(index+1);
+                          setState(() {});
+                        }
+                      }
+                    },
+                    child: Container(
+                      color: index==9||index==11?Color(0xFFD0D5DC):Colors.white,
+                      child: Text(index==9?'删除':index==10?'0':index==11?'确认':'${index+1}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),),
+                      alignment: Alignment.center,
+                    ),
+                  );
+                },
+                itemCount: 12,
+                padding: EdgeInsets.all(0),
+                physics: NeverScrollableScrollPhysics(),
+              )
+          )
+        ],
+      ),
+    );
+  }
+}
+
+class YSChangePayPassAgain extends StatefulWidget {
+  final String oldPass,pass;
+  const YSChangePayPassAgain({Key key, this.oldPass, this.pass}) : super(key: key);
+  @override
+  _YSChangePayPassAgainState createState() => _YSChangePayPassAgainState();
+}
+
+class _YSChangePayPassAgainState extends State<YSChangePayPassAgain> {
+  List _passArray = [];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '修改支付密码',
+      yschild: Stack(
+        children: [
+          Column(
+            children: [
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(150)),
+                child: Text('请再次填写以确认',style: TextStyle(fontSize: zsp(40),color: Color(0xFF333333),fontWeight: FontWeight.bold),),
+              ),
+              Container(
+                width: MediaQuery.of(context).size.width-hsp(100),
+                height: hsp(100),
+                margin: EdgeInsets.only(top: hsp(200)),
+                decoration: BoxDecoration(
+                    border: Border.all(color: Color(0xFF108EE9),width: 2),
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                ),
+                child: ListView.separated(
+                  itemBuilder: (context,index){
+                    return Container(
+                      height: hsp(100),
+                      width: (MediaQuery.of(context).size.width-hsp(100)-9)/6,
+                      child: Container(
+                        height: hsp(20),
+                        width: hsp(20),
+                        decoration: BoxDecoration(
+                            color: index<_passArray.length?Colors.black:Colors.transparent,
+                            borderRadius: BorderRadius.all(Radius.circular(50))
+                        ),
+                      ),
+                      alignment: Alignment.center,
+                    );
+                  },
+                  separatorBuilder: (context,index){
+                    return Container(width: 1,color: Color(0xFF9A9A9A),height: hsp(100),);
+                  },
+                  itemCount: 6,
+                  padding: EdgeInsets.all(0),
+                  scrollDirection: Axis.horizontal,
+                ),
+              ),
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                child: Text('支付密码不能是重复、连续的数字',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),),
+              ),
+              GestureDetector(
+                onTap: (){
+                  if(_passArray.length==6){
+                    _postPayPassData();
+                  }else{
+                    ysFlutterToast(context, '支付密码为6位数字');
+                  }
+                },
+                child: Container(
+                  height: hsp(90),
+                  width: MediaQuery.of(context).size.width-wsp(50)*2,
+                  alignment: Alignment.center,
+                  margin: EdgeInsets.only(top: hsp(80)),
+                  decoration: BoxDecoration(
+                      color: Color(0xFF3B7EF2),
+                      borderRadius: BorderRadius.all(Radius.circular(5))
+                  ),
+                  child: Text('完成',style: TextStyle(fontSize: zsp(34),color: Colors.white),),
+                ),
+              ),
+            ],
+          ),
+          Container(
+              margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(432)-MediaQuery.of(context).padding.top-44),
+              width: MediaQuery.of(context).size.width,
+              decoration: BoxDecoration(
+                  color: Color(0xFF8C8C8C),
+                  border: Border(top: BorderSide(width: 1,color: Color(0xFF8C8C8C)))
+              ),
+              height: hsp(432),
+              child: GridView.builder(
+                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                    crossAxisCount: 3,
+                    mainAxisSpacing: 1,
+                    crossAxisSpacing: 1,
+                    childAspectRatio: ((MediaQuery.of(context).size.width-2)/3)/((hsp(432)-3)/4)
+                ),
+                itemBuilder: (context, index) {
+                  return GestureDetector(
+                    onTap: (){
+                      if(index==9){
+                        if(_passArray.length>0){
+                          _passArray.removeAt(_passArray.length-1);
+                        }
+                        setState(() {});
+                      }else if(index==11){
+                        if(_passArray.length==6){
+                          _postPayPassData();
+                        }else{
+                          ysFlutterToast(context, '支付密码为6位数字');
+                        }
+                      }else{
+                        if(_passArray.length<6){
+                          _passArray.add(index+1);
+                          setState(() {});
+                        }
+                      }
+                    },
+                    child: Container(
+                      color: index==9||index==11?Color(0xFFD0D5DC):Colors.white,
+                      child: Text(index==9?'删除':index==10?'0':index==11?'确认':'${index+1}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),),
+                      alignment: Alignment.center,
+                    ),
+                  );
+                },
+                itemCount: 12,
+                padding: EdgeInsets.all(0),
+                physics: NeverScrollableScrollPhysics(),
+              )
+          )
+
+        ],
+      ),
+    );
+  }
+
+  _postPayPassData() async{
+    if(widget.pass!=_passArray.join('')){
+      ysFlutterToast(context, '新密码两次输入不一致');
+      return;
+    }
+    var dict = await ysRequestHttpEncrypt(context,type: requestType.post,api: '/app/applets/balance/resetPayPassword',
+        parameter: {'oldPassword':widget.oldPass,'password':_passArray.join('')},isLoading: false,isToken: true);
+    if(dict!=null){
+      Navigator.pop(context);
+      Navigator.pop(context);
+      Navigator.pop(context);
+    }
+  }
+}

+ 78 - 0
ysairplane1/lib/code/YSChooseLocation.dart

@@ -0,0 +1,78 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSChooseLocation extends StatefulWidget {
+  @override
+  _YSChooseLocationState createState() => _YSChooseLocationState();
+}
+
+class _YSChooseLocationState extends State<YSChooseLocation> {
+  int _index = 9999;
+  bool _isChoose = false;
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '选择登机地址',
+      yschild: Stack(
+        children: [
+          GestureDetector(
+            onTap: (){
+              setState(() {
+                _isChoose = true;
+              });
+            },
+            child: Container(
+              height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+              width: MediaQuery.of(context).size.width,
+              color: Colors.lightGreen,
+            ),
+          ),
+          if(_isChoose==true)Container(
+            margin: EdgeInsets.only(top: MediaQuery.of(context).size.height*0.4),
+            height: MediaQuery.of(context).size.height*0.6-MediaQuery.of(context).padding.top-44,
+            decoration: BoxDecoration(
+              color: Colors.white,
+              borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+            ),
+            child: ListView.separated(
+              itemBuilder: (context,index){
+                return GestureDetector(
+                  onTap: (){
+                    setState(() {
+                      _index = index;
+                    });
+                    Navigator.of(context).pop({'display':'西安市长安区','location':'34,108'});
+                  },
+                  behavior: HitTestBehavior.opaque,
+                  child: Container(
+                    padding: EdgeInsets.all(hsp(30)),
+                    child: Row(
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                      children: [
+                        Column(
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          children: [
+                            Text('西安市长安区',style: TextStyle(fontSize: zsp(30),color: Colors.black,fontWeight: FontWeight.bold),),
+                            Text('樱花广场',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),)
+                          ],
+                        ),
+                        Icon(Icons.check,color: _index==index?Color(0xFF007EFF):Colors.transparent,size: hsp(50),)
+                      ],
+                    ),
+                  ),
+                );
+              },
+              separatorBuilder: (context,index){
+                return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F4),);
+              },
+              itemCount: 10,
+              padding: EdgeInsets.all(0),
+            ),
+          ),
+        ],
+      ),
+    );
+  }
+}

+ 99 - 0
ysairplane1/lib/code/YSChoosePlane.dart

@@ -0,0 +1,99 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_easyrefresh/easy_refresh.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSChoosePlane extends StatefulWidget {
+  final int type;
+  const YSChoosePlane({Key key, this.type}) : super(key: key);
+  @override
+  _YSChoosePlaneState createState() => _YSChoosePlaneState();
+}
+
+class _YSChoosePlaneState extends State<YSChoosePlane> {
+  int _index = 9999;
+  int _page = 1;
+  List _dataArray = [];
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _refreshData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '飞机类型',
+      yschild: Container(
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        child: EasyRefresh(
+          onRefresh: _refreshData,
+          onLoad: _loadMoreData,
+          header: TaurusHeader(
+
+          ),
+          footer: TaurusFooter(
+
+          ),
+          child: ListView.separated(
+            itemBuilder: (context,index){
+              return GestureDetector(
+                onTap: (){
+                  Navigator.of(context).pop(_dataArray[index]);
+                },
+                behavior: HitTestBehavior.opaque,
+                child: Container(
+                  padding: EdgeInsets.all(hsp(30)),
+                  color: Colors.white,
+                  child: Row(
+                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    children: [
+                      Container(
+                        width: MediaQuery.of(context).size.width-hsp(150),
+                        child: Column(
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          children: [
+                            Text('${_dataArray[index]['partnerName']}',style: TextStyle(fontSize: zsp(30),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                            Text('${_dataArray[index]['model']} | 到达准点率${_dataArray[index]['seatNum']}% | 最多容纳${_dataArray[index]['seatNum']}人 ',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                          ],
+                        ),
+                      ),
+                      Icon(Icons.check,color: _index==index?Color(0xFF007EFF):Colors.transparent,size: hsp(50),)
+                    ],
+                  ),
+                ),
+              );
+            },
+            separatorBuilder: (context,index){
+              return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),);
+            },
+            itemCount: _dataArray.length,
+            padding: EdgeInsets.all(0),
+          ),
+        ),
+      ),
+    );
+  }
+  Future<void> _refreshData() async{
+    _page = 1;
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneinformation/list',parameter: {'category':widget.type,'pageNo':_page,'pageSize':10,'type':7},isLoading: false,isToken: false);
+    if(dict!=null){
+      setState(() {
+        _dataArray = dict['data']['resultList'];
+      });
+    }
+  }
+
+  Future<void> _loadMoreData() async{
+    _page++;
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneinformation/list',parameter: {'category':widget.type,'pageNo':_page,'pageSize':10,'type':7},isLoading: false,isToken: false);
+    if(dict!=null){
+      setState(() {
+        _dataArray.add(dict['data']['resultList']);
+      });
+    }
+  }
+}

+ 361 - 0
ysairplane1/lib/code/YSCity.dart

@@ -0,0 +1,361 @@
+import 'dart:convert';
+import 'dart:math';
+
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+class YSCity extends StatefulWidget {
+  @override
+  _YSCityState createState() => _YSCityState();
+}
+
+class _YSCityState extends State<YSCity> {
+  List _historyList = [];
+  List _hotList = [];
+  List _searchList = [];
+  List _dataArray = [];
+  TextEditingController _searchStr = TextEditingController();
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getHotCityData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: Color(0xFFF0F0F1),
+      appBar: CupertinoNavigationBar(
+        backgroundColor: Colors.white,
+        leading: GestureDetector(child: Icon(Icons.arrow_back_ios,size: 15,color: Color(0xFF000000),),onTap: (){Navigator.pop(context);},),
+        border: Border(),
+        middle: Text('选择城市',style: TextStyle(fontSize: zsp(36),color: Color(0xFF000000)),),
+      ),
+      body: SingleChildScrollView(
+        child: Container(
+          width: MediaQuery.of(context).size.width,
+          child: Column(
+            children: [
+              Container(
+                height: hsp(88),
+                color: Color(0xFF007AFF),
+                alignment: Alignment.center,
+                child: Container(
+                  height: hsp(66),
+                  width: MediaQuery.of(context).size.width-wsp(30),
+                  padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                  decoration: BoxDecoration(
+                    color: Colors.white,
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                  ),
+                  child: CupertinoTextField(
+                    placeholder: '搜索城市或者国家',
+                    placeholderStyle: TextStyle(fontSize: zsp(28),color: Color(0xFF545454)),
+                    style: TextStyle(fontSize: zsp(28),color: Color(0xFF545454)),
+                    prefix: Icon(Icons.search,size: hsp(40),color: Color(0xFF8E8E93),),
+                    suffix: GestureDetector(child: Icon(Icons.close,size: hsp(40),color: Color(0xFF8E8E93),),onTap: (){_searchStr.text = '';},),
+                    suffixMode: OverlayVisibilityMode.editing,
+                    controller: _searchStr,
+                    padding: EdgeInsets.all(0),
+                    decoration: BoxDecoration(),
+                    onChanged: (value){
+                      setState(() {});
+                    },
+                    textInputAction: TextInputAction.search,
+                  ),
+                ),
+              ),
+              _searchStr.text.isNotEmpty? Container(
+                height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(88),
+                child: ListView.separated(
+                  itemBuilder: (context,index){
+                    return GestureDetector(
+                      onTap: (){
+                        Map city = _siftCity()[index];
+                        List indexList = [];
+                        for(int i = 0;i<_historyList.length;i++){
+                          if(_historyList[i]['display']==city['display']){
+                            indexList.add(i);
+                          }
+                        }
+                        indexList.forEach((element) {
+                          _historyList.removeAt(element);
+                        });
+                        _historyList.insert(0, city);
+                        SharedPreferences.getInstance().then((prefer){
+                          String historyStr = jsonEncode(_historyList);
+                          prefer.setString('cityHistory', historyStr);
+                          Navigator.of(context).pop(city);
+                        });
+                      },
+                      child: Container(
+                          color: Colors.white,
+                          height: hsp(100),
+                          padding: EdgeInsets.only(left: wsp(40),right: wsp(40)),
+                          alignment: Alignment.centerLeft,
+                          child: Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              indicateString('${_siftCity()[index]['display']}', _searchStr.text, _siftCity()[index]['airplanename']!=null?_siftCity()[index]['airplanename']:''),
+                              Icon(Icons.keyboard_arrow_right,size: hsp(40),color: Color(0xFFA4A5A5),)
+                            ],
+                          )
+                      ),
+                    );
+                  },
+                  separatorBuilder: (context,index){
+                    return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),);
+                  },
+                  itemCount: _siftCity().length,
+                ),
+              ):Container(
+                child: Row(
+                  children: [
+                    Column(
+                      children: [
+                        Container(
+                          height: hsp(85),
+                          color: Colors.white,
+                          width: MediaQuery.of(context).size.width/2,
+                          alignment: Alignment.center,
+                          child: Text('国内城市',style: TextStyle(fontSize: zsp(30),color: Color(0xFF444444)),),
+                        ),
+                        Container(
+                          height: hsp(3),
+                          color: Color(0xFF007AFF),
+                          width: wsp(133),
+                        )
+                      ],
+                    ),
+                    Column(
+                      children: [
+                        Container(
+                          height: hsp(88),
+                          color: Colors.white,
+                          width: MediaQuery.of(context).size.width/2,
+                          alignment: Alignment.center,
+                          child: Text('国际/中国港澳台',style: TextStyle(fontSize: zsp(30),color: Color(0xFF444444)),),
+                        ),
+                        Container(
+                          height: hsp(3),
+                          color: Colors.transparent,
+                          width: wsp(133),
+                        )
+                      ],
+                    )
+                  ],
+                ),
+              ),
+              Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  Container(
+                    child: Row(
+                      children: [
+                        Text('定位/历史',style: TextStyle(fontSize: zsp(24),color: Color(0xFF9A9A9A)),),
+                        GestureDetector(
+                          child: Icon(Icons.delete,color: Color(0xFF9A9A9A),size: hsp(40),),
+                          onTap: (){
+                            SharedPreferences.getInstance().then((prefer){
+                              _historyList.clear();
+                              String historyStr = jsonEncode(_historyList);
+                              prefer.setString('cityHistory', historyStr);
+                              setState(() {});
+                            });
+                          },
+                        )
+                      ],
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    ),
+                    padding: EdgeInsets.only(left: wsp(24),right: wsp(24),top: hsp(34),bottom: hsp(10)),
+                    width: MediaQuery.of(context).size.width,
+                  ),
+                  Container(
+                    margin: EdgeInsets.only(left: zsp(8)),
+                    child: Wrap(
+                      alignment: WrapAlignment.start,
+                      children: <Widget>[
+                        for (int i =0;i<_historyList.length+1;i++ ) GestureDetector(
+                          behavior: HitTestBehavior.opaque,
+                          onTap: (){
+                            if(i>0){
+                              Map city = _historyList[i-1];
+                              _historyList.remove(city);
+                              _historyList.insert(0, city);
+                              SharedPreferences.getInstance().then((prefer){
+                                String historyStr = jsonEncode(_historyList);
+                                prefer.setString('cityHistory', historyStr);
+                                Navigator.of(context).pop(city);
+                              });
+                            }
+                          },
+                          child: Container(
+                            margin: EdgeInsets.symmetric(vertical: hsp(16), horizontal: hsp(16)),
+                            decoration: BoxDecoration(
+                              color: Colors.white,
+                              borderRadius: BorderRadius.all(Radius.circular(5))
+                            ),
+                            padding: EdgeInsets.only(left: wsp(40), right: wsp(40),top: hsp(20),bottom: hsp(20)),
+                            child: i==0?Row(
+                              mainAxisSize: MainAxisSize.min,
+                              children: [
+                                Icon(Icons.location_on,color: Color(0xFF007AFF),size: hsp(40),),
+                                Text(' 西安', style: TextStyle(fontSize: zsp(26),color: Color(0xFF16181A)), textAlign: TextAlign.center,),
+                              ],
+                            ):Text('${_historyList[i-1]['display']}', style: TextStyle(fontSize: zsp(26),color: Color(0xFF16181A)), textAlign: TextAlign.center,),
+                          ),
+                        )
+                      ]
+                    ),
+                  ),
+                  Container(
+                    child: Text('热门城市',style: TextStyle(fontSize: zsp(24),color: Color(0xFF9A9A9A)),),
+                    padding: EdgeInsets.only(left: wsp(24),right: wsp(24),top: hsp(34),bottom: hsp(10)),
+                    width: MediaQuery.of(context).size.width,
+                  ),
+                  Container(
+                    margin: EdgeInsets.only(bottom: hsp(10),left: zsp(8)),
+                    child: Wrap(
+                        alignment: WrapAlignment.start,
+                        children: <Widget>[
+                          for (Map item in _hotList) GestureDetector(
+                            behavior: HitTestBehavior.opaque,
+                            onTap: (){
+                              Map city = item;
+                              List indexList = [];
+                              for(int i = 0;i<_historyList.length;i++){
+                                if(_historyList[i]['display']==city['display']){
+                                  indexList.add(i);
+                                }
+                              }
+                              indexList.forEach((element) {
+                                _historyList.removeAt(element);
+                              });
+                              _historyList.insert(0, city);
+                              SharedPreferences.getInstance().then((prefer){
+                                String historyStr = jsonEncode(_historyList);
+                                prefer.setString('cityHistory', historyStr);
+                                Navigator.of(context).pop(city);
+                              });
+                            },
+                            child: Container(
+                              margin: EdgeInsets.symmetric(vertical: hsp(16), horizontal: hsp(16)),
+                              decoration: BoxDecoration(
+                                color: Colors.white,
+                                borderRadius: BorderRadius.all(Radius.circular(5))
+                              ),
+                              padding: EdgeInsets.only(left: wsp(40), right: wsp(40),top: hsp(20),bottom: hsp(20)),
+                              child: Text('${item['display']}', style: TextStyle(fontSize: zsp(26),color: Color(0xFF16181A)), textAlign: TextAlign.center,),
+                            ),
+                          )
+                        ]
+                    ),
+                  )
+                ],
+              ),
+              Container(
+                color: Colors.white,
+                child: ListView.separated(
+                  shrinkWrap: true,
+                  itemBuilder: (context,index){
+                    return Column(
+                      children: [
+                        Container(
+                          color: Colors.white,
+                          height: hsp(60),
+                          padding: EdgeInsets.only(left: wsp(30)),
+                          alignment: Alignment.centerLeft,
+                          child: Text('${_dataArray[index]['word']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFFA4A5A5),fontWeight: FontWeight.bold),),
+                        ),
+                        Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),),
+                        ListView.separated(
+                          itemBuilder: (context,indexSub){
+                            return GestureDetector(
+                              behavior: HitTestBehavior.opaque,
+                              onTap: (){
+                                Map city = _dataArray[index]['mapList'][indexSub];
+                                List indexList = [];
+                                for(int i = 0;i<_historyList.length;i++){
+                                  if(_historyList[i]['display']==city['display']){
+                                    indexList.add(i);
+                                  }
+                                }
+                                indexList.forEach((element) {
+                                  _historyList.removeAt(element);
+                                });
+                                _historyList.insert(0, city);
+                                SharedPreferences.getInstance().then((prefer){
+                                  String historyStr = jsonEncode(_historyList);
+                                  prefer.setString('cityHistory', historyStr);
+                                  Navigator.of(context).pop(city);
+                                });
+                              },
+                              child: Container(
+                                color: Colors.white,
+                                height: hsp(100),
+                                padding: EdgeInsets.only(left: wsp(40)),
+                                alignment: Alignment.centerLeft,
+                                child: Text('${_dataArray[index]['mapList'][indexSub]['display']}',style: TextStyle(fontSize: zsp(32),color: Color(0xFF16181A)),),
+                              ),
+                            );
+                          },
+                          separatorBuilder: (context,indexSub){
+                            return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),);
+                          },
+                          itemCount: (_dataArray[index]['mapList']).length,
+                          shrinkWrap: true,
+                          physics: NeverScrollableScrollPhysics(),
+                        )
+                      ],
+                    );
+                  },
+                  separatorBuilder: (context,index){
+                    return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),);
+                  },
+                  itemCount: _dataArray.length,
+                  physics: NeverScrollableScrollPhysics(),
+                ),
+              )
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  _getHotCityData() async{
+    SharedPreferences prefer = await SharedPreferences.getInstance();
+    String historyStr = prefer.getString('cityHistory')??'[]';
+    _historyList = jsonDecode(historyStr);
+    setState(() {});
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/poi/list',parameter: {},isLoading: false,isToken: false);
+    if(dict!=null){
+      _dataArray = dict['data'];
+      _dataArray.forEach((element) {
+        List array = element['mapList'];
+        array.forEach((elementSub) {
+          if(elementSub['isHot']=='1'){
+            _hotList.add(elementSub);
+          }
+          _searchList.add(elementSub);
+        });
+      });
+      print('_hotList = $_hotList');
+      setState(() {});
+    }
+  }
+
+  List _siftCity() {
+    List array = [];
+    _searchList.forEach((element) {
+      if(((element['display']).split(_searchStr.text)).length>1){
+        array.add(element);
+      }
+    });
+    return array;
+  }
+}

+ 475 - 0
ysairplane1/lib/code/YSCodeLogin.dart

@@ -0,0 +1,475 @@
+import 'dart:async';
+
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/gestures.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:ysairplane/code/YSBind.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+class YSCodeLogin extends StatefulWidget {
+  @override
+  _YSCodeLoginState createState() => _YSCodeLoginState();
+}
+
+class _YSCodeLoginState extends State<YSCodeLogin> {
+  TextEditingController _phoneStr = TextEditingController();
+  TextEditingController _codeStr = TextEditingController();
+  int _number = 60;
+  Timer _timer;
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: Colors.white,
+      body: SingleChildScrollView(
+        padding: EdgeInsets.all(wsp(50)),
+        child: Container(
+          width: MediaQuery.of(context).size.width,
+          child: Column(
+            children: [
+              Container(
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
+                alignment: Alignment.centerLeft,
+                child: GestureDetector(
+                  onTap: (){
+                    Navigator.of(context).pop();
+                  },
+                  child: Icon(Icons.close,size: hsp(50),color: Color(0xFF333333),),
+                )
+              ),
+              Container(
+                margin: EdgeInsets.only(top: hsp(70)),
+                child: Row(
+                  children: [
+                    Container(
+                      height: hsp(120),
+                      width: hsp(120),
+                      margin: EdgeInsets.only(right: wsp(50)),
+                      decoration: BoxDecoration(
+                          color: Colors.lightBlue,
+                          borderRadius: BorderRadius.all(Radius.circular(hsp(24)))
+                      ),
+                    ),
+                    Column(
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                      children: [
+                        Text('Hello!',style: TextStyle(fontSize: zsp(60),color: Color(0xFF242329)),),
+                        Text('欢迎来到通用航空',style: TextStyle(fontSize: zsp(29),color: Color(0xFF242329)),),
+                      ],
+                    )
+                  ],
+                ),
+              ),
+              Container(
+                height: hsp(90),
+                padding: EdgeInsets.only(left: wsp(20),right: wsp(20)),
+                margin: EdgeInsets.only(top: hsp(138)),
+                color: Color(0xFFF5F5F7),
+                child: CupertinoTextField(
+                  placeholder: '请输入手机号',
+                  style: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  placeholderStyle: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  decoration: BoxDecoration(),
+                  suffix: GestureDetector(child: Text(_number==60?'获取验证码':'$_number秒',style: TextStyle(fontSize: zsp(30),color: Color(0xFF0079FF)),),onTap: (){if(_number==60)_getCodeData();},),
+                  prefix: Container(
+                    padding: EdgeInsets.only(right: wsp(20)),
+                    margin: EdgeInsets.only(right: wsp(20)),
+                    height: hsp(40),
+                    alignment: Alignment.center,
+                    child: Text('+86',style: TextStyle(fontSize: zsp(32),color: Color(0xFF1E1721)),),
+                    decoration: BoxDecoration(
+                      border: Border(right: BorderSide(color: Color(0xFFCDCDD2)))
+                    ),
+                  ),
+                  keyboardType: TextInputType.phone,
+                  controller: _phoneStr,
+                ),
+              ),
+              Container(
+                height: hsp(90),
+                padding: EdgeInsets.only(left: wsp(20),right: wsp(20)),
+                margin: EdgeInsets.only(top: hsp(50)),
+                color: Color(0xFFF5F5F7),
+                child: CupertinoTextField(
+                  placeholder: '请输入短信验证码',
+                  style: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  placeholderStyle: TextStyle(fontSize: zsp(30),color: Color(0xFF75788C)),
+                  decoration: BoxDecoration(),
+                  suffix: Icon(Icons.close,color: Color(0xFF75788C),size: hsp(40),),
+                  suffixMode: OverlayVisibilityMode.editing,
+                  controller: _codeStr,
+                ),
+              ),
+              Container(
+                alignment: Alignment.centerLeft,
+                margin: EdgeInsets.only(top: hsp(36)),
+                child: Text('忘记密码?',style: TextStyle(fontSize: zsp(26),color: Color(0xFF75788C)),),
+              ),
+              GestureDetector(
+                onTap: (){
+                  showGeneralDialog(
+                      context: context,
+                      barrierDismissible:true,
+                      barrierColor: Colors.black.withOpacity(0.6),
+                      barrierLabel: '',
+                      transitionDuration: Duration(milliseconds: 200),
+                      pageBuilder: (BuildContext context, Animation<double> animation,
+                          Animation<double> secondaryAnimation) {
+                        return Center(
+                          child: Container(
+                            height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2),
+                            width: MediaQuery.of(context).size.width-wsp(100),
+                            decoration: BoxDecoration(
+                                color: Colors.white,
+                                borderRadius: BorderRadius.all(Radius.circular(5))
+                            ),
+                            child: Column(
+                              children: [
+                                Container(
+                                  height: hsp(100),
+                                  padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                                  child: Row(
+                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                    children: [
+                                      Container(),
+                                      Text('隐私声明',style: TextStyle(fontSize: zsp(34),color: Color(0xFF242329),decoration: TextDecoration.none),),
+                                      Icon(Icons.close,size: hsp(50),color: Color(0xFF242329))
+                                    ],
+                                  ),
+                                ),
+                                Container(
+                                  height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2)-hsp(200),
+                                  width: MediaQuery.of(context).size.width-wsp(100),
+                                  padding: EdgeInsets.all(wsp(20)),
+                                  color: Color(0xFFF9F9F9),
+                                  child: Text('',style: TextStyle(fontSize: zsp(30),color: Color(0xFF242329),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                                ),
+                                Container(
+                                    height: hsp(100),
+                                    alignment: Alignment.center,
+                                    child: Row(
+                                      children: [
+                                        Container(
+                                          width: (MediaQuery.of(context).size.width-wsp(100))/2-wsp(1),
+                                          alignment: Alignment.center,
+                                          child: Text('不同意',style: TextStyle(fontSize: zsp(34),color: Color(0xFF999999),decoration: TextDecoration.none),),
+                                        ),
+                                        Container(
+                                          height: hsp(100),
+                                          width: wsp(2),
+                                          color: Color(0xFFF9F9F9),
+                                        ),
+                                        Container(
+                                          width: (MediaQuery.of(context).size.width-wsp(100))/2-wsp(1),
+                                          alignment: Alignment.center,
+                                          child: Text('同意',style: TextStyle(fontSize: zsp(34),color: Color(0xFF0079FF),decoration: TextDecoration.none),),
+                                        )
+                                      ],
+                                    )
+                                ),
+                              ],
+                            ),
+                          ),
+                        );
+                      }
+                  );
+                },
+                child: GestureDetector(
+                  onTap: (){
+                    _postLoginData();
+                  },
+                  child: Container(
+                    height: hsp(90),
+                    width: MediaQuery.of(context).size.width-wsp(50)*2,
+                    alignment: Alignment.center,
+                    margin: EdgeInsets.only(top: hsp(54)),
+                    decoration: BoxDecoration(
+                        color: Color(0xFF3B7EF2),
+                        borderRadius: BorderRadius.all(Radius.circular(5))
+                    ),
+                    child: Text('登录',style: TextStyle(fontSize: zsp(34),color: Colors.white),),
+                  ),
+                ),
+              ),
+              Container(
+                margin: EdgeInsets.only(top: hsp(150)),
+                width: MediaQuery.of(context).size.width-wsp(50)*2,
+                child: Row(
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Container(
+                      width: wsp(200),
+                      height: hsp(2),
+                      decoration: BoxDecoration(
+                        gradient: const LinearGradient(
+                            colors: [Colors.white,Color(0xFFB4B4B4)]),
+                      ),
+                    ),
+                    Text('授权登录/注册',style: TextStyle(fontSize: zsp(29),color: Color(0xFF242329)),),
+                    Container(
+                      width: wsp(200),
+                      height: hsp(2),
+                      decoration: BoxDecoration(
+                        gradient: const LinearGradient(
+                            colors: [Color(0xFFB4B4B4),Colors.white]),
+                      ),
+                    ),
+                  ],
+                ),
+              ),
+              Container(
+                margin: EdgeInsets.only(top: hsp(60)),
+                width: MediaQuery.of(context).size.width-wsp(190)*2,
+                child: Row(
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    Column(
+                      children: [
+                        Container(
+                          height: hsp(90),
+                          width: wsp(90),
+                          margin: EdgeInsets.only(bottom: hsp(20)),
+                          child: Image.asset('lib/images/wexinLogo.png'),
+                        ),
+                        Text('微信',style: TextStyle(fontSize: zsp(29),color: Color(0xFF242329)),),
+                      ],
+                    ),
+                    Column(
+                      children: [
+                        Container(
+                          height: hsp(90),
+                          width: wsp(90),
+                          margin: EdgeInsets.only(bottom: hsp(20)),
+                          child: Image.asset('lib/images/aliLogo.png'),
+                        ),
+                        Text('支付宝',style: TextStyle(fontSize: zsp(29),color: Color(0xFF242329)),),
+                      ],
+                    )
+                  ],
+                ),
+              ),
+              Container(
+                margin: EdgeInsets.only(top: hsp(80)),
+                child: RichText(
+                  textAlign: TextAlign.center,
+                  strutStyle: StrutStyle(forceStrutHeight: true, height: hsp(1), leading: 1),
+                  text: TextSpan(
+                      text: '如您登陆时暂无注册,我们将自动为您注册新账号\n登录即代表您已同意',
+                      style: TextStyle(fontSize: zsp(22),color: Color(0xFF999999)),
+                      children: [
+                        TextSpan(
+                            text: '《同意航空用户服务协议》',
+                            style: TextStyle(color: Color(0xFF3B7EF2),fontWeight: FontWeight.bold),
+                            recognizer: TapGestureRecognizer()..onTap = (){
+                              showGeneralDialog(
+                                  context: context,
+                                  barrierDismissible:true,
+                                  barrierColor: Colors.black.withOpacity(0.6),
+                                  barrierLabel: '',
+                                  transitionDuration: Duration(milliseconds: 200),
+                                  pageBuilder: (BuildContext context, Animation<double> animation,
+                                      Animation<double> secondaryAnimation) {
+                                    return Center(
+                                      child: Container(
+                                        height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2),
+                                        width: MediaQuery.of(context).size.width-wsp(100),
+                                        decoration: BoxDecoration(
+                                            color: Colors.white,
+                                            borderRadius: BorderRadius.all(Radius.circular(5))
+                                        ),
+                                        child: Column(
+                                          children: [
+                                            Container(
+                                              height: hsp(100),
+                                              padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                                              child: Row(
+                                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                                children: [
+                                                  Container(),
+                                                  Text('服务协议',style: TextStyle(fontSize: zsp(34),color: Color(0xFF242329),decoration: TextDecoration.none),),
+                                                  Icon(Icons.close,size: hsp(50),color: Color(0xFF242329))
+                                                ],
+                                              ),
+                                            ),
+                                            Container(
+                                              height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2)-hsp(200),
+                                              width: MediaQuery.of(context).size.width-wsp(100),
+                                              padding: EdgeInsets.all(wsp(20)),
+                                              color: Color(0xFFF9F9F9),
+                                              child: Text('',style: TextStyle(fontSize: zsp(30),color: Color(0xFF242329),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                                            ),
+                                            Container(
+                                              height: hsp(100),
+                                              alignment: Alignment.center,
+                                              child: Text('我知道了',style: TextStyle(fontSize: zsp(34),color: Color(0xFF0079FF),decoration: TextDecoration.none),),
+                                            ),
+                                          ],
+                                        ),
+                                      ),
+                                    );
+                                  }
+                              );
+                            }
+                        )
+                      ]
+                  ),
+                ),
+              )
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+  _postLoginData() async{
+    FocusScope.of(context).unfocus();
+    if(_phoneStr.text.isEmpty){
+      ysFlutterToast(context, '手机号码不能为空');
+      return;
+    }
+    if(isChinaPhoneLegal(_phoneStr.text)==false){
+      ysFlutterToast(context, '手机号码格式不正确');
+      return;
+    }
+    if(_codeStr.text.isEmpty){
+      ysFlutterToast(context, '验证码不能为空');
+      return;
+    }
+    Map dict = await ysRequestHttpEncrypt(context,type: requestType.post,api: '/app/applets/verificationCode',parameter: {'phone':_phoneStr.text,'verificationCode':_codeStr.text},isLoading: false);
+    if(dict!=null){
+      SharedPreferences prefer = await SharedPreferences.getInstance();
+      prefer.setString('token', dict['token']);
+      prefer.setString('name', dict['nickname']);
+      prefer.setString('phone', dict['phoneNumber']);
+      _getPrivacyAgreementData();
+    }
+  }
+
+  _getPrivacyAgreementData() async{
+    SharedPreferences prefer = await SharedPreferences.getInstance();
+    if(prefer.getBool('isRead')==true){
+      Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(
+          builder: (context){
+            return YSBind();
+          }
+      ), (route) => false);
+      return;
+    }
+    var respond = await ysRequestHttp(context, type: requestType.get, api: '/app/applets/dic/dtDic/getPrivacyAgreement', parameter: {},isLoading: false);
+    if(respond!=null){
+      showGeneralDialog(
+          context: context,
+          barrierDismissible:true,
+          barrierColor: Colors.black.withOpacity(0.6),
+          barrierLabel: '',
+          transitionDuration: Duration(milliseconds: 200),
+          pageBuilder: (BuildContext context, Animation<double> animation,
+              Animation<double> secondaryAnimation) {
+            return Center(
+              child: Container(
+                height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2),
+                width: MediaQuery.of(context).size.width-wsp(100),
+                decoration: BoxDecoration(
+                    color: Colors.white,
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                ),
+                child: Column(
+                  children: [
+                    Container(
+                      height: hsp(100),
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                      child: Row(
+                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                        children: [
+                          Container(),
+                          Text('隐私声明',style: TextStyle(fontSize: zsp(34),color: Color(0xFF242329),decoration: TextDecoration.none),),
+                          Icon(Icons.close,size: hsp(50),color: Color(0xFF242329))
+                        ],
+                      ),
+                    ),
+                    Container(
+                      height: MediaQuery.of(context).size.height-(MediaQuery.of(context).padding.top+hsp(100)*2)-hsp(200),
+                      width: MediaQuery.of(context).size.width-wsp(100),
+                      padding: EdgeInsets.all(wsp(20)),
+                      color: Color(0xFFF9F9F9),
+                      child: Text('',style: TextStyle(fontSize: zsp(30),color: Color(0xFF242329),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                    ),
+                    Container(
+                        height: hsp(100),
+                        alignment: Alignment.center,
+                        child: Row(
+                          children: [
+                            GestureDetector(
+                              child: Container(
+                                width: (MediaQuery.of(context).size.width-wsp(100))/2-wsp(1),
+                                alignment: Alignment.center,
+                                child: Text('不同意',style: TextStyle(fontSize: zsp(34),color: Color(0xFF999999),decoration: TextDecoration.none),),
+                              ),
+                              onTap: (){
+                                Navigator.pop(context);
+                              },
+                              behavior: HitTestBehavior.opaque,
+                            ),
+                            Container(
+                              height: hsp(100),
+                              width: wsp(2),
+                              color: Color(0xFFF9F9F9),
+                            ),
+                            GestureDetector(
+                              child: Container(
+                                width: (MediaQuery.of(context).size.width-wsp(100))/2-wsp(1),
+                                alignment: Alignment.center,
+                                child: Text('同意',style: TextStyle(fontSize: zsp(34),color: Color(0xFF0079FF),decoration: TextDecoration.none),),
+                              ),
+                              onTap: (){
+                                _timer.cancel();
+                                prefer.setBool('isRead', true);
+                                Navigator.pop(context);
+                                Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(
+                                    builder: (context){
+                                      return YSBind();
+                                    }
+                                ), (route) => false);
+                              },
+                              behavior: HitTestBehavior.opaque,
+                            )
+                          ],
+                        )
+                    ),
+                  ],
+                ),
+              ),
+            );
+          }
+      );
+    }
+  }
+
+  _getCodeData() async{
+    FocusScope.of(context).unfocus();
+    if(_phoneStr.text.isEmpty){
+      ysFlutterToast(context, '手机号码不能为空');
+      return;
+    }
+    if(isChinaPhoneLegal(_phoneStr.text)==false){
+      ysFlutterToast(context, '手机号码格式不正确');
+      return;
+    }
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/getVerificationCode',parameter: {'phone':_phoneStr.text});
+    if(dict!=null){
+      _timer = Timer.periodic(Duration(seconds: 1), (timer){
+        setState(() {
+          if(_number<=1){
+            _number = 60;
+            _timer.cancel();
+          }else{
+            _number--;
+          }
+        });
+      });
+    }
+  }
+}

+ 68 - 0
ysairplane1/lib/code/YSCollection.dart

@@ -0,0 +1,68 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+
+class YSCollection extends StatefulWidget {
+  @override
+  _YSCollectionState createState() => _YSCollectionState();
+}
+
+class _YSCollectionState extends State<YSCollection> {
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '收藏',
+      yschild: Container(
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        width: MediaQuery.of(context).size.width,
+        color: Color(0xFFF5F6F8),
+        child: ListView.separated(
+          itemBuilder: (context,index){
+            return Container(
+              height: 100,
+              padding: EdgeInsets.all(10),
+              decoration: BoxDecoration(
+                color: Colors.white,
+                borderRadius: BorderRadius.all(Radius.circular(5)),
+              ),
+              child: Column(
+                children: [
+                  Row(
+                    children: [
+                      Container(
+                        height: 50,
+                        width: 50,
+                        decoration: BoxDecoration(
+                          color: Colors.lightBlue,
+                          borderRadius: BorderRadius.all(Radius.circular(5))
+                        ),
+                      ),
+                      Container(
+                        margin: EdgeInsets.only(left: 10),
+                        height: 50,
+                        width: MediaQuery.of(context).size.width-100,
+                        child: Text('最美白头山的夏天最美白头山的夏天',style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16,color: Color(0xFF333333)),overflow: TextOverflow.ellipsis,maxLines: 2,),
+                      )
+                    ],
+                  ),
+                  Container(
+                    margin: EdgeInsets.only(top: 15),
+                    width: MediaQuery.of(context).size.width-40,
+                    child: Text('小精灵小姐     2020-08-14 14:12',style: TextStyle(fontSize: 10,color: Color(0xFF999999))),
+                  )
+                ],
+              ),
+            );
+          },
+          separatorBuilder: (context,index){
+            return Container(
+              height: 10,
+            );
+          },
+          itemCount: 10,
+          padding: EdgeInsets.only(top: 10,bottom: 30,left: 10,right: 10),
+        ),
+      ),
+    );
+  }
+}

+ 238 - 0
ysairplane1/lib/code/YSComment.dart

@@ -0,0 +1,238 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/code/YSCommnetAdd.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+import 'package:smooth_star_rating/smooth_star_rating.dart';
+
+class YSComment extends StatefulWidget {
+  @override
+  _YSCommentState createState() => _YSCommentState();
+}
+
+class _YSCommentState extends State<YSComment> {
+  List _tags = ['服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)',];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '点评',
+      yschild: Column(
+        crossAxisAlignment: CrossAxisAlignment.start,
+        children: [
+          Container(
+            color: Colors.white,
+            width: MediaQuery.of(context).size.width,
+            padding: EdgeInsets.all(hsp(30)),
+            child: Column(
+              children: [
+                GestureDetector(
+                  onTap: (){
+                    Navigator.of(context).push(
+                      CupertinoPageRoute(
+                        builder: (context){
+                          return YSCommentAdd();
+                        }
+                      )
+                    );
+                  },
+                  child: Container(
+                    width: MediaQuery.of(context).size.width,
+                    child: Text('评价(32)',style: TextStyle(fontSize: zsp(36),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                  ),
+                ),
+                Container(
+                  margin: EdgeInsets.only(top: hsp(30),bottom: hsp(30),right: wsp(10)),
+                  height: hsp(120),
+                  child: Row(
+                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    children: [
+                      Container(
+                        child: Column(
+                          children: [
+                            RichText(
+                              text: TextSpan(
+                                  text: '5.0',
+                                  style: TextStyle(fontSize: zsp(60),color: Color(0xFFED5E58),fontWeight: FontWeight.bold),
+                                  children: [
+                                    TextSpan(
+                                      text: '  超赞',
+                                      style: TextStyle(fontSize: zsp(24),fontWeight: FontWeight.normal),
+                                    )
+                                  ]
+                              ),
+                            ),
+                            Text('高于94%同类型航空',style: TextStyle(fontSize: zsp(20),color: Color(0xFF202020)),),
+                          ],
+                        ),
+                        width: wsp(200),
+                      ),
+                      Container(
+                        height: hsp(120),
+                        width: MediaQuery.of(context).size.width-hsp(120)-wsp(210)-wsp(60),
+                        margin: EdgeInsets.only(left: wsp(10),right: wsp(0)),
+                        child: GridView.builder(
+                          gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                              crossAxisCount: 2,
+                              childAspectRatio: (MediaQuery.of(context).size.width-hsp(120)-wsp(210)-wsp(60))/2/hsp(60)
+                          ),
+                          itemBuilder: (context, index) {
+                            return Container(
+                              height: hsp(60),
+                              child: Row(
+                                children: [
+                                  Text('舒适  4.9  ',style: TextStyle(fontSize: zsp(22),color: Color(0xFF202020)),),
+                                  Container(
+                                    height: hsp(8),
+                                    decoration: BoxDecoration(
+                                        color: Color(0xFFED5E58),
+                                        borderRadius: BorderRadius.all(Radius.circular(50))
+                                    ),
+                                    width: wsp(75),
+                                  )
+                                ],
+                              ),
+                            );
+                          },
+                          itemCount: 4,
+                          padding: EdgeInsets.all(0),
+                          physics: NeverScrollableScrollPhysics(),
+                        ),
+                      )
+                    ],
+                  ),
+                ),
+                Container(
+                  width: MediaQuery.of(context).size.width-hsp(120),
+                  child: Wrap(
+                      alignment: WrapAlignment.start,
+                      children: <Widget>[
+                        for (int i =0;i<_tags.length;i++ ) GestureDetector(
+                          behavior: HitTestBehavior.opaque,
+                          onTap: (){
+
+                          },
+                          child: Container(
+                            margin: EdgeInsets.symmetric(vertical: hsp(10), horizontal: hsp(10)),
+                            decoration: BoxDecoration(
+                                color: Color(0xFFFDF1F1),
+                                borderRadius: BorderRadius.all(Radius.circular(5))
+                            ),
+                            padding: EdgeInsets.only(left: wsp(15), right: wsp(15),top: hsp(10),bottom: hsp(10)),
+                            child: Text('${_tags[i]}', style: TextStyle(fontSize: zsp(24),color: Color(0xFF000000)), textAlign: TextAlign.center,),
+                          ),
+                        )
+                      ]
+                  ),
+                ),
+              ],
+            ),
+          ),
+          ListView.separated(
+            shrinkWrap: true,
+            itemBuilder: (context,index){
+              return Container(
+                padding: EdgeInsets.all(hsp(30)),
+                child: Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  children: [
+                    Row(
+                      children: [
+                        Container(
+                          height: hsp(90),
+                          width: hsp(90),
+                          margin: EdgeInsets.only(right: wsp(20)),
+                          decoration: BoxDecoration(
+                              color: Colors.lightGreen,
+                              borderRadius: BorderRadius.all(Radius.circular(50))
+                          ),
+                        ),
+                        Container(
+                          height: hsp(80),
+                          child: Column(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            crossAxisAlignment: CrossAxisAlignment.start,
+                            children: [
+                              Row(
+                                children: [
+                                  Text('周真美丽',style: TextStyle(fontSize: zsp(28),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                                  Container(
+                                    height: hsp(30),
+                                    child: Row(
+                                      children: [
+                                        Image(image: AssetImage('lib/images/vip2.png'),height: hsp(15),width: wsp(16),),
+                                        Text(' 砖石贵宾',style: TextStyle(fontSize: zsp(18),color: Color(0xFFF9DEAC)),)
+                                      ],
+                                    ),
+                                    padding: EdgeInsets.only(left: wsp(7),right: wsp(7)),
+                                    margin: EdgeInsets.only(left: wsp(10)),
+                                    decoration: BoxDecoration(
+                                      color: Color(0xFF000000),
+                                      borderRadius: BorderRadius.all(Radius.circular(2))
+                                    ),
+                                  )
+                                ],
+                              ),
+                              SmoothStarRating(
+                                rating: 4.0,
+                                isReadOnly: true,
+                                size: hsp(30),
+                                filledIconData: Icons.star,
+                                halfFilledIconData: Icons.star_half,
+                                defaultIconData: Icons.star_border,
+                                starCount: 5,
+                                allowHalfRating: true,
+                                spacing: 1.0,
+                                onRated: (value) {
+                                  print("rating value -> $value");
+                                },
+                                color: Color(0xFFF97C00),
+                                borderColor: Color(0xFFF97C00),
+                              )
+                            ],
+                          ),
+                          width: MediaQuery.of(context).size.width-hsp(360),
+                        ),
+                        Text('2019-3-24 发布',style: TextStyle(fontSize: zsp(22),color: Color(0xFF9A9A9A)),)
+                      ],
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    ),
+                    Container(
+                        margin: EdgeInsets.only(top: hsp(20),bottom: hsp(20)),
+                        child: ysTextExpend(text: index==0?'海南航空公司非常好,我很欣赏!航空公司非空欣赏很欣赏很欣赏赏常好我很欣赏!航空公司非常好, 我很欣很欣赏很欣赏很欣赏赏海南航空公司非常好,'
+                            '我很欣赏!航空公司非空欣赏很欣赏很欣赏赏常好我很欣赏!航空公司非常好, 我很欣很欣赏很欣赏很欣赏赏':'海南航空公司非常好,我很欣赏海南航空公司非常好,我很欣赏海南航空公司非常好,我很欣赏',
+                          style: TextStyle(fontSize: zsp(28),color: Color(0xFF000000)),maxLines: 3,)
+                    ),
+                    if(index==1)GridView.builder(
+                      shrinkWrap: true,
+                      gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                          crossAxisCount: 3,
+                          childAspectRatio: (MediaQuery.of(context).size.width-hsp(140)-wsp(60))/3/hsp(160),
+                          crossAxisSpacing: hsp(10),
+                          mainAxisSpacing: hsp(10)
+                      ),
+                      itemBuilder: (context, index) {
+                        return Container(
+                          height: hsp(160),
+                          color: Colors.red.withOpacity((index+1)*0.1),
+                        );
+                      },
+                      itemCount: 3,
+                      padding: EdgeInsets.all(0),
+                      physics: NeverScrollableScrollPhysics(),
+                    )
+                  ],
+                ),
+              );
+            },
+            separatorBuilder: (context,index){
+              return Divider(color: Color(0xFFF1F2F4),height: hsp(10),thickness: hsp(10),);
+            },
+            itemCount: 3,
+            physics: NeverScrollableScrollPhysics(),
+          ),
+        ],
+      ),
+    );
+  }
+}

+ 268 - 0
ysairplane1/lib/code/YSCommnetAdd.dart

@@ -0,0 +1,268 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:smooth_star_rating/smooth_star_rating.dart';
+import 'package:sy_flutter_qiniu_storage/sy_flutter_qiniu_storage.dart';
+
+class YSCommentAdd extends StatefulWidget {
+  @override
+  _YSCommentAddState createState() => _YSCommentAddState();
+}
+
+class _YSCommentAddState extends State<YSCommentAdd> {
+  ImagePicker _picker = ImagePicker();
+  List _images = [];
+  String _tokenStr = '';
+  String _urlStr = '';
+  TextEditingController _content = TextEditingController();
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getQiNiuTokenData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '点评',
+      yschild: Container(
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        width: MediaQuery.of(context).size.width,
+        color: Color(0xFFF4F5F6),
+        child: Column(
+          children: [
+            Container(
+              margin: EdgeInsets.only(top: hsp(20)),
+              padding: EdgeInsets.all(hsp(30)),
+              color: Colors.white,
+              child: ListView.builder(
+                itemBuilder: (context,index){
+                  return Container(
+                    height: hsp(80),
+                    child: Row(
+                      children: [
+                        Text('评分',style: TextStyle(fontSize: zsp(30),color: Color(0xFF535353)),),
+                        Container(
+                          margin: EdgeInsets.only(left: wsp(80),right: wsp(80)),
+                          child: SmoothStarRating(
+                            rating: 4.0,
+                            isReadOnly: false,
+                            size: hsp(40),
+                            filledIconData: Icons.star,
+                            halfFilledIconData: Icons.star_half,
+                            defaultIconData: Icons.star_border,
+                            starCount: 5,
+                            allowHalfRating: true,
+                            spacing: 1.0,
+                            onRated: (value) {
+                              print("rating value -> $value");
+                            },
+                            color: Color(0xFFF97C00),
+                            borderColor: Color(0xFFF97C00),
+                          ),
+                        ),
+                        Text('超棒',style: TextStyle(fontSize: zsp(30),color: Color(0xFFBFBFBF)),),
+                      ],
+                    ),
+                  );
+                },
+                itemCount: 5,
+                padding: EdgeInsets.all(0),
+                shrinkWrap: true,
+                physics: NeverScrollableScrollPhysics(),
+              ),
+            ),
+            Container(
+              margin: EdgeInsets.only(top: hsp(10)),
+              padding: EdgeInsets.all(hsp(30)),
+              width: MediaQuery.of(context).size.width,
+              height: hsp(180),
+              color: Colors.white,
+              child: ListView.separated(
+                scrollDirection: Axis.horizontal,
+                itemBuilder: (context,index){
+                  return GestureDetector(
+                    onTap: (){
+                      showCupertinoModalPopup(
+                          context: context,
+                          builder: (context) {
+                            return CupertinoActionSheet(
+                              actions: <Widget>[
+                                CupertinoActionSheetAction(
+                                  child: Text('拍摄照片'),
+                                  onPressed: () {
+                                    Navigator.pop(context);
+                                    _picker.getImage(source: ImageSource.camera).then((value){
+                                      _onUpload(value);
+                                    });
+                                  },
+                                ),
+                                CupertinoActionSheetAction(
+                                  child: Text('选择图片'),
+                                  onPressed: () {
+                                    Navigator.pop(context);
+                                    _picker.getImage(source: ImageSource.gallery).then((value){
+                                      _onUpload(value);
+                                    });
+                                  },
+                                ),
+                              ],
+                              cancelButton: CupertinoActionSheetAction(
+                                child: Text('取消'),
+                                onPressed: () {
+                                  Navigator.pop(context);
+                                },
+                              ),
+                            );
+                          }
+                      );
+                    },
+                    child: index==_images.length?Container(
+                      height: hsp(120),
+                      width: hsp(120),
+                      decoration: BoxDecoration(
+                          color: Color(0xFFF2F2F2),
+                          borderRadius: BorderRadius.all(Radius.circular(10))
+                      ),
+                      child: Icon(Icons.add,size: 25,color: Color(0xFF9A9A9A),),
+                    ):Container(
+                      height: hsp(120),
+                      width: hsp(120),
+                      decoration: BoxDecoration(
+                        borderRadius: BorderRadius.all(Radius.circular(10)),
+                        image: DecorationImage(image: NetworkImage(_images[index]),fit: BoxFit.fill)
+                      ),
+                    )
+                  );
+                },
+                separatorBuilder: (context,index){
+                  return Container(width: 10,);
+                },
+                itemCount: _images.length+1,
+                padding: EdgeInsets.all(0),
+                shrinkWrap: true,
+              ),
+            ),
+            Container(
+              margin: EdgeInsets.only(top: hsp(10)),
+              padding: EdgeInsets.all(hsp(30)),
+              width: MediaQuery.of(context).size.width,
+              color: Colors.white,
+              child: Column(
+                children: [
+                  GestureDetector(
+                    onTap: (){
+                      Navigator.push(context, PopRoute(child: BottomInputDialog(
+                        height: 50,
+                        inputView: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Container(
+                              width: MediaQuery.of(context).size.width-100,
+                              child: CupertinoTextField(
+                                placeholder: '说点儿好听的~',
+                                style: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                                placeholderStyle: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                                autofocus: true,
+                                decoration: BoxDecoration(),
+                                controller: _content,
+                              ),
+                            ),
+                            Icon(Icons.alternate_email,size: 25,color: Color(0xFFA1A1A2),),
+                            Icon(Icons.tag_faces,size: 25,color: Color(0xFFA1A1A2),),
+                          ],
+                        ),
+                      )));
+                    },
+                    child: Container(
+                      height: hsp(200),
+                      decoration: BoxDecoration(
+                        color: Color(0xFFF4F5F6),
+                        borderRadius: BorderRadius.all(Radius.circular(5))
+                      ),
+                      width: MediaQuery.of(context).size.width-hsp(60),
+                      padding: EdgeInsets.all(hsp(20)),
+                      child: SingleChildScrollView(
+                        child: Text(_content.text.isEmpty?'添加正文':_content.text,style: TextStyle(fontSize: 15,color: Color(0xFF9A9A9A)),),
+                      ),
+                    ),
+                  ),
+                  Container(
+                    width: MediaQuery.of(context).size.width-hsp(60),
+                    child: RichText(
+                      text: TextSpan(
+                        text: '还差',
+                        style: TextStyle(fontSize: 14,color: Color(0xFF9A9A9A)),
+                        children: [
+                          TextSpan(
+                            text: '15',
+                            style: TextStyle(color: Color(0xFFEB8232))
+                          ),
+                          TextSpan(
+                            text: '字,即可发表点评'
+                          )
+                        ]
+                      ),
+                    ),
+                    height: hsp(60),
+                    alignment: Alignment.centerRight,
+                  ),
+                ],
+              ),
+            ),
+            GestureDetector(
+              onTap: (){
+
+              },
+              child: Container(
+                margin: EdgeInsets.only(top: hsp(200)),
+                width: MediaQuery.of(context).size.width-hsp(100),
+                height: hsp(92),
+                alignment: Alignment.center,
+                decoration: BoxDecoration(
+                    color: Color(0xFF143C64),
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                ),
+                child: Text('发布',style: TextStyle(fontSize: 18,color: Colors.white,fontWeight: FontWeight.bold),),
+              ),
+            )
+
+          ],
+        ),
+      ),
+    );
+  }
+
+  _getQiNiuTokenData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/getToken',parameter: {},isLoading: false,isToken: false);
+    if(dict!=null){
+      _tokenStr = dict['token'];
+      _urlStr = dict['prefix'];
+    }
+  }
+
+  _onUpload(var value) async {
+    if (value == null) {
+      return;
+    }
+    print(value.path);
+    print(_tokenStr);
+    final syStorage = new SyFlutterQiniuStorage();
+    //监听上传进度
+    syStorage.onChanged().listen((dynamic percent) {
+      print(percent);
+    });
+    //上传文件
+    var result = await syStorage.upload(value.path, _tokenStr, DateTime.now().millisecondsSinceEpoch.toString() +'.' +value.path.split('.').last);
+    if(result.success==true){
+      setState(() {
+        _images.add(_urlStr+'${result.result['key']}');
+      });
+    }
+    print(result);
+  }
+}

+ 109 - 0
ysairplane1/lib/code/YSContact.dart

@@ -0,0 +1,109 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSContact extends StatefulWidget {
+  @override
+  _YSContactState createState() => _YSContactState();
+}
+
+class _YSContactState extends State<YSContact> {
+  List _dataArray = [{'title':'姓名','content':'请输入姓名'},{'title':'证件类型','content':'身份证'},{'title':'证件号码','content':'请输入身份证号码'},{'title':'手机号码','content':'请输入电话号码'}];
+  TextEditingController _name = TextEditingController();
+  TextEditingController _phone = TextEditingController();
+  TextEditingController _idCard = TextEditingController();
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '编辑信息',
+      ysright: GestureDetector(
+        child: Text('保存',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(36),color: Color(0xFF2C7CF6)),),
+        onTap: (){
+          if(_name.text.isEmpty){
+            ysFlutterToast(context, '请输入姓名');
+            return;
+          }
+          if(_phone.text.isEmpty){
+            ysFlutterToast(context, '请输入电话号码');
+            return;
+          }
+          if(_idCard.text.isEmpty){
+            ysFlutterToast(context, '请输入身份证号码');
+            return;
+          }
+          if(isChinaPhoneLegal(_phone.text)==false){
+            ysFlutterToast(context, '手机号格式不正确');
+            return;
+          }
+          if(isIdCard(_idCard.text)==false){
+            ysFlutterToast(context, '身份证号格式不正确');
+            return;
+          }
+          Navigator.of(context).pop({'username':_name.text,'phone':_phone.text,'cardid':_idCard.text});
+        },
+      ),
+      yschild: Container(
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        width: MediaQuery.of(context).size.width,
+        color: Color(0xFFF1F2F3),
+        child: ListView.separated(
+          itemBuilder: (context,index){
+            return GestureDetector(
+              onTap: (){
+                if(index==1)return;
+                Navigator.push(context, PopRoute(child: BottomInputDialog(
+                  height: 50,
+                  inputView: Row(
+                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    children: [
+                      Container(
+                        width: MediaQuery.of(context).size.width-100,
+                        child: CupertinoTextField(
+                          placeholder: index==0?'请输入姓名':index==2?'请输入身份证号码':'请输入电话号码',
+                          style: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                          placeholderStyle: TextStyle(fontSize: 15,color: Color(0xFF5A5A5A),decoration: TextDecoration.none,fontWeight: FontWeight.normal),
+                          autofocus: true,
+                          decoration: BoxDecoration(),
+                          maxLength: index==0?10:index==2?18:11,
+                          textInputAction: TextInputAction.done,
+                          keyboardType: index==3?TextInputType.phone:TextInputType.text,
+                          controller: index==0?_name:index==2?_idCard:_phone,
+                        ),
+                      ),
+                      Icon(Icons.alternate_email,size: 25,color: Color(0xFFA1A1A2),),
+                      Icon(Icons.tag_faces,size: 25,color: Color(0xFFA1A1A2),),
+                    ],
+                  ),
+                )));
+              },
+              child: Container(
+                padding: EdgeInsets.only(top: hsp(20),bottom: hsp(20),left: hsp(40),right: hsp(40)),
+                color: Colors.white,
+                width: MediaQuery.of(context).size.width,
+                child: Row(
+                  children: [
+                    Container(
+                      child: Text('${_dataArray[index]['title']}',style: TextStyle(fontSize: zsp(30),color: Color(0xFF6C6C6C)),),
+                      width: wsp(200),
+                    ),
+                    Text(index==0?(_name.text.isNotEmpty?_name.text:'${_dataArray[index]['content']}'):index==2?(_idCard.text.isNotEmpty?_idCard.text:'${_dataArray[index]['content']}'):
+                    index==3?(_phone.text.isNotEmpty?_phone.text:'${_dataArray[index]['content']}'):'${_dataArray[index]['content']}'
+                      ,style: TextStyle(fontSize: zsp(30),color: Color(0xFF000000)),)
+                  ],
+                )
+              ),
+            );
+          },
+          separatorBuilder: (context,index){
+            return Divider(height: index==0?hsp(12):0.5,thickness: index==0?hsp(12):0.5,color: Color(0xFFF1F2F3),);
+          },
+          itemCount: _dataArray.length,
+          padding: EdgeInsets.all(0),
+          shrinkWrap: true,
+        ),
+      ),
+    );
+  }
+}

+ 997 - 0
ysairplane1/lib/code/YSContractPlane.dart

@@ -0,0 +1,997 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_easyrefresh/easy_refresh.dart';
+import 'package:ysairplane/code/YSCity.dart';
+import 'package:ysairplane/code/YSContractPlaneDetail.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSContractPlane extends StatefulWidget {
+  @override
+  _YSContractPlaneState createState() => _YSContractPlaneState();
+}
+
+class _YSContractPlaneState extends State<YSContractPlane> {
+  int _type = 0;
+  int _selected  = 0;
+  int _plansIndex = 0;
+  int _page = 1;
+  List _dataArray = [];
+  Map _siftDict,_siftDict2;
+  Map _startCity,_endCity,_startCity2,_endCity2;
+  int _priceIndex = 0;
+  int _dateIndex = 0;
+  int _dateIndex2 = 0;
+  int _distanceIndex = 0;
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _refreshData();
+      _getSiftData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      endDrawer: Container(
+        height: MediaQuery.of(context).size.height,
+        width: MediaQuery.of(context).size.width*0.85,
+        decoration: BoxDecoration(
+          color: Colors.white,
+          borderRadius: BorderRadius.only(topLeft: Radius.circular(10),bottomLeft: Radius.circular(10))
+        ),
+        child: Column(
+          children: [
+            Container(
+              height: MediaQuery.of(context).size.height-hsp(100),
+              width: MediaQuery.of(context).size.width*0.85,
+              child: SingleChildScrollView(
+                padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(30),bottom: hsp(30)),
+                child: _type==2?Column(
+                  children: [
+                    Container(
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Text('航线',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                          ListView.separated(
+                            shrinkWrap: true,
+                            itemBuilder: (context,index){
+                              return Container(
+                                child: Row(
+                                  children: [
+                                    Text('出发地',style: TextStyle(fontSize: zsp(24),color: Color(0xFF2C7CF6)),),
+                                    Container(
+                                        margin: EdgeInsets.only(left: wsp(40)),
+                                        padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                                        height: hsp(60),
+                                        decoration: BoxDecoration(
+                                            color: Color(0xFFF4F4F4),
+                                            borderRadius: BorderRadius.all(Radius.circular(50))
+                                        ),
+                                        alignment: Alignment.center,
+                                        child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            Text('西安',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                                            Icon(Icons.keyboard_arrow_right,size: hsp(40),color: Color(0xFF2C7CF6),)
+                                          ],
+                                        )
+                                    )
+
+                                  ],
+                                ),
+                              );
+                            },
+                            itemCount: 2,
+                            padding: EdgeInsets.only(top: hsp(30),bottom: hsp(30)),
+                            separatorBuilder: (BuildContext context, int index) {
+                              return Divider(height: hsp(30),thickness: hsp(30),color: Colors.white,);
+                            },
+                          ),
+                        ],
+                      ),
+                    ),
+                    Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF4F4F4),),
+                    Container(
+                      width: MediaQuery.of(context).size.width*0.85,
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30),top: wsp(20),bottom: wsp(30)),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Text('行程距离',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                          Container(
+                            margin: EdgeInsets.only(top: hsp(30),bottom: hsp(30)),
+                            child: Row(
+                              children: [
+                                Container(
+                                  height: hsp(60),
+                                  width: wsp(180),
+                                  decoration: BoxDecoration(
+                                      color: Color(0xFFF4F4F4),
+                                      borderRadius: BorderRadius.all(Radius.circular(50))
+                                  ),
+                                  alignment: Alignment.center,
+                                  child: Text('最小距离',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                                ),
+                                Container(
+                                  height: hsp(3),
+                                  width: wsp(30),
+                                  color: Color(0xFFF4F4F4),
+                                  margin: EdgeInsets.only(left: wsp(33),right: wsp(33)),
+                                ),
+                                Container(
+                                  height: hsp(60),
+                                  width: wsp(180),
+                                  decoration: BoxDecoration(
+                                      color: Color(0xFFF4F4F4),
+                                      borderRadius: BorderRadius.all(Radius.circular(50))
+                                  ),
+                                  alignment: Alignment.center,
+                                  child: Text('最大距离',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                                )
+                              ],
+                            ),
+                          ),
+                          ListView.separated(
+                            itemBuilder: (context,index){
+                              return Container(
+                                height: hsp(60),
+                                width: MediaQuery.of(context).size.width,
+                                decoration: BoxDecoration(
+                                    color: Color(0xFFF4F4F4),
+                                    borderRadius: BorderRadius.all(Radius.circular(50))
+                                ),
+                                alignment: Alignment.center,
+                                child: Text('100公里 -300公里   30%的选择',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                              );
+                            },
+                            separatorBuilder: (context,index){
+                              return Divider(color: Colors.white,height: hsp(30),thickness: hsp(30),);
+                            },
+                            itemCount: 3,
+                            shrinkWrap: true,
+                            padding: EdgeInsets.all(0),
+                            physics: NeverScrollableScrollPhysics(),
+                          )
+                        ],
+                      ),
+                    ),
+                    Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF4F4F4),),
+                    Container(
+                      width: MediaQuery.of(context).size.width*0.85,
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30),top: wsp(20),bottom: wsp(30)),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Row(
+                            children: [
+                              Text('出发时间',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                              Icon(Icons.keyboard_arrow_right,size: hsp(40),color: Color(0xFF2C7CF6),)
+                            ],
+                          ),
+                          Container(
+                            width: MediaQuery.of(context).size.width*0.85,
+                            padding: EdgeInsets.only(top: hsp(30)),
+                            height: hsp(90),
+                            child: ListView.separated(
+                              itemBuilder: (context,index){
+                                return Container(
+                                  height: hsp(60),
+                                  width: wsp(200),
+                                  decoration: BoxDecoration(
+                                      color: Color(0xFFF4F4F4),
+                                      borderRadius: BorderRadius.all(Radius.circular(50))
+                                  ),
+                                  alignment: Alignment.center,
+                                  child: Text('2020.09.18',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                                );
+                              },
+                              separatorBuilder: (context,index){
+                                return Container(color: Colors.white,width: wsp(24),);
+                              },
+                              itemCount: 3,
+                              // shrinkWrap: true,
+                              scrollDirection: Axis.horizontal,
+                              padding: EdgeInsets.all(0),
+                            ),
+                          )
+                        ],
+                      ),
+                    )
+                  ],
+                ):Column(
+                  children: [
+                    Container(
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                         // Text('预订方式',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                          // Container(
+                          //   margin: EdgeInsets.only(top: hsp(30),bottom: hsp(30)),
+                          //   child: Row(
+                          //     children: [
+                          //       GestureDetector(
+                          //         child: Container(
+                          //           height: hsp(60),
+                          //           width: wsp(180),
+                          //           decoration: BoxDecoration(
+                          //               color: _way==0?Color(0xFFECF4FF):Color(0xFFF4F4F4),
+                          //               border: Border.all(color: _way==0?Color(0xFF2C7CF6):Colors.transparent,width: 1),
+                          //               borderRadius: BorderRadius.all(Radius.circular(50))
+                          //           ),
+                          //           alignment: Alignment.center,
+                          //           child: Text('拼座',style: TextStyle(fontSize: zsp(24),color: _way==0?Color(0xFF2C7CF6):Colors.black),),
+                          //         ),
+                          //         onTap: (){
+                          //           setState(() {
+                          //             _way = 0;
+                          //           });
+                          //         },
+                          //       ),
+                          //       GestureDetector(
+                          //         onTap: (){
+                          //           setState(() {
+                          //             _way = 1;
+                          //           });
+                          //         },
+                          //         child: Container(
+                          //           margin: EdgeInsets.only(left: wsp(25)),
+                          //           height: hsp(60),
+                          //           width: wsp(180),
+                          //           decoration: BoxDecoration(
+                          //               color: _way==1?Color(0xFFECF4FF):Color(0xFFF4F4F4),
+                          //               border: Border.all(color: _way==1?Color(0xFF2C7CF6):Colors.transparent,width: 1),
+                          //               borderRadius: BorderRadius.all(Radius.circular(50))
+                          //           ),
+                          //           alignment: Alignment.center,
+                          //           child: Text('整机',style: TextStyle(fontSize: zsp(24),color: _way==1?Color(0xFF2C7CF6):Colors.black),),
+                          //         ),
+                          //       )
+                          //     ],
+                          //   ),
+                          // ),
+                          Text('航线',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                          ListView.separated(
+                            shrinkWrap: true,
+                            itemBuilder: (context,index){
+                              return GestureDetector(
+                                onTap: (){
+                                  Navigator.of(context).push(
+                                    CupertinoPageRoute(
+                                      builder: (context){
+                                        return YSCity();
+                                      }
+                                    )
+                                  ).then((value){
+                                    if(value!=null){
+                                      if(index==0){
+                                        _startCity = value;
+                                      }else{
+                                        _endCity = value;
+                                      }
+                                      setState(() {
+
+                                      });
+                                    }
+                                  });
+                                },
+                                child: Container(
+                                  child: Row(
+                                    children: [
+                                      Text('出发地',style: TextStyle(fontSize: zsp(24),color: Color(0xFF2C7CF6)),),
+                                      Container(
+                                          margin: EdgeInsets.only(left: wsp(40)),
+                                          padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                                          height: hsp(60),
+                                          decoration: BoxDecoration(
+                                              color: Color(0xFFF4F4F4),
+                                              borderRadius: BorderRadius.all(Radius.circular(50))
+                                          ),
+                                          alignment: Alignment.center,
+                                          child: Row(
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            children: [
+                                              Text(index==0?'${_startCity!=null?_startCity['display']:'请选择'}':'${_endCity!=null?_endCity['display']:'请选择'}',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                                              Icon(Icons.keyboard_arrow_right,size: hsp(40),color: Color(0xFF2C7CF6),)
+                                            ],
+                                          )
+                                      )
+                                    ],
+                                  ),
+                                ),
+                              );
+                            },
+                            itemCount: 2,
+                            padding: EdgeInsets.only(top: hsp(30),bottom: hsp(30)),
+                            separatorBuilder: (BuildContext context, int index) {
+                              return Divider(height: hsp(30),thickness: hsp(30),color: Colors.white,);
+                            },
+                          ),
+                        ],
+                      ),
+                    ),
+                    Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF4F4F4),),
+                    Container(
+                      width: MediaQuery.of(context).size.width*0.85,
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30),top: wsp(20),bottom: wsp(30)),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Text('价格区间',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                          Container(
+                            margin: EdgeInsets.only(top: hsp(30),bottom: hsp(30)),
+                            child: Row(
+                              children: [
+                                Container(
+                                  height: hsp(60),
+                                  width: wsp(180),
+                                  decoration: BoxDecoration(
+                                      color: Color(0xFFF4F4F4),
+                                      borderRadius: BorderRadius.all(Radius.circular(50))
+                                  ),
+                                  alignment: Alignment.center,
+                                  child: Text(_siftDict==null?'':'${_siftDict['price'][_priceIndex]['min']}元',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                                ),
+                                Container(
+                                  height: hsp(3),
+                                  width: wsp(30),
+                                  color: Color(0xFFF4F4F4),
+                                  margin: EdgeInsets.only(left: wsp(33),right: wsp(33)),
+                                ),
+                                Container(
+                                  height: hsp(60),
+                                  width: wsp(180),
+                                  decoration: BoxDecoration(
+                                      color: Color(0xFFF4F4F4),
+                                      borderRadius: BorderRadius.all(Radius.circular(50))
+                                  ),
+                                  alignment: Alignment.center,
+                                  child: Text(_siftDict==null?'':'${_siftDict['price'][_priceIndex]['max']}元',style: TextStyle(fontSize: zsp(24),color: Colors.black),),
+                                )
+                              ],
+                            ),
+                          ),
+                          ListView.separated(
+                            itemBuilder: (context,index){
+                              return GestureDetector(
+                                onTap: (){
+                                  setState(() {
+                                    _priceIndex = index;
+                                  });
+                                },
+                                child: Container(
+                                  height: hsp(60),
+                                  width: MediaQuery.of(context).size.width,
+                                  decoration: BoxDecoration(
+                                      color: _priceIndex==index?Color(0xFFECF4FF):Color(0xFFF4F4F4),
+                                      border: Border.all(color: _priceIndex==index?Color(0xFF2C7CF6):Colors.transparent,width: 1),
+                                      borderRadius: BorderRadius.all(Radius.circular(50))
+                                  ),
+                                  alignment: Alignment.center,
+                                  child: Text('${_siftDict['price'][index]['min']}元 - ${_siftDict['price'][index]['max']}元   ${_siftDict['price'][index]['rate']}的选择',
+                                    style: TextStyle(fontSize: zsp(24),color: _priceIndex==index?Color(0xFF2C7CF6):Colors.black),),
+                                ),
+                              );
+                            },
+                            separatorBuilder: (context,index){
+                              return Divider(color: Colors.white,height: hsp(30),thickness: hsp(30),);
+                            }, 
+                            itemCount: _siftDict!=null?_siftDict['price'].length:0,
+                            shrinkWrap: true,
+                            padding: EdgeInsets.all(0),
+                            physics: NeverScrollableScrollPhysics(),
+                          )
+                        ],
+                      ),
+                    ),
+                    Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF4F4F4),),
+                    Container(
+                      width: MediaQuery.of(context).size.width*0.85,
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30),top: wsp(20),bottom: wsp(30)),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          GestureDetector(
+                            onTap: (){
+                              showModalBottomSheet(
+                                  context: context,
+                                  builder: (context){
+                                    return YSDatePicker(
+                                      choose: (value){
+                                        DateTime date = DateTime.parse(value);
+                                        String timeStr = '${date.year}.${date.month}.${date.day}';
+                                        if(_siftDict['date'].contains(timeStr)==true){
+                                          _siftDict['date'].remove(timeStr);
+                                        }
+                                        _siftDict['date'].insert(0, timeStr);
+                                        _dateIndex = 0;
+                                        setState(() {
+
+                                        });
+                                      },
+                                    );
+                                  }
+                              );
+                            },
+                            child: Row(
+                              children: [
+                                Text('出发时间',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                                Icon(Icons.keyboard_arrow_right,size: hsp(40),color: Color(0xFF2C7CF6),)
+                              ],
+                            ),
+                          ),
+                          Container(
+                            width: MediaQuery.of(context).size.width*0.85,
+                            padding: EdgeInsets.only(top: hsp(30)),
+                            height: hsp(90),
+                            child: ListView.separated(
+                              itemBuilder: (context,index){
+                                return GestureDetector(
+                                  onTap: (){
+                                    setState(() {
+                                      _dateIndex = index;
+                                    });
+                                  },
+                                  child: Container(
+                                    height: hsp(60),
+                                    width: wsp(200),
+                                    decoration: BoxDecoration(
+                                      color: _dateIndex==index?Color(0xFFECF4FF):Color(0xFFF4F4F4),
+                                      border: Border.all(color: _dateIndex==index?Color(0xFF2C7CF6):Colors.transparent,width: 1),
+                                      borderRadius: BorderRadius.all(Radius.circular(50))
+                                    ),
+                                    alignment: Alignment.center,
+                                    child: Text('${_siftDict['date'][index]}',style: TextStyle(fontSize: zsp(24),color: _dateIndex==index?Color(0xFF2C7CF6):Colors.black),),
+                                  ),
+                                );
+                              },
+                              separatorBuilder: (context,index){
+                                return Container(color: Colors.white,width: wsp(24),);
+                              },
+                              itemCount: _siftDict!=null?_siftDict['date'].length:0,
+                             // shrinkWrap: true,
+                              scrollDirection: Axis.horizontal,
+                              padding: EdgeInsets.all(0),
+                            ),
+                          )
+                        ],
+                      ),
+                    ),
+                    Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF4F4F4),),
+                    Container(
+                      width: MediaQuery.of(context).size.width*0.85,
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30),top: wsp(20),bottom: wsp(30)),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              Text('航空公司',style: TextStyle(fontSize: zsp(26),color: Colors.black,fontWeight: FontWeight.bold),),
+                              Icon(Icons.keyboard_arrow_down,size: hsp(40),color: Color(0xFF2C7CF6),)
+                            ],
+                          ),
+                          if(_siftDict!=null)Container(
+                            width: MediaQuery.of(context).size.width*0.85,
+                            padding: EdgeInsets.only(top: hsp(20)),
+                            child: Wrap(
+                              alignment: WrapAlignment.start,
+                              children: <Widget>[
+                                for (int i =0;i<(_siftDict['partner']).length;i++ ) GestureDetector(
+                                  behavior: HitTestBehavior.opaque,
+                                  onTap: (){
+                                    setState(() {
+                                      _plansIndex = i;
+                                    });
+                                  },
+                                  child: Container(
+                                    margin: EdgeInsets.symmetric(vertical: hsp(16), horizontal: hsp(16)),
+                                    decoration: BoxDecoration(
+                                        color: _plansIndex==i?Color(0xFFECF4FF):Color(0xFFF4F4F4),
+                                        border: Border.all(color: _plansIndex==i?Color(0xFF2C7CF6):Colors.transparent,width: 1),
+                                        borderRadius: BorderRadius.all(Radius.circular(50))
+                                    ),
+                                    padding: EdgeInsets.only(left: wsp(30), right: wsp(30),top: hsp(10),bottom: hsp(10)),
+                                    child: Text('${_siftDict['partner'][i]['partnerName']}', style: TextStyle(fontSize: zsp(26),color: _plansIndex==i?Color(0xFF2C7CF6):Colors.black), textAlign: TextAlign.center,),
+                                  ),
+                                )
+                              ]
+                            ),
+                          )
+                        ],
+                      ),
+                    )
+                  ],
+                ),
+              ),
+            ),
+            Container(
+              height: hsp(100),
+              padding: EdgeInsets.only(left: wsp(40),right: wsp(40)),
+              child: Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                children: [
+                  GestureDetector(
+                    onTap: (){
+                      _plansIndex = 0;
+                      _priceIndex = 0;
+                      _dateIndex = 0;
+                      _startCity = null;
+                      _endCity = null;
+                      _siftDict2 = _siftDict;
+                      _siftDict = null;
+                      _refreshData();
+                      Navigator.pop(context);
+                    },
+                    child: Container(
+                      child: Text('重置',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(26),color: Colors.black),),
+                      width: (MediaQuery.of(context).size.width*0.85-wsp(100))/2,
+                      height: hsp(70),
+                      alignment: Alignment.center,
+                      decoration: BoxDecoration(
+                        borderRadius: BorderRadius.all(Radius.circular(50)),
+                        border: Border.all(color: Color(0xFFB2B2B2),width: 1)
+                      ),
+                    ),
+                  ),
+                  GestureDetector(
+                    onTap: (){
+                      _refreshData();
+                      Navigator.pop(context);
+                    },
+                    child: Container(
+                      child: Text('确定',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(26),color: Colors.white),),
+                      width: (MediaQuery.of(context).size.width*0.85-wsp(100))/2,
+                      height: hsp(70),
+                      alignment: Alignment.center,
+                      decoration: BoxDecoration(
+                          borderRadius: BorderRadius.all(Radius.circular(50)),
+                          color: Color(0xFF2C7CF6)
+                      ),
+                    ),
+                  )
+                ],
+              ),
+            )
+          ],
+        ),
+      ),
+      backgroundColor: Color(0xFFF1F2F3),
+      body: SingleChildScrollView(
+        child: Container(
+          width: MediaQuery.of(context).size.width,
+          child: Column(
+            children: [
+              Container(
+                height: MediaQuery.of(context).padding.top+hsp(20)+hsp(100),
+                color: Colors.white,
+                padding: EdgeInsets.only(left: wsp(30),right: wsp(30),top: MediaQuery.of(context).padding.top+hsp(20),bottom: hsp(20)),
+                child: Row(
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                  children: [
+                    GestureDetector(child: Icon(Icons.arrow_back_ios,size: wsp(40),color: Color(0xFF000000),),onTap: (){Navigator.pop(context);},),
+                    Container(
+                      width: MediaQuery.of(context).size.width-wsp(200),
+                      height: hsp(60),
+                      decoration: BoxDecoration(
+                        color: Color(0xFFF7F7F7),
+                        border: Border.all(color: Color(0xFF2C7CF6),width: hsp(2)),
+                        borderRadius: BorderRadius.all(Radius.circular(5)),
+                      ),
+                      child: ListView.separated(
+                        padding: EdgeInsets.all(0),
+                        itemBuilder: (context,index){
+                          return GestureDetector(
+                            onTap: (){
+                              _type = index;
+                              _refreshData();
+                            },
+                            child: Container(
+                              width: (MediaQuery.of(context).size.width-wsp(200))/3,
+                              height: hsp(60),
+                              alignment: Alignment.center,
+                              child: Text(index==0?'拼座':index==1?'整机':'任意飞',style: TextStyle(color: _type==index?Colors.white:Color(0xFF2C7CF6),fontSize: zsp(26)),),
+                              decoration: BoxDecoration(
+                                color: _type==index?Color(0xFF2C7DF7):Colors.transparent,
+                                borderRadius: index==0?BorderRadius.only(bottomLeft: Radius.circular(2),topLeft: Radius.circular(2)):
+                                index==2?BorderRadius.only(topRight: Radius.circular(5),bottomRight: Radius.circular(5)):BorderRadius.all(Radius.circular(0))
+                              ),
+                            ),
+                          );
+                        },
+                        separatorBuilder: (context,index){
+                          return Container(
+                            height: hsp(60),
+                            width: hsp(2),
+                            color: Color(0xFF2C7CF6),
+                          );
+                        },
+                        itemCount: 3,
+                        scrollDirection: Axis.horizontal,
+                      ),
+                    ),
+                    Icon(Icons.search,size: wsp(40),color: Color(0xFF000000),)
+                  ],
+                ),
+              ),
+              Container(
+                width: MediaQuery.of(context).size.width,
+                height: hsp(80),
+                color: Colors.white,
+                child: ListView.builder(
+                  itemBuilder: (context,index){
+                    return GestureDetector(
+                      behavior: HitTestBehavior.opaque,
+                      onTap: (){
+                        if(index==2){
+                          if(_siftDict==null&&_siftDict2!=null){
+                            setState(() {
+                              _siftDict = _siftDict2;
+                            });
+                          }
+                          Scaffold.of(context).openEndDrawer();
+                        }else{
+                          _selected = index;
+                          _refreshData();
+                        }
+                      },
+                      child: Container(
+                        alignment: Alignment.center,
+                        width: MediaQuery.of(context).size.width/3,
+                        height: hsp(80),
+                        child: Text(index==0?'综合':index==1?'销量':'筛选',style: TextStyle(fontSize: zsp(26),color: _selected==index?Color(0xFF007EFF):Color(0xFF222222),fontWeight: _selected==index?FontWeight.bold:FontWeight.normal),),
+                      ),
+                    );
+                  },
+                  itemCount: 3,
+                  scrollDirection: Axis.horizontal,
+                ),
+              ),
+              Stack(
+                children: [
+                  Container(
+                    height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-hsp(200),
+                    child: EasyRefresh(
+                      onRefresh: _refreshData,
+                      onLoad: _loadMoreData,
+                      header: TaurusHeader(
+
+                      ),
+                      footer: TaurusFooter(
+
+                      ),
+                      child: ListView.separated(
+                        itemBuilder: (context,index){
+                          return GestureDetector(
+                            onTap: (){
+                              Navigator.of(context).push(
+                                CupertinoPageRoute(
+                                  builder: (context){
+                                    return YSContractPlaneDetail(contractId: _dataArray[index]['id'],isWhole: _type,);
+                                  }
+                                )
+                              );
+                            },
+                            behavior: HitTestBehavior.opaque,
+                            child: _type!=5?Container(
+                              padding: EdgeInsets.only(bottom: hsp(30)),
+                              margin: EdgeInsets.only(left: hsp(20),right: hsp(20),top: hsp(20)),
+                              decoration: BoxDecoration(
+                                  color: Colors.white,
+                                  borderRadius: BorderRadius.all(Radius.circular(5))
+                              ),
+                              child: Column(
+                                crossAxisAlignment: CrossAxisAlignment.start,
+                                children: [
+                                  Container(
+                                    height: hsp(50),
+                                    width: wsp(200),
+                                    alignment: Alignment.center,
+                                    child: Text(_getDateStr('${_dataArray[index]['flightTime']}'),style: TextStyle(color: Color(0xFF007AFF),fontSize: zsp(24)),),
+                                    decoration: BoxDecoration(
+                                      color: Color(0xFFF3F9FF),
+                                      borderRadius: BorderRadius.only(topLeft: Radius.circular(5))
+                                    ),
+                                  ),
+                                  Row(
+                                    children: [
+                                      Container(
+                                        width: (MediaQuery.of(context).size.width-wsp(56))*0.6,
+                                        padding: EdgeInsets.only(top: hsp(30),left: wsp(40),right: wsp(40)),
+                                        child: Column(
+                                          children: [
+                                            Row(
+                                              children: [
+                                                Text('${_dataArray[index]['setoutInfo']['display']} ',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),),
+                                                Container(
+                                                  height: 2,
+                                                  width: wsp(50),
+                                                  color: Color(0xFFCCCCCC),
+                                                ),
+                                                Text(' ${_dataArray[index]['arriveInfo']['display']}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),)
+                                              ],
+                                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            ),
+                                            Container(
+                                              child: Row(
+                                                children: [
+                                                  Text('${_dataArray[index]['setoutInfo']['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF9A9A9A)),),
+                                                  Text('${_dataArray[index]['arriveInfo']['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF9A9A9A)),),
+                                                ],
+                                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                              ),
+                                              margin: EdgeInsets.only(top: hsp(10),bottom: hsp(20)),
+                                            ),
+                                            Row(
+                                              children: [
+                                                Container(
+                                                  color: Color(0xFF000000),
+                                                  height: hsp(35),
+                                                  child: Row(
+                                                    children: [
+                                                      Image(image: AssetImage('lib/images/vip2.png'),height: hsp(15),width: wsp(16),),
+                                                      Text(' ${_dataArray[index]['dtFlightInformation']['model']}',style: TextStyle(fontSize: zsp(18),color: Color(0xFFF9DEAC)),)
+                                                    ],
+                                                  ),
+                                                  padding: EdgeInsets.only(left: wsp(5),right: wsp(5)),
+                                                ),
+                                                Container(
+                                                  padding: EdgeInsets.only(left: wsp(5),right: wsp(5)),
+                                                  height: hsp(35),
+                                                  child: Text('座位${_dataArray[index]['dtFlightInformation']['seatNum']}',style: TextStyle(fontSize: zsp(20),color: Color(0xFF565656)),),
+                                                  decoration: BoxDecoration(
+                                                      border: Border.all(color: Color(0xFF565656),width: 0.5)
+                                                  ),
+                                                  alignment: Alignment.center,
+                                                ),
+                                              ],
+                                            )
+                                          ],
+                                        ),
+                                      ),
+                                      Container(
+                                        width: (MediaQuery.of(context).size.width-wsp(56))*0.4,
+                                        child: Column(
+                                          children: [
+                                            RichText(
+                                              text: TextSpan(
+                                                  text: '¥ ',
+                                                  style: TextStyle(fontSize: zsp(20),color: Color(0xFFEB423B),fontWeight: FontWeight.normal),
+                                                  children: [
+                                                    TextSpan(
+                                                      text: '${_dataArray[index]['discountPrice']}',
+                                                      style: TextStyle(fontSize: zsp(42),fontWeight: FontWeight.bold),
+                                                    ),
+                                                    TextSpan(
+                                                      text: ' 元起',
+                                                    )
+                                                  ]
+                                              ),
+                                            ),
+                                            Container(
+                                              child: Text('原价: ${_dataArray[index]['price']}元起/座',style: TextStyle(fontSize: zsp(24),color: Color(0xFFA2A2A2),decoration: TextDecoration.lineThrough),),
+                                              margin: EdgeInsets.only(top: hsp(10)),
+                                            )
+                                          ],
+                                        ),
+                                      ),
+                                    ],
+                                  )
+                                ],
+                              ),
+                            ):Container(
+                              padding: EdgeInsets.all(hsp(30)),
+                              color: Colors.white,
+                              child: Row(
+                                children: [
+                                  Container(
+                                    height: hsp(240),
+                                    width: hsp(240),
+                                    decoration: BoxDecoration(
+                                      color: Colors.lightGreen,
+                                      borderRadius: BorderRadius.all(Radius.circular(5))
+                                    ),
+                                  ),
+                                  Container(
+                                    width: (MediaQuery.of(context).size.width-hsp(280))*0.55,
+                                    padding: EdgeInsets.only(top: hsp(30),left: wsp(30),right: wsp(30)),
+                                    child: Column(
+                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                      children: [
+                                        Row(
+                                          children: [
+                                            Text('${_dataArray[index]['setoutInfo']['display']}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),),
+                                            Container(
+                                              height: 2,
+                                              width: wsp(40),
+                                              color: Color(0xFFCCCCCC),
+                                            ),
+                                            Text('${_dataArray[index]['arriveInfo']['display']}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),)
+                                          ],
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                        ),
+                                        Container(
+                                          child: Row(
+                                            children: [
+                                              Text('${_dataArray[index]['setoutInfo']['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF9A9A9A)),),
+                                              Text('${_dataArray[index]['arriveInfo']['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF9A9A9A)),),
+                                            ],
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          ),
+                                          margin: EdgeInsets.only(top: hsp(10),bottom: hsp(20)),
+                                        ),
+                                        Row(
+                                          children: [
+                                            Container(
+                                              color: Color(0xFF000000),
+                                              height: hsp(35),
+                                              child: Row(
+                                                children: [
+                                                  Image(image: AssetImage('lib/images/vip2.png'),height: hsp(15),width: wsp(16),),
+                                                  Text(' ${_dataArray[index]['dtFlightInformation']['model']}',style: TextStyle(fontSize: zsp(18),color: Color(0xFFF9DEAC)),)
+                                                ],
+                                              ),
+                                              padding: EdgeInsets.only(left: wsp(5),right: wsp(5)),
+                                            ),
+                                            Container(
+                                              padding: EdgeInsets.only(left: wsp(5),right: wsp(5)),
+                                              height: hsp(35),
+                                              child: Text('座位${_dataArray[index]['dtFlightInformation']['seatNum']}',style: TextStyle(fontSize: zsp(20),color: Color(0xFF565656)),),
+                                              decoration: BoxDecoration(
+                                                  border: Border.all(color: Color(0xFF565656),width: 0.5)
+                                              ),
+                                              alignment: Alignment.center,
+                                            ),
+                                          ],
+                                        ),
+                                        Container(
+                                          child: Text('8月12日 18:00',style: TextStyle(fontSize: zsp(28),color: Colors.black,fontWeight: FontWeight.bold),),
+                                          margin: EdgeInsets.only(top: hsp(20)),
+                                        )
+                                      ],
+                                    ),
+                                  ),
+                                  Container(
+                                    width: (MediaQuery.of(context).size.width-wsp(280))*0.42,
+                                    child: Column(
+                                      children: [
+                                        RichText(
+                                          text: TextSpan(
+                                              text: '¥ ',
+                                              style: TextStyle(fontSize: zsp(20),color: Color(0xFFEB423B),fontWeight: FontWeight.normal),
+                                              children: [
+                                                TextSpan(
+                                                  text: '${_dataArray[index]['discountPrice']}',
+                                                  style: TextStyle(fontSize: zsp(42),fontWeight: FontWeight.bold),
+                                                ),
+                                                TextSpan(
+                                                  text: ' 元起',
+                                                )
+                                              ]
+                                          ),
+                                        ),
+                                        Container(
+                                          child: Text('原价: ${_dataArray[index]['price']}元起/座',style: TextStyle(fontSize: zsp(24),color: Color(0xFFA2A2A2),decoration: TextDecoration.lineThrough),),
+                                          margin: EdgeInsets.only(top: hsp(10)),
+                                        )
+                                      ],
+                                    ),
+                                  )
+                                ],
+                              ),
+                            ),
+                          );
+                        },
+                        separatorBuilder: (context,index){
+                          return Divider(height: hsp(20),thickness: hsp(20),color: Color(0xFFF1F2F3),);
+                        },
+                        itemCount: _dataArray.length,
+                        padding: EdgeInsets.all(0),
+                      ),
+                    )
+                  ),
+                ],
+              )
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  Future<void> _refreshData() async{
+    _page = 1;
+    Map request = {};
+    request['category'] = 8;
+    request['type'] = _type+1;
+    request['pageNo'] = _page;
+    request['pageSize'] = 10;
+    if(_siftDict!=null&&_siftDict2!=null){
+      if(_type==2){
+        if(_startCity2!=null)request['setout'] = _startCity2['display'];
+        if(_endCity2!=null)request['arrive'] = _endCity2['display'];
+        request['maxDistance'] = _siftDict['distance'][_priceIndex]['max'];
+        request['minDistance'] = _siftDict['distance'][_priceIndex]['min'];
+        request['time'] = _siftDict['date'][_dateIndex2].replaceAll('.', '-');
+      }else{
+        request['time'] = _siftDict['date'][_dateIndex].replaceAll('.', '-');
+        request['maxPrice'] = _siftDict['price'][_priceIndex]['max'];
+        request['minPrice'] = _siftDict['price'][_priceIndex]['min'];
+        if(_startCity!=null)request['setout'] = _startCity['display'];
+        if(_endCity!=null)request['arrive'] = _endCity['display'];
+        request['partnerId'] = _siftDict['partner'][_plansIndex]['id'];
+      }
+    }
+    if(_selected==1){
+      request['sales'] = 1;
+    }
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/AirTour/list',parameter: request,isLoading: false,isToken: false);
+    if(dict!=null){
+      setState(() {
+        _dataArray = dict['data']['resultList'];
+      });
+    }
+  }
+
+  Future<void> _loadMoreData() async{
+    _page++;
+    Map request = {};
+    request['category'] = 8;
+    request['type'] = _type+1;
+    request['pageNo'] = _page;
+    request['pageSize'] = 10;
+    if(_siftDict!=null&&_siftDict2!=null){
+      if(_type==2){
+        if(_startCity2!=null)request['setout'] = _startCity2['display'];
+        if(_endCity2!=null)request['arrive'] = _endCity2['display'];
+        request['maxDistance'] = _siftDict['distance'][_priceIndex]['max'];
+        request['minDistance'] = _siftDict['distance'][_priceIndex]['min'];
+        request['time'] = _siftDict['date'][_dateIndex2].replaceAll('.', '-');
+      }else{
+        request['time'] = _siftDict['date'][_dateIndex].replaceAll('.', '-');
+        request['maxPrice'] = _siftDict['price'][_priceIndex]['max'];
+        request['minPrice'] = _siftDict['price'][_priceIndex]['min'];
+        if(_startCity!=null)request['setout'] = _startCity['display'];
+        if(_endCity!=null)request['arrive'] = _endCity['display'];
+        request['partnerId'] = _siftDict['partner'][_plansIndex]['id'];
+      }
+    }
+    if(_selected==1){
+      request['sales'] = 1;
+    }
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/AirTour/list',parameter: request,isLoading: false,isToken: false);
+    if(dict!=null){
+      setState(() {
+        _dataArray.addAll(dict['data']['resultList']);
+      });
+    }
+  }
+
+  _getDateStr(String date) {
+    DateTime time = DateTime.parse(date);
+    String timeStr = '${time.month}月${time.day}日 '+time.hour.toString().padLeft(2,'0')+':'+time.minute.toString().padLeft(2,'0');
+    return timeStr;
+  }
+
+  _getSiftData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/preferential/filter',parameter: {},isLoading: false,isToken: false);
+    if(dict!=null){
+      _siftDict = dict['data'];
+      List array = [];
+      DateTime date = DateTime.now();
+      for(int i = 0;i<7;i++){
+        String timeStr = '${date.year}.${date.month}.${date.day}';
+        array.add(timeStr);
+        date = date.add(Duration(days: 1));
+      }
+      _siftDict['date'] = array;
+      setState(() {
+
+      });
+    }
+  }
+}

+ 1082 - 0
ysairplane1/lib/code/YSContractPlaneDetail.dart

@@ -0,0 +1,1082 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/code/YSContact.dart';
+import 'package:ysairplane/code/YSPay.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSContractPlaneDetail extends StatefulWidget {
+  final contractId,isWhole;
+  const YSContractPlaneDetail({Key key, this.contractId, this.isWhole}) : super(key: key);
+  @override
+  _YSContractPlaneDetailState createState() => _YSContractPlaneDetailState();
+}
+
+class _YSContractPlaneDetailState extends State<YSContractPlaneDetail> {
+  //List _tags = ['服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)','服务热情(346)',];
+  bool _isDetail = false;
+  bool _isOrder = false;
+  Map _msgDict,_detailDict;
+  List _chooses = [];
+  String _timeStr;
+  List _packList = [];
+  List _priceList = [];
+  int _index = 0;
+  List _customer = [];
+  bool _isShow = false;
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getBackImageData();
+      _getContractPlaneDetailData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: Color(0xFFF1F2F4),
+      body: Stack(
+        children: [
+          SingleChildScrollView(
+            child: Column(
+              children: [
+                Container(
+                  height: MediaQuery.of(context).size.height-hsp(120),
+                  child: SingleChildScrollView(
+                    child: Stack(
+                      children: [
+                        Container(
+                          height: MediaQuery.of(context).padding.top+hsp(380),
+                          width: MediaQuery.of(context).size.width,
+                          child: Image(
+                            image: _msgDict==null?AssetImage('lib/images/home3.png'):NetworkImage('${_msgDict['background']}'),
+                            fit: BoxFit.fill,
+                          ),
+                        ),
+                        GestureDetector(
+                          onTap: (){Navigator.pop(context);},
+                          child: Container(
+                            margin: EdgeInsets.only(left: wsp(32),top: MediaQuery.of(context).padding.top+hsp(30)),
+                            child: Icon(Icons.arrow_back_ios,size: hsp(40),color: Colors.white,),
+                          ),
+                        ),
+                        if(_msgDict!=null)Container(
+                          margin: EdgeInsets.only(left: wsp(50),top: MediaQuery.of(context).padding.top+hsp(200)),
+                          child: RichText(
+                            text: TextSpan(
+                                text: '${_msgDict['name']}   ',
+                                style: TextStyle(fontSize: zsp(50),color: Colors.white,fontWeight: FontWeight.bold),
+                                children: [
+                                  TextSpan(
+                                      text: '${_msgDict['subtitle']}',
+                                      style: TextStyle(fontWeight: FontWeight.normal,fontSize: zsp(28),color: Colors.white.withOpacity(0.5))
+                                  )
+                                ]
+                            ),
+                          ),
+                        ),
+                        Container(
+                          margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(300)),
+                          child: Column(
+                            children: [
+                              Container(
+                                width: MediaQuery.of(context).size.width-wsp(60),
+                                margin: EdgeInsets.only(left: wsp(30),bottom: hsp(20)),
+                                padding: EdgeInsets.all(hsp(30)),
+                                decoration: BoxDecoration(
+                                  borderRadius: BorderRadius.all(Radius.circular(10)),
+                                  color: Colors.white,
+                                ),
+                                child: Column(
+                                  crossAxisAlignment: CrossAxisAlignment.start,
+                                  children: [
+                                    Container(
+                                      margin: EdgeInsets.only(bottom: hsp(30)),
+                                      child: Row(
+                                        children: [
+                                          RichText(
+                                            text: TextSpan(
+                                                text: '${_detailDict!=null?_detailDict['dtPartner']['partnerName']:''}',
+                                                style: TextStyle(fontSize: zsp(28),color: Color(0xFF444444)),
+                                                children: [
+                                                  TextSpan(
+                                                      text: '  >',
+                                                      style: TextStyle(color: Color(0xFF2C7CF6))
+                                                  )
+                                                ]
+                                            ),
+                                          ),
+                                          Container(
+                                            margin: EdgeInsets.only(left: wsp(40)),
+                                            child: RichText(
+                                              text: TextSpan(
+                                                  text: '${_detailDict!=null?_detailDict['dtFlightInformation']['model']:''}',
+                                                  style: TextStyle(fontSize: zsp(28),color: Color(0xFF444444)),
+                                                  children: [
+                                                    TextSpan(
+                                                        text: '  >',
+                                                        style: TextStyle(color: Color(0xFF2C7CF6))
+                                                    )
+                                                  ]
+                                              ),
+                                            ),
+                                          )
+                                        ],
+                                      ),
+                                    ),
+                                    Divider(height: 0.5,thickness: 0.5,color: Color(0xFFEAEAEA),),
+                                    Container(
+                                      padding: EdgeInsets.only(top: hsp(30),bottom: hsp(30)),
+                                      child: Column(
+                                        children: [
+                                          Row(
+                                            children: [
+                                              Container(
+                                                child: Text('${_detailDict!=null?_detailDict['setoutInfo']['display']:''}',
+                                                  style: TextStyle(fontSize: zsp(40),fontWeight: FontWeight.bold,color: Colors.black),),
+                                                width: (MediaQuery.of(context).size.width-hsp(210))/2,
+                                                alignment: Alignment.centerLeft,
+                                              ),
+                                              Image(height: hsp(60),width: hsp(60),image: AssetImage('lib/images/plane.png'),),
+                                              Container(
+                                                child: Text('${_detailDict!=null?_detailDict['arriveInfo']['display']:''}',style: TextStyle(fontSize: zsp(40),fontWeight: FontWeight.bold,color: Colors.black),),
+                                                width: (MediaQuery.of(context).size.width-hsp(210))/2,
+                                                alignment: Alignment.centerRight,
+                                              ),
+                                            ],
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          ),
+                                          Row(
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            children: [
+                                              Container(
+                                                child: Text('${_detailDict!=null?_detailDict['setoutInfo']['airplanename']:''}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                                width: (MediaQuery.of(context).size.width-hsp(400))/2,
+                                                alignment: Alignment.centerLeft,
+                                              ),
+                                              Text('${_detailDict!=null?_detailDict['hour']:''}',style: TextStyle(fontSize: zsp(20),color: Color(0xFF343434)),),
+                                              Container(
+                                                child: Text('${_detailDict!=null?_detailDict['arriveInfo']['airplanename']:''}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                                width: (MediaQuery.of(context).size.width-hsp(400))/2,
+                                                alignment: Alignment.centerRight,
+                                              ),
+                                            ],
+                                          ),
+                                        ],
+                                      ),
+                                    ),
+                                    Divider(height: 0.5,thickness: 0.5,color: Color(0xFFEAEAEA),),
+                                    Container(
+                                      padding: EdgeInsets.only(top: hsp(20)),
+                                      child: Column(
+                                        children: [
+                                          Text('出发',style: TextStyle(fontSize: zsp(24),color: Color(0xFF666666)),),
+                                          RichText(
+                                            text: TextSpan(
+                                                text: '${_detailDict!=null?_detailDict['flightTime']:''}',
+                                                style: TextStyle(fontSize: zsp(36),fontWeight: FontWeight.bold,color: Colors.black),
+                                                children: [
+                                                  // TextSpan(
+                                                  //   text: '今天',
+                                                  //   style: TextStyle(fontSize: zsp(24),fontWeight: FontWeight.normal),
+                                                  // )
+                                                ]
+                                            ),
+                                          )
+                                        ],
+                                        crossAxisAlignment: CrossAxisAlignment.start,
+                                      ),
+                                    )
+                                  ],
+                                ),
+                              ),
+                              Container(
+                                width: MediaQuery.of(context).size.width-wsp(60),
+                                margin: EdgeInsets.only(left: wsp(30)),
+                                padding: EdgeInsets.all(hsp(30)),
+                                decoration: BoxDecoration(
+                                  borderRadius: BorderRadius.all(Radius.circular(10)),
+                                  color: Colors.white,
+                                ),
+                                child: Column(
+                                  children: [
+                                    Row(
+                                      children: [
+                                        Text('评价(${_detailDict!=null?_detailDict['dtOrderScoringNum']:''})',style: TextStyle(fontSize: zsp(36),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                                        Text('更多',style: TextStyle(fontSize: zsp(28),color: Color(0xFF444444)),),
+                                      ],
+                                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                    ),
+                                    Container(
+                                      margin: EdgeInsets.only(top: hsp(30),bottom: hsp(30),right: wsp(10)),
+                                      height: hsp(120),
+                                      child: Row(
+                                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                        children: [
+                                          Container(
+                                            child: Column(
+                                              children: [
+                                                RichText(
+                                                  text: TextSpan(
+                                                      text: '${_detailDict!=null?_detailDict['averageRating']:'0'}',
+                                                      style: TextStyle(fontSize: zsp(60),color: Color(0xFFED5E58),fontWeight: FontWeight.bold),
+                                                      children: [
+                                                        TextSpan(
+                                                          text: '  超赞',
+                                                          style: TextStyle(fontSize: zsp(24),fontWeight: FontWeight.normal),
+                                                        )
+                                                      ]
+                                                  ),
+                                                ),
+                                                Text('高于${_detailDict!=null?_detailDict['scoreScale']:'0'}同类型航空',style: TextStyle(fontSize: zsp(20),color: Color(0xFF202020)),),
+                                              ],
+                                            ),
+                                            width: wsp(200),
+                                          ),
+                                          Container(
+                                            height: hsp(120),
+                                            width: MediaQuery.of(context).size.width-hsp(120)-wsp(210)-wsp(60),
+                                            margin: EdgeInsets.only(left: wsp(10),right: wsp(0)),
+                                            child: GridView.builder(
+                                              gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                                                  crossAxisCount: 2,
+                                                  childAspectRatio: (MediaQuery.of(context).size.width-hsp(120)-wsp(210)-wsp(60))/2/hsp(60)
+                                              ),
+                                              itemBuilder: (context, index) {
+                                                return Container(
+                                                  height: hsp(60),
+                                                  child: Row(
+                                                    children: [
+                                                      Text('${_detailDict['dtOrderScoringTypeList'][index]['name']}  ${_detailDict['dtOrderScoringTypeList'][index]['avatarOrderScoring']}  ',style: TextStyle(fontSize: zsp(22),color: Color(0xFF202020)),),
+                                                      Container(
+                                                        height: hsp(8),
+                                                        decoration: BoxDecoration(
+                                                            color: Color(0xFFED5E58),
+                                                            borderRadius: BorderRadius.all(Radius.circular(50))
+                                                        ),
+                                                        width: wsp(60)*(double.parse('${_detailDict['dtOrderScoringTypeList'][index]['avatarOrderScoring']}')/
+                                                            double.parse('${_detailDict['dtOrderScoringTypeList'][index]['totalScore']}')),
+                                                      )
+                                                    ],
+                                                  ),
+                                                );
+                                              },
+                                              itemCount: _detailDict!=null?_detailDict['dtOrderScoringTypeList'].length:0,
+                                              padding: EdgeInsets.all(0),
+                                              physics: NeverScrollableScrollPhysics(),
+                                            ),
+                                          )
+                                        ],
+                                      ),
+                                    ),
+                                    // Container(
+                                    //   width: MediaQuery.of(context).size.width-hsp(120),
+                                    //   child: Wrap(
+                                    //       alignment: WrapAlignment.start,
+                                    //       children: <Widget>[
+                                    //         for (int i =0;i<_tags.length;i++ ) GestureDetector(
+                                    //           behavior: HitTestBehavior.opaque,
+                                    //           onTap: (){
+                                    //
+                                    //           },
+                                    //           child: Container(
+                                    //             margin: EdgeInsets.symmetric(vertical: hsp(10), horizontal: hsp(10)),
+                                    //             decoration: BoxDecoration(
+                                    //                 color: Color(0xFFFDF1F1),
+                                    //                 borderRadius: BorderRadius.all(Radius.circular(5))
+                                    //             ),
+                                    //             padding: EdgeInsets.only(left: wsp(15), right: wsp(15),top: hsp(10),bottom: hsp(10)),
+                                    //             child: Text('${_tags[i]}', style: TextStyle(fontSize: zsp(22),color: Color(0xFF000000)), textAlign: TextAlign.center,),
+                                    //           ),
+                                    //         )
+                                    //       ]
+                                    //   ),
+                                    // ),
+                                    ListView.separated(
+                                      shrinkWrap: true,
+                                      itemBuilder: (context,index){
+                                        return Container(
+                                          child: Column(
+                                            crossAxisAlignment: CrossAxisAlignment.start,
+                                            children: [
+                                              Row(
+                                                children: [
+                                                  Container(
+                                                    height: hsp(90),
+                                                    width: hsp(90),
+                                                    margin: EdgeInsets.only(right: wsp(20)),
+                                                    decoration: BoxDecoration(
+                                                      color: Colors.lightGreen,
+                                                      borderRadius: BorderRadius.all(Radius.circular(50)),
+                                                      image: DecorationImage(image: NetworkImage('${_detailDict['dtOrderScoringContentList'][index]['dtUsers']['avatar']}'),fit: BoxFit.fill)
+                                                    ),
+                                                  ),
+                                                  Container(
+                                                    height: hsp(80),
+                                                    child: Column(
+                                                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                                      children: [
+                                                        Text('${_detailDict['dtOrderScoringContentList'][index]['dtUsers']['nickname']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                                                        Text('${_detailDict['dtOrderScoringContentList'][index]['createTime']}',style: TextStyle(fontSize: zsp(22),color: Color(0xFF9A9A9A)),)
+                                                      ],
+                                                    ),
+                                                  )
+                                                ],
+                                              ),
+                                              Container(
+                                                  margin: EdgeInsets.only(top: hsp(20),bottom: hsp(20)),
+                                                  child: ysTextExpend(text: '${_detailDict['dtOrderScoringContentList'][index]['content']}',
+                                                    style: TextStyle(fontSize: zsp(28),color: Color(0xFF000000)),maxLines: 3,)
+                                              ),
+                                              if((_detailDict['dtOrderScoringContentList'][index]['picture']).length>0)GridView.builder(
+                                                shrinkWrap: true,
+                                                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                                                    crossAxisCount: 3,
+                                                    childAspectRatio: (MediaQuery.of(context).size.width-hsp(140)-wsp(60))/3/hsp(160),
+                                                    crossAxisSpacing: hsp(10),
+                                                    mainAxisSpacing: hsp(10)
+                                                ),
+                                                itemBuilder: (context, indexSub) {
+                                                  return Container(
+                                                    height: hsp(160),
+                                                    child: Image(
+                                                      image: NetworkImage('${(_detailDict['dtOrderScoringContentList'][index]['picture']).split(',')[indexSub]}'),
+                                                      fit: BoxFit.fill,
+                                                    ),
+                                                  );
+                                                },
+                                                itemCount: _detailDict!=null?(_detailDict['dtOrderScoringContentList'][index]['picture']).split(',').length:0,
+                                                padding: EdgeInsets.all(0),
+                                                physics: NeverScrollableScrollPhysics(),
+                                              )
+                                            ],
+                                          ),
+                                        );
+                                      },
+                                      separatorBuilder: (context,index){
+                                        return Divider(color: Colors.white,height: hsp(20),thickness: hsp(20),);
+                                      },
+                                      itemCount: (_detailDict!=null&&_detailDict['dtOrderScoringContentList']!=null)?_detailDict['dtOrderScoringContentList'].length:0,
+                                      padding: EdgeInsets.only(left: hsp(15),right: hsp(15),top: hsp(15)),
+                                      physics: NeverScrollableScrollPhysics(),
+                                    ),
+                                  ],
+                                ),
+                              ),
+                              Container(
+                                width: MediaQuery.of(context).size.width-wsp(60),
+                                margin: EdgeInsets.only(left: wsp(30),bottom: hsp(50),top: hsp(20)),
+                                padding: EdgeInsets.all(hsp(30)),
+                                decoration: BoxDecoration(
+                                  borderRadius: BorderRadius.all(Radius.circular(10)),
+                                  color: Colors.white,
+                                ),
+                                child: Column(
+                                  crossAxisAlignment: CrossAxisAlignment.start,
+                                  children: [
+                                    Text('航线详情',style: TextStyle(fontSize: zsp(36),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                                    Container(
+                                        margin: EdgeInsets.only(top: hsp(30),bottom: hsp(10)),
+                                        child: RichText(
+                                          text: TextSpan(
+                                              text: '航线:  ',
+                                              style: TextStyle(fontSize: zsp(28),color: Color(0xFF929292)),
+                                              children: [
+                                                TextSpan(
+                                                    text: '${_detailDict!=null?_detailDict['setoutInfo']['display']:''} - ${_detailDict!=null?_detailDict['arriveInfo']['display']:''}',
+                                                    style: TextStyle(color: Color(0xFF343434))
+                                                )
+                                              ]
+                                          ),
+                                        )
+                                    ),
+                                    RichText(
+                                      text: TextSpan(
+                                          text: '日期:  ',
+                                          style: TextStyle(fontSize: zsp(28),color: Color(0xFF929292)),
+                                          children: [
+                                            TextSpan(
+                                                text: '${_detailDict!=null?_detailDict['flightTime']:''}',
+                                                style: TextStyle(color: Color(0xFF343434))
+                                            )
+                                          ]
+                                      ),
+                                    )
+
+                                  ],
+                                ),
+                              )
+                            ],
+                          ),
+                        ),
+                      ],
+                    ),
+                  ),
+                ),
+                Row(
+                  children: [
+                    Container(
+                      width: MediaQuery.of(context).size.width*0.2,
+                      height: hsp(120),
+                      color: Colors.white,
+                      alignment: Alignment.center,
+                      child: Column(
+                        mainAxisSize: MainAxisSize.min,
+                        children: [
+                          Icon(Icons.headset,color: Color(0xFF2C7CF6),size: hsp(40),),
+                          Text('咨询',style: TextStyle(fontSize: zsp(22),color: Color(0xFF007EFF),fontWeight: FontWeight.bold),)
+                        ],
+                      ),
+                    ),
+                    GestureDetector(
+                      onTap: (){
+                        _timeStr = DateTime.now().year.toString()+'-'+DateTime.now().month.toString().padLeft(2,'0')+'-'+DateTime.now().day.toString().padLeft(2,'0')+' '+
+                            DateTime.now().hour.toString().padLeft(2,'0')+':'+DateTime.now().minute.toString().padLeft(2,'0');
+                        _index = 0;
+                        _getPackData();
+                      },
+                      child: Container(
+                        width: MediaQuery.of(context).size.width*0.8,
+                        height: hsp(120),
+                        color: widget.isWhole==true?Color(0xFF51A2F5):Color(0xFF007EFF),
+                        alignment: Alignment.center,
+                        child: Column(
+                          mainAxisSize: MainAxisSize.min,
+                          children: [
+                            Text('${widget.isWhole==1?'整机':'拼机'}特惠价 (元)',style: TextStyle(fontSize: zsp(20),color: Colors.white,fontWeight: FontWeight.bold),),
+                            Text('¥${_detailDict!=null?_detailDict[widget.isWhole==1?'discountPrice':'retailPrice']:''}',style: TextStyle(fontSize: zsp(36),color: Colors.white,fontWeight: FontWeight.bold),)
+                          ],
+                        ),
+                      ),
+                    ),
+                  ],
+                )
+              ],
+            ),
+          ),
+          if(_isOrder==true)GestureDetector(
+            onTap: (){
+              setState(() {
+                _isOrder = false;
+              });
+            },
+            child: Container(
+              height: MediaQuery.of(context).size.height,
+              width: MediaQuery.of(context).size.width,
+              color: Colors.black54,
+              child: GestureDetector(
+                onTap: (){},
+                child: Column(
+                  children: [
+                    Container(
+                      height: MediaQuery.of(context).size.height*0.8-hsp(120),
+                      width: MediaQuery.of(context).size.width,
+                      margin: EdgeInsets.only(top: MediaQuery.of(context).size.height*0.2),
+                      decoration: BoxDecoration(
+                        color: Color(0xFFF1F2F3),
+                        borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                      ),
+                      child: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          Container(
+                            height: hsp(100),
+                            decoration: BoxDecoration(
+                                color: Colors.white,
+                                borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                            ),
+                            padding: EdgeInsets.only(left: 15,right: 15),
+                            child: Row(
+                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                              children: [
+                                Container(width: wsp(50),),
+                                Text('订单确认',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                GestureDetector(
+                                  child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                  onTap: (){
+                                    setState(() {
+                                      _isOrder = false;
+                                    });
+                                  },
+                                ),
+                              ],
+                            ),
+                          ),
+                          Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE5E5E5),),
+                          Container(
+                            height: MediaQuery.of(context).size.height*0.8-hsp(220)-0.5,
+                            child: SingleChildScrollView(
+                              padding: EdgeInsets.all(0),
+                              child: Column(
+                                children: [
+                                  Container(
+                                    padding: EdgeInsets.all(hsp(30)),
+                                    color: Colors.white,
+                                    width: MediaQuery.of(context).size.width,
+                                    child: Column(
+                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                      children: [
+                                        Text('使用日期',style: TextStyle(fontSize: zsp(30),color: Color(0xFF9A9A9A)),),
+                                        Container(
+                                          margin: EdgeInsets.only(top: hsp(20)),
+                                          child: Row(
+                                            children: [
+                                              Container(
+                                                height: hsp(120),
+                                                width: MediaQuery.of(context).size.width-hsp(200),
+                                                child: ListView.separated(
+                                                  itemBuilder: (context,index){
+                                                    return GestureDetector(
+                                                      behavior: HitTestBehavior.opaque,
+                                                      onTap: (){
+                                                        _timeStr = _priceList[index]['time'];
+                                                        setState(() {
+                                                          _index = index;
+                                                        });
+                                                      },
+                                                      child: Stack(
+                                                        children: [
+                                                          Container(
+                                                            height: hsp(120),
+                                                            width: (MediaQuery.of(context).size.width-hsp(230))/3,
+                                                            decoration: BoxDecoration(
+                                                                color: index==_index?Color(0xFF007EFF):Color(0xFFF0EEEE),
+                                                                borderRadius: BorderRadius.all(Radius.circular(5))
+                                                            ),
+                                                            alignment: Alignment.center,
+                                                            child: Text('${_priceList[index]['time']} \n¥${_priceList[index]['price']}',
+                                                              style: TextStyle(fontSize: zsp(20),color: index==_index?Colors.white:Color(0xFF8B8B8B)),textAlign: TextAlign.center,),
+                                                          ),
+                                                          if(_index==index)Container(
+                                                            child: Text(timeTag('${_priceList[index]['time']}'),style: TextStyle(fontSize: zsp(16),color: Color(0xFF007EFF)),),
+                                                            height: hsp(30),
+                                                            padding: EdgeInsets.only(left: wsp(3),right: wsp(3)),
+                                                            decoration: BoxDecoration(
+                                                                color: Color(0xFFF7F7F7),
+                                                                borderRadius: BorderRadius.only(topLeft: Radius.circular(3),bottomRight: Radius.circular(5))
+                                                            ),
+                                                            alignment: Alignment.center,
+                                                          ),
+                                                        ],
+                                                      ),
+                                                    );
+                                                  },
+                                                  separatorBuilder: (context,index){
+                                                    return Container(width: hsp(15),color: Colors.white,);
+                                                  },
+                                                  itemCount: _priceList.length,
+                                                  padding: EdgeInsets.all(0),
+                                                  scrollDirection: Axis.horizontal,
+                                                ),
+                                              ),
+                                              GestureDetector(
+                                                onTap: (){
+                                                  showModalBottomSheet(
+                                                      context: context,
+                                                      builder: (context){
+                                                        return YSDatePicker(
+                                                          choose: (value){
+                                                            Map time = {'time':value.split(' ')[0],'price':_priceList[0]['price']};
+                                                            int index;
+                                                            for(int i=0;i<_priceList.length;i++){
+                                                              if(_priceList[i]['time']==time['time']){
+                                                                index = i;
+                                                              }
+                                                            }
+                                                            if(index!=null){
+                                                              _priceList.removeAt(index);
+                                                            }
+                                                            setState(() {
+                                                              _priceList.insert(0, time);
+                                                            });
+                                                          },
+                                                        );
+                                                      }
+                                                  );
+                                                },
+                                                behavior: HitTestBehavior.opaque,
+                                                child: Container(
+                                                  height: hsp(120),
+                                                  width: hsp(140),
+                                                  alignment: Alignment.center,
+                                                  child: Text('更多\n日期',style: TextStyle(fontSize: zsp(26),color: Color(0xFF007EFF)),),
+                                                ),
+                                              )
+                                            ],
+                                          ),
+                                        ),
+                                      ],
+                                    ),
+                                  ),
+                                  Container(
+                                    padding: EdgeInsets.all(hsp(30)),
+                                    margin: EdgeInsets.only(top: hsp(10)),
+                                    color: Colors.white,
+                                    child: Column(
+                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                      children: [
+                                        Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            Text('成人票',style: TextStyle(fontSize: zsp(40),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                                            Text('¥${_detailDict!=null?_detailDict[widget.isWhole==1?'discountPrice':'retailPrice']:''}',style: TextStyle(fontSize: zsp(40),color: Color(0xFFEB423B)),),
+                                          ],
+                                        ),
+                                        Container(
+                                          margin: EdgeInsets.only(top: hsp(20),bottom: hsp(20)),
+                                          child: Text('${_detailDict!=null?_detailDict['setoutInfo']['display']:''} - ${_detailDict!=null?_detailDict['arriveInfo']['display']:''}',
+                                            style: TextStyle(fontSize: zsp(32),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                                        ),
+                                        GestureDetector(
+                                          onTap: (){
+                                            showModalBottomSheet(
+                                              isScrollControlled: true,
+                                              backgroundColor: Colors.transparent,
+                                              context: context,
+                                              builder: (context){
+                                                return Container(
+                                                  height: MediaQuery.of(context).size.height*0.8,
+                                                  width: MediaQuery.of(context).size.width,
+                                                  decoration: BoxDecoration(
+                                                    color: Colors.white,
+                                                    borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
+                                                  ),
+                                                  child: Column(
+                                                    children: [
+                                                      Container(
+                                                        height: hsp(100),
+                                                        padding: EdgeInsets.only(left: 15,right: 15),
+                                                        child: Row(
+                                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                                          children: [
+                                                            Container(width: wsp(50),),
+                                                            Text('预订须知',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                                            GestureDetector(
+                                                              child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none),),
+                                                              onTap: (){
+                                                                Navigator.pop(context);
+                                                              },
+                                                            ),
+                                                          ],
+                                                        ),
+                                                      ),
+                                                      Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE5E5E5),),
+                                                      Container(
+                                                        height: MediaQuery.of(context).size.height*0.8-hsp(100)-0.5,
+                                                      )
+                                                    ],
+                                                  ),
+                                                );
+                                              }
+                                            );
+                                          },
+                                          child: RichText(
+                                            text: TextSpan(
+                                                text: '预订须知',
+                                                style: TextStyle(fontSize: zsp(24),color: Color(0xFF027FFF)),
+                                                children: [
+                                                  TextSpan(
+                                                      text: ' >',
+                                                      style: TextStyle(color: Color(0xFF000000))
+                                                  )
+                                                ]
+                                            ),
+                                          ),
+                                        )
+                                      ],
+                                    ),
+                                  ),
+                                  Container(
+                                    child: Text('出行人',style: TextStyle(fontSize: zsp(30),color: Color(0xFF9A9A9A)),),
+                                    alignment: Alignment.centerLeft,
+                                    height: hsp(80),
+                                    padding: EdgeInsets.only(left: hsp(30)),
+                                    margin: EdgeInsets.only(top: hsp(10)),
+                                    width: MediaQuery.of(context).size.width,
+                                    color: Colors.white,
+                                  ),
+                                  Container(
+                                    padding: EdgeInsets.only(left: hsp(30),right: hsp(30),top: hsp(20)),
+                                    margin: EdgeInsets.only(top: hsp(1)),
+                                    color: Colors.white,
+                                    width: MediaQuery.of(context).size.width,
+                                    child: Column(
+                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                      children: [
+                                        Container(
+                                          padding: EdgeInsets.only(left: hsp(30),right: hsp(30),bottom: hsp(20)),
+                                          child: GestureDetector(
+                                            onTap: (){
+                                              Navigator.of(context).push(
+                                                  CupertinoPageRoute(
+                                                      builder: (context){
+                                                        return YSContact();
+                                                      }
+                                                  )
+                                              ).then((value){
+                                                if(value!=null){
+                                                  if(_customer.contains(value)){
+                                                    _customer.remove(value);
+                                                  }
+                                                  setState(() {
+                                                    _customer.insert(0, value);
+                                                  });
+                                                }
+                                              });
+                                            },
+                                            child: Container(
+                                              height: hsp(60),
+                                              width: hsp(160),
+                                              decoration: BoxDecoration(
+                                                  color: Color(0xFF007EFF),
+                                                  borderRadius: BorderRadius.all(Radius.circular(5))
+                                              ),
+                                              child: Row(
+                                                mainAxisSize: MainAxisSize.min,
+                                                children: [
+                                                  Icon(Icons.add_circle,color: Colors.white,size: hsp(30),),
+                                                  Text(' 新增',style: TextStyle(fontSize: zsp(28),color: Colors.white),),
+                                                ],
+                                              ),
+                                              alignment: Alignment.center,
+                                            ),
+                                          )
+                                          ,
+                                        ),
+                                      ],
+                                    ),
+                                  ),
+                                  Container(
+                                    color: Colors.white,
+                                    child: ListView.separated(
+                                      itemBuilder: (context,index){
+                                        return Container(
+                                          color: Colors.white,
+                                          padding: EdgeInsets.only(top: hsp(20),bottom: hsp(20),left: hsp(50),right: hsp(50)),
+                                          child: Row(
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            children: [
+                                              GestureDetector(
+                                                child: Icon(Icons.remove_circle,color: Colors.red,size: hsp(50),),
+                                                onTap: (){
+                                                  setState(() {
+                                                    _customer.removeAt(index);
+                                                  });
+                                                },
+                                              ),
+                                              Container(
+                                                width: MediaQuery.of(context).size.width-hsp(180),
+                                                child: Column(
+                                                  crossAxisAlignment: CrossAxisAlignment.start,
+                                                  children: [
+                                                    Text('${_customer[index]['username']}    ${_customer[index]['phone']}',style: TextStyle(fontSize: zsp(34),color: Color(0xFF343434),fontWeight: FontWeight.bold),),
+                                                    Text('身份证 ${_customer[index]['cardid']}',style: TextStyle(fontSize: zsp(25),color: Color(0xFF666666)),)
+                                                  ],
+                                                ),
+                                              ),
+                                              //Icon(Icons.mode_edit,color: Color(0xFF9A9A9A),size: hsp(50),),
+                                            ],
+                                          ),
+                                        );
+                                      },
+                                      separatorBuilder: (context,index){
+                                        return Divider(height: 0.5,thickness: 0.5,indent: hsp(100),);
+                                      },
+                                      itemCount: _customer.length,
+                                      shrinkWrap: true,
+                                      padding: EdgeInsets.all(0),
+                                      physics: NeverScrollableScrollPhysics(),
+                                    ),
+                                  ),
+                                  GestureDetector(
+                                    onTap: (){
+                                      setState(() {
+                                        _isShow = !_isShow;
+                                      });
+                                    },
+                                    behavior: HitTestBehavior.opaque,
+                                    child: Container(
+                                        padding: EdgeInsets.only(left: wsp(40),right: wsp(40),top: hsp(20),bottom: hsp(20)),
+                                        margin: EdgeInsets.only(top: hsp(10)),
+                                        color: Colors.white,
+                                        child: Row(
+                                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          children: [
+                                            Text('更多服务',style: TextStyle(fontSize: zsp(30),color: Color(0xFF9A9A9A)),),
+                                            Icon(Icons.keyboard_arrow_down,size: hsp(50),color: Color(0xFFC1C1C1),)
+                                          ],
+                                        )
+                                    ),
+                                  ),
+                                  if(_isShow==true)Container(
+                                    padding: EdgeInsets.only(left: wsp(32),right: wsp(32),top: hsp(20),bottom: hsp(10)),
+                                    decoration: BoxDecoration(
+                                        color: Color(0xFFFAFAFA),
+                                        borderRadius: BorderRadius.only(bottomRight: Radius.circular(10),bottomLeft: Radius.circular(10))
+                                    ),
+                                    child: ListView.builder(
+                                      shrinkWrap: true,
+                                      itemBuilder: (context,index){
+                                        return Container(
+                                          padding: EdgeInsets.only(bottom: wsp(20)),
+                                          child: Row(
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            children: [
+                                              Row(
+                                                children: [
+                                                  Text('${_packList[index]['name']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),),
+                                                  Container(
+                                                    width: wsp(50),
+                                                    child: GestureDetector(
+                                                      child: Icon(Icons.error_outline,size: hsp(40),color: Color(0xFF999999)),
+                                                    ),
+                                                  ),
+                                                  Text('${_packList[index]['price']}元',style: TextStyle(fontSize: zsp(28),color: Colors.black),),
+                                                ],
+                                              ),
+                                              GestureDetector(
+                                                child: Container(
+                                                  height: hsp(60),
+                                                  width: hsp(100),
+                                                  child: Image.asset(_chooses.contains(_packList[index])==true?'lib/images/kaiguankai.png':'lib/images/kaiguanguan.png'),
+                                                ),
+                                                onTap: (){
+                                                  setState(() {
+                                                    if(_chooses.contains(_packList[index])==true){
+                                                      _chooses.remove(_packList[index]);
+                                                    }else{
+                                                      _chooses.add(_packList[index]);
+                                                    }
+                                                  });
+                                                },
+                                              )
+                                            ],
+                                          ),
+                                        );
+                                      },
+                                      itemCount: _packList.length,
+                                      padding: EdgeInsets.only(bottom: hsp(30)),
+                                      physics: NeverScrollableScrollPhysics(),
+                                    ),
+                                  )
+                                ],
+                              ),
+                            ),
+                          ),
+                        ],
+                      ),
+                    ),
+                    Container(
+                      height: hsp(120),
+                      width: MediaQuery.of(context).size.width,
+                      color: Colors.white,
+                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                      child: Row(
+                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                        children: [
+                          RichText(
+                            text: TextSpan(
+                                text: '参考价(¥)',
+                                style: TextStyle(fontSize: zsp(22),color: Color(0xFF181818)),
+                                children: [
+                                  TextSpan(
+                                    text: ' ${_getPrice()}',
+                                    style: TextStyle(fontSize: zsp(40),color: Color(0xFFFF6600)),
+                                  )
+                                ]
+                            ),
+                          ),
+                          GestureDetector(
+                            child: Row(
+                              children: [
+                                Text('明细',style: TextStyle(fontSize: zsp(22),color: Color(0xFF181818)),),
+                                Icon(Icons.keyboard_arrow_up,size: hsp(30),color: Color(0xFF007EFF),),
+                              ],
+                            ),
+                            onTap: (){
+                              setState(() {
+                                _isDetail = !_isDetail;
+                              });
+                            },
+                          ),
+                          GestureDetector(
+                            onTap: (){
+                              _postPlaneOrderData();
+                            },
+                            child: Container(
+                              height: hsp(70),
+                              padding: EdgeInsets.only(left: wsp(50),right: wsp(50)),
+                              decoration: BoxDecoration(
+                                  color: Color(0xFF007EFF),
+                                  borderRadius: BorderRadius.all(Radius.circular(50))
+                              ),
+                              alignment: Alignment.center,
+                              child: Text('立即预约',style: TextStyle(fontSize: zsp(30),color: Colors.white,fontWeight: FontWeight.bold),),
+                            ),
+                          )
+                        ],
+                      ),
+                    )
+
+                  ],
+                ),
+              ),
+            ),
+          ),
+          if(_isDetail==true)GestureDetector(
+            onTap: (){
+              setState(() {
+                _isDetail = false;
+              });
+            },
+            child: Container(
+              height: MediaQuery.of(context).size.height-hsp(120),
+              color: Colors.black45,
+              child: Container(
+                margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(120)-hsp(370)),
+                height: hsp(370),
+                decoration: BoxDecoration(
+                    color: Colors.white,
+                    borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                ),
+                child: GestureDetector(
+                  onTap: (){},
+                  behavior: HitTestBehavior.opaque,
+                  child: Column(
+                    children: [
+                      Container(
+                        height: hsp(100),
+                        padding: EdgeInsets.only(left: 15,right: 15),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            GestureDetector(
+                              child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none),),
+                              onTap: (){
+                                setState(() {
+                                  _isDetail = false;
+                                });
+                              },
+                            ),
+                            Text('明细',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                            Container(width: wsp(50),),
+                          ],
+                        ),
+                      ),
+                      Container(
+                        height: hsp(100),
+                        color: Color(0xFFF7F8F9),
+                        padding: EdgeInsets.only(left: wsp(40),right: wsp(40),bottom: hsp(20),top: hsp(20)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Text('座位',style: TextStyle(fontSize: zsp(32),color: Color(0xFF000000),decoration: TextDecoration.none),),
+                            Text('¥ ${_priceList[_index]['price']}x ${_customer.length==0?1:_customer.length}人',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none),),
+                          ],
+                        ),
+                      ),
+                      Container(
+                        color: Color(0xFFF7F8F9),
+                        height: hsp(170),
+                        child: ListView.builder(
+                          padding: EdgeInsets.all(0),
+                          itemBuilder: (context,index){
+                            return Container(
+                              padding: EdgeInsets.only(left: wsp(40),right: wsp(40),bottom: hsp(10)),
+                              child: Row(
+                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                children: [
+                                  Text('${_chooses[index]['name']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF9A9A9A)),),
+                                  Text('¥ ${_chooses[index]['price']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF9A9A9A)),),
+                                ],
+                              ),
+                            );
+                          },
+                          itemCount: _chooses.length,
+                        ),
+                      )
+                    ],
+                  ),
+                ),
+              ),
+            ),
+          )
+        ],
+      ),
+    );
+  }
+
+  _getBackImageData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/wallconfigure/get',parameter: {'type':8},isLoading: false,isToken: false);
+    if(dict!=null){
+      setState(() {
+        _msgDict = dict['data'];
+      });
+    }
+  }
+
+  _getContractPlaneDetailData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/AirTour/getTour',parameter: {'type':8,'id':widget.contractId},isLoading: false,isToken: false);
+    if(dict!=null){
+      setState(() {
+        _detailDict = dict['data'];
+      });
+    }
+  }
+
+  _getPackData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneservice/get',parameter: {'type':8},isLoading: true,isToken: false);
+    if(dict!=null){
+      _isOrder = true;
+      _packList = dict['data'];
+      _getPriceData();
+    }
+  }
+
+  _getPriceData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/getDateAndTime',parameter: {'time':_timeStr,'type':8},isLoading: true,isToken: true);
+    if(dict!=null){
+      setState(() {
+        _priceList = dict['data'];
+      });
+    }
+  }
+
+  _getPrice(){
+    double price = double.parse('${_priceList[_index]['price']}')*(_customer.length==0?1:_customer.length);
+    _chooses.forEach((element) {
+      price+=double.parse('${element['price']}');
+    });
+    return price;
+  }
+
+  _postPlaneOrderData() async{
+    Map requestDict = {};
+    requestDict['flightTime'] = _timeStr;
+    requestDict['type'] = 8;
+    requestDict['airlaneId'] = _detailDict['dtPartner']['id'];
+    if(_customer.length>0)requestDict['personnelInfo'] = _customer;
+    requestDict['charterType'] = widget.isWhole==1?1:2;
+    requestDict['airportidSetout'] = _detailDict['setoutInfo']['id'];
+    requestDict['airportidArrive'] = _detailDict['arriveInfo']['id'];
+    requestDict['tourId'] = widget.contractId;
+    List array = [];
+    _chooses.forEach((element) {
+      array.add(element['id']);
+    });
+    requestDict['serviceIds'] = array.join(',');
+    Map dict = await ysRequestHttp(context,type: requestType.post,api: '/app/applets/airplaneorder/createOrder',parameter: requestDict,isLoading: true,isToken: true);
+    if(dict!=null){
+      Navigator.of(context).push(
+          CupertinoPageRoute(
+              builder: (context){
+                return YSPay(orderDict: dict['data'],type: payType.preferential,);
+              }
+          )
+      );
+    }
+  }
+
+}

+ 203 - 0
ysairplane1/lib/code/YSCourse.dart

@@ -0,0 +1,203 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_easyrefresh/easy_refresh.dart';
+import 'package:ysairplane/code/YSCourseDetail.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSCourse extends StatefulWidget {
+  @override
+  _YSCourseState createState() => _YSCourseState();
+}
+
+class _YSCourseState extends State<YSCourse> with AutomaticKeepAliveClientMixin{
+  int _selected = 0;
+  int _page = 1;
+  List _dataArray = [];
+  @override
+  bool get wantKeepAlive => true;
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _refreshData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    super.build(context);
+    return Scaffold(
+      backgroundColor: Color(0xFFF5F5F5),
+      appBar: CupertinoNavigationBar(
+        transitionBetweenRoutes: false,
+        backgroundColor: Colors.white,
+        border: Border(),
+        middle: Container(
+          margin: EdgeInsets.only(left: wsp(150),right: wsp(150)),
+          width: MediaQuery.of(context).size.width-wsp(300),
+          child: ListView.builder(
+            itemBuilder: (context,index){
+              return GestureDetector(
+                onTap: (){
+                  _selected = index;
+                  _refreshData();
+                },
+                child: Container(
+                  width: (MediaQuery.of(context).size.width-wsp(300))/3,
+                  alignment: Alignment.center,
+                  child: Text('${index==0?'全部':index==1?'未出行':'已完成'}',
+                    style: TextStyle(color: _selected==index?Color(0xFF2674ED):Color(0xFF999999),fontWeight: _selected==index?FontWeight.bold:FontWeight.normal,fontSize: zsp(34)),),
+                ),
+              );
+            },
+            itemCount: 3,
+            padding: EdgeInsets.all(0),
+            scrollDirection: Axis.horizontal,
+          ),
+        ),
+      ),
+      body: EasyRefresh(
+        onRefresh: _refreshData,
+        onLoad: _loadMoreData,
+        header: TaurusHeader(
+
+        ),
+        footer: TaurusFooter(
+
+        ),
+        child: ListView.separated(
+          itemBuilder: (context,index){
+            return GestureDetector(
+              onTap: (){
+                Navigator.of(context).push(
+                  CupertinoPageRoute(
+                    builder: (context){
+                      return YSCourseDetail(orderStr: _dataArray[index]['orderSn'],);
+                    }
+                  )
+                );
+              },
+              child: Container(
+                decoration: BoxDecoration(
+                  color: Colors.white,
+                  borderRadius: BorderRadius.all(Radius.circular(10))
+                ),
+                child: Column(
+                  children: [
+                    Container(
+                      padding: EdgeInsets.all(hsp(20)),
+                      child: Row(
+                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                        children: [
+                          Text('${_dataArray[index]['name']}',style: TextStyle(fontSize: zsp(30),color: Color(0xFF141416),fontWeight: FontWeight.bold),),
+                          Text(_dataArray[index]['consumed']==1?'未出行':'已完成',style: TextStyle(fontSize: zsp(30),color: Color(0xFF2B7BF6)),)
+                        ],
+                      ),
+                    ),
+                    Divider(height: 1,thickness: 1,color: Color(0xFFF5F5F5),),
+                    Container(
+                      padding: EdgeInsets.all(hsp(20)),
+                      child: Row(
+                        children: [
+                          Icon(Icons.access_time,color: Color(0xFFBABAC6),size: hsp(28),),
+                          Text('   ${_dataArray[index]['time']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF24242B)),)
+                        ],
+                      ),
+                    ),
+                    _dataArray[index]['arrive']!=null?Container(
+                      width: MediaQuery.of(context).size.width-hsp(80),
+                      child: ListView.builder(
+                        itemBuilder: (context,indexSub2){
+                          return Row(
+                            crossAxisAlignment: CrossAxisAlignment.start,
+                            children: [
+                              Column(
+                                children: [
+                                  Container(
+                                    height: hsp(28),
+                                    width: hsp(28),
+                                    decoration: BoxDecoration(
+                                        color: Colors.white,
+                                        borderRadius: BorderRadius.all(Radius.circular(50)),
+                                        border: Border.all(color: indexSub2==0?Color(0xFF02C094):Color(0xFFFB9658),width: wsp(6))
+                                    ),
+                                    margin: EdgeInsets.only(top: hsp(7),bottom: hsp(7)),
+                                  ),
+                                  if(indexSub2<1)Container(
+                                    height: hsp(28),
+                                    child: DashedRect(
+                                      color: Color(0xFFCACAD4),
+                                      strokeWidth: 1,
+                                      gap: 1
+                                    ),
+                                  )
+                                ],
+                              ),
+                              Container(
+                                child: indexSub2==1?Row(
+                                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                  children: [
+                                    Text('   ${_dataArray[index]['setout']}',style: TextStyle(color: Color(0xFF68686F),fontSize: zsp(28))),
+                                    Icon(Icons.keyboard_arrow_right,size: hsp(50),color: Color(0xFF999999),)
+                                  ],
+                                ):Text('   ${_dataArray[index]['arrive']}',style: TextStyle(color: Color(0xFF68686F),fontSize: zsp(28))),
+                                width: MediaQuery.of(context).size.width-hsp(120),
+                              ),
+                            ],
+                          );
+                        },
+                        itemCount: 2,
+                        shrinkWrap: true,
+                        physics: NeverScrollableScrollPhysics(),
+                        padding: EdgeInsets.only(bottom: hsp(20)),
+                      ),
+                    ):Container(
+                      child: Text('${_dataArray[index]['title']}',style: TextStyle(color: Color(0xFF68686F),fontSize: zsp(28))),
+                      width: MediaQuery.of(context).size.width-hsp(80),
+                      alignment: Alignment.centerLeft,
+                      padding: EdgeInsets.only(bottom: hsp(20)),
+                    )
+                  ],
+                ),
+              ),
+            );
+          },
+          separatorBuilder: (context,index){
+            return Divider(height: hsp(16),thickness: hsp(16),color: Color(0xFFF5F5F5),);
+          },
+          itemCount: _dataArray.length,
+          padding: EdgeInsets.all(hsp(20)),
+          shrinkWrap: true,
+        ),
+      ),
+    );
+  }
+
+  Future<void> _refreshData() async{
+    _page = 1;
+    Map request = {};
+    request['type'] = _selected+1;
+    request['pageNum'] = _page;
+    request['pageSize'] = 10;
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/orderList',parameter: request,isLoading: false,isToken: true);
+    if(dict!=null){
+      setState(() {
+        _dataArray = dict['data']['resultList'];
+      });
+    }
+  }
+
+  Future<void> _loadMoreData() async{
+    _page++;
+    Map request = {};
+    request['type'] = _selected+1;
+    request['pageNum'] = _page;
+    request['pageSize'] = 10;
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/orderList',parameter: request,isLoading: false,isToken: true);
+    if(dict!=null){
+      setState(() {
+        _dataArray.addAll(dict['data']['resultList']);
+      });
+    }
+  }
+}

+ 648 - 0
ysairplane1/lib/code/YSCourseDetail.dart

@@ -0,0 +1,648 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSPayKeybord.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+import 'YSMoney.dart';
+import 'YSSetPayPass.dart';
+
+class YSCourseDetail extends StatefulWidget {
+  final orderStr;
+  const YSCourseDetail({Key key, this.orderStr}) : super(key: key);
+  @override
+  _YSCourseDetailState createState() => _YSCourseDetailState();
+}
+
+class _YSCourseDetailState extends State<YSCourseDetail> {
+  Map _courseDict;
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getCourseDetailData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '订单详情',
+      yscolor: Color(0xFFF5F5F5),
+      yschild: _courseDict!=null?Column(
+        children: [
+          Container(
+            height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-(_courseDict['payStatus']==1?hsp(120):0),
+            child: SingleChildScrollView(
+              child: Column(
+                children: [
+                  Container(
+                    padding: EdgeInsets.only(left: hsp(30),right: hsp(30),top: hsp(50),bottom: hsp(50)),
+                    color: Color(0xFF2B7BF6),
+                    child: Row(
+                      children: [
+                        Icon(Icons.access_time,color: Colors.white,size: hsp(60),),
+                        Container(
+                          padding: EdgeInsets.only(left: hsp(20)),
+                          height: hsp(100),
+                          alignment: Alignment.center,
+                          child: Column(
+                            crossAxisAlignment: CrossAxisAlignment.start,
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              Text(_courseDict['consumed']==1?'待出行':'已完成',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(36),color: Colors.white),),
+                              Text(_courseDict['title']!=null?'${_courseDict['title']}':'${_courseDict['setoutCity']} - ${_courseDict['arriveCity']}   ${_courseDict['name']}',
+                                style: TextStyle(fontSize: zsp(26),color: Colors.white),)
+                            ],
+                          ),
+                        )
+                      ],
+                    ),
+                  ),
+                  _courseDict['type']==7?ListView.separated(
+                    itemBuilder: (context,index){
+                      return Container(
+                        color: Colors.white,
+                        child: Column(
+                          children: [
+                            Row(
+                              children: [
+                                Container(
+                                  height: hsp(40),
+                                  alignment: Alignment.center,
+                                  child: Text('${index+1}',style: TextStyle(fontSize: zsp(20),color: Colors.white),),
+                                  padding: EdgeInsets.only(left: wsp(20),right: wsp(20)),
+                                  margin: EdgeInsets.only(right: wsp(30)),
+                                  decoration: BoxDecoration(
+                                      color: Color(0xFF007EFF),
+                                      borderRadius: BorderRadius.only(topRight: Radius.circular(3),bottomRight: Radius.circular(8))
+                                  ),
+                                ),
+                              ],
+                            ),
+                            Container(
+                              padding: EdgeInsets.all(hsp(20)),
+                              child: Row(
+                                children: [
+                                  Icon(Icons.access_time,color: Color(0xFFBABAC6),size: hsp(28),),
+                                  Text('   ${_courseDict['Itinerary'][index]['timeSetout']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF24242B)),)
+                                ],
+                              ),
+                            ),
+                            Container(
+                              width: MediaQuery.of(context).size.width-hsp(40),
+                              child: ListView.builder(
+                                itemBuilder: (context,indexSub2){
+                                  return Row(
+                                    crossAxisAlignment: CrossAxisAlignment.start,
+                                    children: [
+                                      Column(
+                                        children: [
+                                          Container(
+                                            height: hsp(28),
+                                            width: hsp(28),
+                                            decoration: BoxDecoration(
+                                                color: Colors.white,
+                                                borderRadius: BorderRadius.all(Radius.circular(50)),
+                                                border: Border.all(color: indexSub2==0?Color(0xFF02C094):Color(0xFFFB9658),width: wsp(6))
+                                            ),
+                                            margin: EdgeInsets.only(top: hsp(7),bottom: hsp(7)),
+                                          ),
+                                          if(indexSub2<1)Container(
+                                            height: hsp(28),
+                                            child: DashedRect(
+                                                color: Color(0xFFCACAD4),
+                                                strokeWidth: 1,
+                                                gap: 1
+                                            ),
+                                          )
+                                        ],
+                                      ),
+                                      Container(
+                                        child: Text('   ${_courseDict['Itinerary'][index][indexSub2==0?'setOutInfo':'arriveInfo']['airplanename']}',
+                                            style: TextStyle(color: Color(0xFF68686F),fontSize: zsp(28))),
+                                        width: MediaQuery.of(context).size.width-hsp(120),
+                                      ),
+                                    ],
+                                  );
+                                },
+                                itemCount: 2,
+                                shrinkWrap: true,
+                                physics: NeverScrollableScrollPhysics(),
+                                padding: EdgeInsets.only(bottom: hsp(10)),
+                              ),
+                            )
+                          ],
+                        ),
+                      );
+                    },
+                    separatorBuilder: (context,index){
+                      return Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF5F5F5),);
+                    },
+                    itemCount: _courseDict['Itinerary'].length,
+                    padding: EdgeInsets.only(bottom: hsp(10),top: hsp(10)),
+                    shrinkWrap: true,
+                    physics: NeverScrollableScrollPhysics(),
+                  ):_courseDict['type']==1||_courseDict['type']==3||_courseDict['type']==6||_courseDict['type']==8?ListView.separated(
+                    itemBuilder: (context,index){
+                      return Container(
+                        color: Colors.white,
+                        child: Column(
+                          children: [
+                            Container(
+                              padding: EdgeInsets.all(hsp(20)),
+                              child: Row(
+                                children: [
+                                  Icon(Icons.access_time,color: Color(0xFFBABAC6),size: hsp(28),),
+                                  Text('   ${_courseDict['time']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF24242B)),)
+                                ],
+                              ),
+                            ),
+                            Container(
+                              width: MediaQuery.of(context).size.width-hsp(40),
+                              child: ListView.builder(
+                                itemBuilder: (context,indexSub2){
+                                  return Row(
+                                    crossAxisAlignment: CrossAxisAlignment.start,
+                                    children: [
+                                      Column(
+                                        children: [
+                                          Container(
+                                            height: hsp(28),
+                                            width: hsp(28),
+                                            decoration: BoxDecoration(
+                                                color: Colors.white,
+                                                borderRadius: BorderRadius.all(Radius.circular(50)),
+                                                border: Border.all(color: indexSub2==0?Color(0xFF02C094):Color(0xFFFB9658),width: wsp(6))
+                                            ),
+                                            margin: EdgeInsets.only(top: hsp(7),bottom: hsp(7)),
+                                          ),
+                                          if(indexSub2<1)Container(
+                                            height: hsp(28),
+                                            child: DashedRect(
+                                                color: Color(0xFFCACAD4),
+                                                strokeWidth: 1,
+                                                gap: 1
+                                            ),
+                                          )
+                                        ],
+                                      ),
+                                      Container(
+                                        child: Text('   ${indexSub2==0?_courseDict['setout']:_courseDict['arrive']} ',style: TextStyle(color: Color(0xFF68686F),fontSize: zsp(28))),
+                                        width: MediaQuery.of(context).size.width-hsp(120),
+                                      ),
+                                    ],
+                                  );
+                                },
+                                itemCount: 2,
+                                shrinkWrap: true,
+                                physics: NeverScrollableScrollPhysics(),
+                                padding: EdgeInsets.only(bottom: hsp(10)),
+                              ),
+                            )
+                          ],
+                        ),
+                      );
+                    },
+                    separatorBuilder: (context,index){
+                      return Divider(height: hsp(10),thickness: hsp(10),color: Color(0xFFF5F5F5),);
+                    },
+                    itemCount: 1,
+                    padding: EdgeInsets.only(bottom: hsp(10),top: hsp(10)),
+                    shrinkWrap: true,
+                    physics: NeverScrollableScrollPhysics(),
+                  ):_courseDict['type']==5||_courseDict['type']==9?Container(
+                    height: hsp(85),
+                    color: Colors.white,
+                    padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                    margin: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
+                    child: Row(
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                      children: [
+                        Text(_courseDict['type']==5?'出行时间':'浏览时间',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
+                        Text('2020年09月08日 12:34',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
+                      ],
+                    ),
+                  ):_courseDict['type']==4?ListView.separated(
+                    itemBuilder: (context,index){
+                      return Container(
+                        height: hsp(85),
+                        color: Colors.white,
+                        padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Text(index==0?'婚礼地点':index==1?'婚礼时间':'婚礼人数',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
+                            Text(index==0?'${_courseDict['setoutCity']}':index==1?'${_courseDict['time']}':'${_courseDict['personNum']}人',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
+                          ],
+                        ),
+                      );
+                    },
+                    separatorBuilder: (context,index){
+                      return Divider(color: Color(0xFFF5F5F5),height: 0.5,thickness: 0.5,);
+                    },
+                    itemCount: 3,
+                    padding: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
+                    shrinkWrap: true,
+                  ):ListView.separated(
+                    itemBuilder: (context,index){
+                      return Container(
+                        height: hsp(85),
+                        color: Colors.white,
+                        padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Text(index==0?'救援地点':index==1?'救援时间':index==2?'救援类型':index==3?'涉险人数':'联系电话',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
+                            Text(index==0?'${_courseDict['setoutCity']}':index==1?'${_courseDict['time']}':index==2?'救灾':index==3?'${_courseDict['personNum']}人':'${_getSecretStr('${_courseDict['phone']}')}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
+                          ],
+                        ),
+                      );
+                    },
+                    separatorBuilder: (context,index){
+                      return Divider(color: Color(0xFFF5F5F5),height: 0.5,thickness: 0.5,);
+                    },
+                    itemCount: 5,
+                    padding: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
+                    shrinkWrap: true,
+                  ),
+                  if(_courseDict['personInfos']!=null)Container(
+                    padding: EdgeInsets.only(top: hsp(30),bottom: hsp(30)),
+                    width: MediaQuery.of(context).size.width,
+                    color: Colors.white,
+                    child: Row(
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      children: [
+                        Container(
+                          width: wsp(150),
+                          alignment: Alignment.center,
+                          child: Text('乘机人',style: TextStyle(fontSize: zsp(30),color: Color(0xFF9A9A9A)),),
+                        ),
+                        Container(
+                          width: MediaQuery.of(context).size.width-hsp(60)-wsp(150),
+                          child: ListView.separated(
+                            itemBuilder: (context,index){
+                              return Container(
+                                width: MediaQuery.of(context).size.width-hsp(60)-wsp(150),
+                                padding: EdgeInsets.only(bottom: index==1?0:hsp(20),top: index==0?0:hsp(20)),
+                                child: Column(
+                                  crossAxisAlignment: CrossAxisAlignment.start,
+                                  children: [
+                                    RichText(
+                                      text: TextSpan(
+                                        text: '${_courseDict['personInfos'][index]['username']}',
+                                        style: TextStyle(fontSize: zsp(32),color: Color(0xFF343434),fontWeight: FontWeight.bold),
+                                        children: [
+                                          TextSpan(
+                                            text: '   ${_getSecretStr('${_courseDict['personInfos'][index]['phone']}')}',
+                                            style: TextStyle(fontSize: zsp(25),color: Color(0xFF666666),fontWeight: FontWeight.normal)
+                                          )
+                                        ]
+                                      ),
+                                    ),
+                                    Text('身份证 ${_getSecretStr('${_courseDict['personInfos'][index]['cardid']}')}',style: TextStyle(fontSize: zsp(25),color: Color(0xFF666666),))
+                                  ],
+                                ),
+                              );
+                            },
+                            separatorBuilder: (context,index){
+                              return Divider(color: Color(0xFFE5E5E5),height: 0.5,thickness: 0.5,);
+                            },
+                            itemCount: _courseDict['personInfos'].length,
+                            padding: EdgeInsets.all(0),
+                            shrinkWrap: true,
+                            physics: NeverScrollableScrollPhysics(),
+                          ),
+                        ),
+                      ],
+                    ),
+                  ),
+                  if(_courseDict['type']==3)ListView.separated(
+                    itemBuilder: (context,index){
+                      return Container(
+                        height: hsp(85),
+                        padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                        color: Colors.white,
+                        alignment: Alignment.centerLeft,
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Text(index==0?'货物名称':index==1?'性质':index==2?'体积':'支付时间',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
+                            Text(index==0?'${_courseDict['goods']['goodsName']}':index==1?'${_courseDict['goods']['goodsNatureName']}':index==2?'${_courseDict['goods']['goodsVolume']}立方米':'${_courseDict['goods']['goodsWeight']}吨',
+                              style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
+                          ],
+                        ),
+                      );
+                    },
+                    separatorBuilder: (context,index){
+                      return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),);
+                    },
+                    itemCount: 4,
+                    shrinkWrap: true,
+                    padding: EdgeInsets.only(top: hsp(10)),
+                    physics: NeverScrollableScrollPhysics(),
+                  ),
+                  if(_courseDict['personNum']!=null)Container(
+                    height: hsp(85),
+                    color: Colors.white,
+                    padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                    margin: EdgeInsets.only(bottom: 0.5,top: hsp(10)),
+                    child: Row(
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                      children: [
+                        Text('出行人数',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
+                        Text('${_courseDict['personNum']}个人',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
+                      ],
+                    ),
+                  ),
+                  if(_courseDict['airplane']!=null)Container(
+                    height: hsp(85),
+                    color: Colors.white,
+                    padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                    child: Row(
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                      children: [
+                        Text('飞机型号',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
+                        Text('${_courseDict['airplane']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
+                      ],
+                    ),
+                  ),
+                  Container(
+                    height: hsp(85),
+                    color: Colors.white,
+                    padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                    margin: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
+                    child: Row(
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                      children: [
+                        Text(_courseDict['payStatus']==1?'待支付':'已支付',style: TextStyle(fontSize: zsp(28),color: Colors.black),),
+                        Text('¥${_courseDict['payPrice']!=null?_courseDict['payPrice']:_courseDict['price']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFFEC364E)),)
+                      ],
+                    ),
+                  ),
+                  ListView.separated(
+                    itemBuilder: (context,index){
+                      return Container(
+                        height: hsp(85),
+                        padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                        color: Colors.white,
+                        alignment: Alignment.centerLeft,
+                        child: index==0?Text('详细信息',style: TextStyle(fontSize: zsp(28),color: Colors.black),):Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Text(index==1?'订单编号':index==2?'订单时间':index==3?'支付方式':'支付时间',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),),
+                            Text(index==1?'${_courseDict['orderSn']}':index==2?'${_courseDict['orderCreateTime']}':index==3?'${_courseDict['']==1?'余额':_courseDict['']==2?'微信':'支付宝'}':
+                            '${_courseDict['payTime']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF727272)),)
+                          ],
+                        ),
+                      );
+                    },
+                    separatorBuilder: (context,index){
+                      return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F5F5),);
+                    },
+                    itemCount: _courseDict['payStatus']==2?5:3,
+                    padding: EdgeInsets.only(bottom: hsp(50)),
+                    shrinkWrap: true,
+                    physics: NeverScrollableScrollPhysics(),
+                  )
+                ],
+              ),
+            ),
+          ),
+          if(_courseDict['payStatus']==1)Container(
+            height: hsp(120),
+            width: MediaQuery.of(context).size.width,
+            color: Colors.white,
+            padding: EdgeInsets.only(left: wsp(60),right: wsp(60)),
+            child: Row(
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                GestureDetector(
+                  onTap: (){
+                    showDialog(
+                        context: context,
+                        builder: (context) {
+                          return AlertDialog(
+                            actionsPadding: EdgeInsets.all(0),
+                            title: Text('提示',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(36)),),
+                            content: Text('确认取消订单吗?',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(30))),
+                            actions: <Widget>[
+                              FlatButton(child: Text('取消',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(30))),onPressed: (){
+                                Navigator.pop(context);
+                              },),
+                              FlatButton(child: Text('确认',style: TextStyle(fontWeight: FontWeight.bold,fontSize: zsp(30))),onPressed: (){
+                                Navigator.pop(context);
+                                _postCancelOrderData();
+                              },),
+                            ],
+                          );
+                        }
+                    );
+                  },
+                  child: Container(
+                    height: hsp(88),
+                    width: wsp(300),
+                    decoration: BoxDecoration(
+                        borderRadius: BorderRadius.all(Radius.circular(50)),
+                        border: Border.all(color: Color(0xFFD9D9D9),width: 1)
+                    ),
+                    alignment: Alignment.center,
+                    child: Text('取消订单',style: TextStyle(fontSize: zsp(34),color: Color(0xFF343434)),),
+                  ),
+                ),
+                GestureDetector(
+                  onTap: (){
+                    _showPayTypeAlert();
+                  },
+                  child: Container(
+                    height: hsp(88),
+                    width: wsp(300),
+                    decoration: BoxDecoration(
+                        borderRadius: BorderRadius.all(Radius.circular(50)),
+                        color: Color(0xFF007EFF)
+                    ),
+                    alignment: Alignment.center,
+                    child: Text('去付款',style: TextStyle(fontSize: zsp(34),color: Colors.white),),
+                  ),
+                )
+              ],
+            ),
+          )
+
+        ],
+      ):Container(),
+    );
+  }
+
+  _getCourseDetailData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/orderDetails',parameter: {'orderSn':widget.orderStr},isLoading: true,isToken: true);
+    if(dict!=null){
+      setState(() {
+        _courseDict = dict['data'];
+      });
+    }
+  }
+  _postCancelOrderData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/cancelOrder',parameter: {'orderSn':widget.orderStr},isLoading: false,isToken: true);
+    if(dict!=null){
+      Navigator.pop(context);
+    }
+  }
+
+  _postPayData(String pass) async{
+    var dict = await ysRequestHttpEncrypt(context,type: requestType.post,api: '/app/applets/balance/balancePay',
+        parameter: {'orderSn':widget.orderStr,'price':_courseDict['payPrice']!=null?_courseDict['payPrice']:_courseDict['price'],'password': pass},isLoading: true,isToken: true);
+    if(dict!=null){
+      if(dict==''){
+        _getCourseDetailData();
+      }else if(dict['code']==804){
+        _showAlertView(1);
+      }else if(dict['code']==801){
+        _showAlertView(2);
+      }
+    }
+  }
+
+  _showAlertView (int type) async{
+    showCupertinoDialog(
+        context: context,
+        builder: (context) {
+          return CupertinoAlertDialog(
+            title: Text('提示\n'),
+            content: Text(type==1?'未设置支付密码':'余额不足请充值'),
+            actions: <Widget>[
+              CupertinoDialogAction(child: Text('取消'),onPressed: (){Navigator.pop(context);},),
+              CupertinoDialogAction(child: Text(type==1?'去设置':'去充值'),onPressed: (){
+                Navigator.pop(context);
+                Navigator.of(context,rootNavigator: true).push(
+                    CupertinoPageRoute(
+                        builder: (context){
+                          return type==1?YSSetPayPass():YSMoney();
+                        }
+                    )
+                );
+              },),
+            ],
+          );
+        }
+    );
+  }
+
+  _showPayTypeAlert(){
+    int _selected = 0;
+    showModalBottomSheet(
+      context: context,
+      backgroundColor: Colors.transparent,
+      isScrollControlled: true,
+      builder: (context){
+        return StatefulBuilder(
+          builder: (BuildContext context, StateSetter setState){
+            return Container(
+              height: MediaQuery.of(context).size.height*0.4,
+              decoration: BoxDecoration(
+                  color: Colors.white,
+                  borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+              ),
+              child: Column(
+                children: [
+                  Column(
+                    children: [
+                      Container(
+                        height: hsp(100),
+                        padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Container(width: hsp(50),),
+                            Text('支付方式',style: TextStyle(fontSize: zsp(32),fontWeight: FontWeight.bold,color: Colors.black),),
+                            Icon(Icons.close,size: hsp(50),color: Colors.black,)
+                          ],
+                        ),
+                      ),
+                      Divider(height: 1,thickness: 1,color: Color(0xFFF5F5F5),),
+                      ListView.separated(
+                        itemBuilder: (context,index){
+                          return GestureDetector(
+                            onTap: (){
+                              setState(() {
+                                _selected = index;
+                              });
+                            },
+                            behavior: HitTestBehavior.opaque,
+                            child: Container(
+                              height: hsp(92),
+                              color: Colors.white,
+                              padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                              child: Row(
+                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                children: [
+                                  Row(
+                                    children: [
+                                      Container(
+                                        height: hsp(50),
+                                        width: hsp(50),
+                                        margin: EdgeInsets.only(right: hsp(25)),
+                                        child: Image.asset(index==0?'lib/images/wexinLogo.png':index==1?'lib/images/aliLogo.png':'lib/images/wexinLogo.png'),
+                                      ),
+                                      Text(index==0?'余额':index==1?'微信支付':'支付宝',style: TextStyle(fontSize: zsp(30),color: Color(0xFF343434),)),
+                                    ],
+                                  ),
+                                  Icon(Icons.check_circle,color:index==_selected?Color(0xFF007EFF):Colors.transparent,size: hsp(40),),
+                                ],
+                              ),
+                            ),
+                          );
+                        },
+                        separatorBuilder: (context,index){
+                          return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),);
+                        },
+                        itemCount: 3,
+                        padding: EdgeInsets.all(hsp(30)),
+                        physics: NeverScrollableScrollPhysics(),
+                        shrinkWrap: true,
+                      )
+                    ],
+                  ),
+                  GestureDetector(
+                    onTap: (){
+                      Navigator.pop(context);
+                      showDialog(context: context,builder: (context){
+                        return AlertDialog(
+                            contentPadding: EdgeInsets.all(0),
+                            actionsPadding: EdgeInsets.all(0),
+                            buttonPadding: EdgeInsets.all(0),
+                            insetPadding: EdgeInsets.all(0),
+                            titlePadding: EdgeInsets.all(0),
+                            backgroundColor: Colors.transparent,
+                            content: ysPayKeybord(context,(value){
+                              _postPayData(value);
+                            },_courseDict['title']!=null?'${_courseDict['title']}':'${_courseDict['setoutCity']} - ${_courseDict['arriveCity']}   ${_courseDict['name']}','${_courseDict['payPrice']!=null?_courseDict['payPrice']:_courseDict['price']}')
+                        );
+                      });
+                    },
+                    child: Container(
+                      height: hsp(100),
+                      decoration: BoxDecoration(
+                        color: Color(0xFF007EFF),
+                        borderRadius: BorderRadius.all(Radius.circular(5))
+                      ),
+                      width: MediaQuery.of(context).size.width-hsp(60),
+                      margin: EdgeInsets.only(top: hsp(50)),
+                      alignment: Alignment.center,
+                      child: Text('确认支付',style: TextStyle(color: Colors.white,fontSize: zsp(34),fontWeight: FontWeight.bold),),
+                    ),
+                  ),
+                ],
+              ),
+            );
+          },
+        );
+      }
+    );
+  }
+
+  _getSecretStr(String str) {
+    String secret = str.length==7?'****':'***********';
+    return str.substring(0,3)+secret+str.substring(str.length-4,str.length);
+  }
+}

+ 880 - 0
ysairplane1/lib/code/YSDoctorPlane.dart

@@ -0,0 +1,880 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:url_launcher/url_launcher.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+import 'YSCity.dart';
+import 'YSPay.dart';
+
+class YSDoctorPlane extends StatefulWidget {
+  @override
+  _YSDoctorPlaneState createState() => _YSDoctorPlaneState();
+}
+
+class _YSDoctorPlaneState extends State<YSDoctorPlane> {
+  bool _isDetail = false;
+  bool _isOrder = false;
+  bool _isShow = false;
+  List _chooses = [];
+  Map _msgDict,_startCity,_endCity;
+  String _timeStr,_numStr;
+  List _packList = [];
+  List _priceList = [];
+  int _index = 0;
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getBackImages();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: Color(0xFFF1F2F4),
+      body: SingleChildScrollView(
+        child: Stack(
+          children: [
+            Container(
+              height: MediaQuery.of(context).padding.top+hsp(380),
+              width: MediaQuery.of(context).size.width,
+              child: Image(
+                image: _msgDict==null?AssetImage('lib/images/home3.png'):NetworkImage('${_msgDict['background']}'),
+                fit: BoxFit.fill,
+              ),
+            ),
+            if(_msgDict!=null)Container(
+              margin: EdgeInsets.only(left: wsp(50),top: MediaQuery.of(context).padding.top+hsp(200)),
+              child: RichText(
+                text: TextSpan(
+                    text: '${_msgDict['name']}   ',
+                    style: TextStyle(fontSize: zsp(50),color: Colors.white,fontWeight: FontWeight.bold),
+                    children: [
+                      TextSpan(
+                          text: '${_msgDict['subtitle']}',
+                          style: TextStyle(fontWeight: FontWeight.normal,fontSize: zsp(28),color: Colors.white.withOpacity(0.5))
+                      )
+                    ]
+                ),
+              ),
+            ),
+            GestureDetector(
+              onTap: (){Navigator.pop(context);},
+              child: Container(
+                margin: EdgeInsets.only(left: wsp(32),top: MediaQuery.of(context).padding.top+hsp(30)),
+                child: Icon(Icons.arrow_back_ios,size: hsp(40),color: Colors.white,),
+              ),
+            ),
+            Container(
+              width: MediaQuery.of(context).size.width-wsp(60),
+              margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(300),left: wsp(30),bottom: hsp(40)),
+              decoration: BoxDecoration(
+                borderRadius: BorderRadius.all(Radius.circular(10)),
+                color: Colors.white,
+              ),
+              child: Column(
+                children: [
+                  ListView.separated(
+                    shrinkWrap: true,
+                    itemBuilder: (context,index){
+                      return Container(
+                        child: Column(
+                          children: [
+                            Container(
+                              padding: EdgeInsets.only(left: wsp(32),right: wsp(32),top: hsp(50),bottom: hsp(20)),
+                              child: Column(
+                                children: [
+                                  Row(
+                                    children: [
+                                      GestureDetector(
+                                        onTap: (){
+                                          Navigator.of(context,rootNavigator: true).push(
+                                              CupertinoPageRoute(
+                                                  builder: (context){
+                                                    return YSCity();
+                                                  }
+                                              )
+                                          ).then((value){
+                                            if(value!=null){
+                                              setState(() {
+                                                _startCity = value;
+                                              });
+                                              // _getFeatureDisplayListData();
+                                            }
+                                          });
+                                        },
+                                        child: Text(_startCity==null?'请选择出发地':'${_startCity['display']}',style: TextStyle(fontSize: zsp(40),fontWeight: FontWeight.bold,color: Colors.black),),
+                                      ),
+                                      Image(height: hsp(60),width: hsp(60),image: AssetImage('lib/images/plane.png'),),
+                                      GestureDetector(
+                                        onTap: (){
+                                          Navigator.of(context,rootNavigator: true).push(
+                                              CupertinoPageRoute(
+                                                  builder: (context){
+                                                    return YSCity();
+                                                  }
+                                              )
+                                          ).then((value){
+                                            if(value!=null){
+                                              setState(() {
+                                                _endCity = value;
+                                              });
+                                              // _getFeatureDisplayListData();
+                                            }
+                                          });
+                                        },
+                                        child: Text(_endCity==null?'请选择目的地':'${_endCity['display']}',style: TextStyle(fontSize: zsp(40),fontWeight: FontWeight.bold,color: Colors.black),),
+                                      )
+                                    ],
+                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                  ),
+                                  Row(
+                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                    children: [
+                                      Text(_startCity==null?'':'${_startCity['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                      Text(_endCity==null?'':'${_endCity['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                    ],
+                                  )
+                                ],
+                              ),
+                            ),
+                            Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE9E9E9),indent: wsp(32),endIndent: wsp(32),),
+                            GestureDetector(
+                              child: Container(
+                                padding: EdgeInsets.only(left: wsp(32),right: wsp(32),top: hsp(20),bottom: hsp(20)),
+                                child: Row(
+                                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                  children: [
+                                    Column(
+                                      children: [
+                                        Text('出发',style: TextStyle(fontSize: zsp(24),color: Color(0xFF666666)),),
+                                        RichText(
+                                          text: TextSpan(
+                                              text: _timeStr==null?'请选择出发时间':_timeStr,
+                                              style: TextStyle(fontSize: zsp(36),fontWeight: FontWeight.bold,color: Colors.black),
+                                              children: [
+                                                // TextSpan(
+                                                //   text: '今天',
+                                                //   style: TextStyle(fontSize: zsp(24),fontWeight: FontWeight.normal),
+                                                // )
+                                              ]
+                                          ),
+                                        )
+                                      ],
+                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                    ),
+                                    Icon(Icons.keyboard_arrow_right,size: hsp(50),color: Color(0xFFC1C1C1),)
+                                  ],
+                                ),
+                              ),
+                              onTap: (){
+                                showModalBottomSheet(
+                                  context: context,
+                                  builder: (context){
+                                    return YSDatePicker(
+                                      choose: (value){
+                                        setState(() {
+                                          _timeStr = value;
+                                        });
+                                      },
+                                    );
+                                  }
+                                );
+                              },
+                              behavior: HitTestBehavior.opaque,
+                            ),
+                          ],
+                        ),
+                      );
+                    },
+                    separatorBuilder: (context,index){
+                      return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE9E9E9),indent: wsp(32),endIndent: wsp(32),);
+                    },
+                    itemCount: 1,
+                    padding: EdgeInsets.all(0),
+                    physics: NeverScrollableScrollPhysics(),
+                  ),
+                  Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE9E9E9),indent: wsp(32),endIndent: wsp(32),),
+                  GestureDetector(
+                    onTap: (){
+                      showModalBottomSheet(
+                          context: context,
+                          builder: (context){
+                            return YSPicker(
+                              dataArray: [for(int i=0;i<30;i++){'title':'${i+1}'}],
+                              title: 'title',
+                              choose: (value){
+                                setState(() {
+                                  _numStr = value['title'];
+                                });
+                              },
+                            );
+                          }
+                      );
+                    },
+                    behavior: HitTestBehavior.opaque,
+                    child: Container(
+                      padding: EdgeInsets.all(wsp(32)),
+                      child: Row(
+                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                        children: [
+                          Text(_numStr==null?'请选择出行人数':'$_numStr人出行',style: TextStyle(fontSize: zsp(36),color: Colors.black,fontWeight: FontWeight.bold),),
+                          Icon(Icons.keyboard_arrow_right,size: hsp(50),color: Color(0xFFC1C1C1),)
+                        ],
+                      ),
+                    ),
+                  ),
+                  Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE9E9E9),indent: wsp(32),endIndent: wsp(32),),
+                  GestureDetector(
+                    onTap: (){},
+                    child: GestureDetector(
+                      onTap: (){
+                        _getPackData();
+                      },
+                      child: Container(
+                        width: MediaQuery.of(context).size.width-wsp(64)-hsp(64),
+                        margin: EdgeInsets.all(hsp(32)),
+                        height: hsp(100),
+                        decoration: BoxDecoration(
+                            color: Color(0xFFF15204),
+                            borderRadius: BorderRadius.all(Radius.circular(3))
+                        ),
+                        alignment: Alignment.center,
+                        child: Text('一键召唤公务机',style: TextStyle(fontWeight: FontWeight.bold,color: Colors.white,fontSize: zsp(36)),),
+                      ),
+                    ),
+                  ),
+                  GestureDetector(
+                    onTap: (){
+                      if(_msgDict==null){
+                        ysFlutterToast(context, '呼叫信息获取失败');
+                        return;
+                      }
+                      showDialog(
+                          context: context,
+                          builder: (context){
+                            return CupertinoAlertDialog(
+                              title: Text('提示\n'),
+                              content: Text('是否拨打${_msgDict['emergencyCall']}'),
+                              actions: [
+                                CupertinoButton(
+                                  child: Container(
+                                    child: Text('取消',style: TextStyle(fontSize: 16,color: Color(0xFF292929),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                                    height: 40,
+                                    alignment: Alignment.center,
+                                  ),
+                                  padding: EdgeInsets.all(0),
+                                  onPressed: (){
+                                    Navigator.pop(context);
+                                  },
+                                ),
+                                CupertinoButton(
+                                  child: Container(
+                                    child: Text('确定',style: TextStyle(fontSize: 16,color: Color(0xFF292929),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                                    height: 40,
+                                    alignment: Alignment.center,
+                                  ),
+                                  padding: EdgeInsets.all(0),
+                                  onPressed: (){
+                                    Navigator.pop(context);
+                                    launch('tel:${_msgDict['emergencyCall']}');
+                                  },
+                                )
+                              ],
+                            );
+                          }
+                      );
+                    },
+                    child: Container(
+                      width: MediaQuery.of(context).size.width-wsp(64)-hsp(64),
+                      margin: EdgeInsets.only(left: hsp(32),right: hsp(32),bottom: hsp(40)),
+                      height: hsp(100),
+                      decoration: BoxDecoration(
+                        color: Colors.white,
+                        border: Border.all(color: Color(0xFF00B600),width: 1),
+                        borderRadius: BorderRadius.all(Radius.circular(3))
+                      ),
+                      alignment: Alignment.center,
+                      child: Text('SOS紧急呼叫',style: TextStyle(fontWeight: FontWeight.bold,color: Color(0xFF00B600),fontSize: zsp(36)),),
+                    ),
+                  ),
+                ],
+              ),
+            ),
+            if(_isOrder==true)GestureDetector(
+              onTap: (){
+                setState(() {
+                  _isOrder = false;
+                });
+              },
+              child: Container(
+                height: MediaQuery.of(context).size.height,
+                width: MediaQuery.of(context).size.width,
+                color: Colors.black54,
+                child: GestureDetector(
+                  onTap: (){},
+                  child: Column(
+                    children: [
+                      Container(
+                        height: MediaQuery.of(context).size.height*0.8-hsp(120),
+                        width: MediaQuery.of(context).size.width,
+                        margin: EdgeInsets.only(top: MediaQuery.of(context).size.height*0.2),
+                        decoration: BoxDecoration(
+                            color: Color(0xFFF1F2F3),
+                            borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                        ),
+                        child: Column(
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          children: [
+                            Container(
+                              height: hsp(100),
+                              decoration: BoxDecoration(
+                                  color: Colors.white,
+                                  borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                              ),
+                              padding: EdgeInsets.only(left: 15,right: 15),
+                              child: Row(
+                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                children: [
+                                  Container(width: wsp(50),),
+                                  Text('订单确认',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                  GestureDetector(
+                                    child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                    onTap: (){
+                                      setState(() {
+                                        _isOrder = false;
+                                      });
+                                    },
+                                  ),
+                                ],
+                              ),
+                            ),
+                            Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE5E5E5),),
+                            Container(
+                              height: MediaQuery.of(context).size.height*0.8-hsp(220)-0.5,
+                              child: SingleChildScrollView(
+                                padding: EdgeInsets.all(0),
+                                child: Column(
+                                  children: [
+                                    Container(
+                                      padding: EdgeInsets.all(hsp(30)),
+                                      color: Colors.white,
+                                      width: MediaQuery.of(context).size.width,
+                                      child: Column(
+                                        crossAxisAlignment: CrossAxisAlignment.start,
+                                        children: [
+                                          Text('使用日期',style: TextStyle(fontSize: zsp(30),color: Color(0xFF9A9A9A)),),
+                                          Container(
+                                            margin: EdgeInsets.only(top: hsp(20)),
+                                            child: Row(
+                                              children: [
+                                                Container(
+                                                  height: hsp(120),
+                                                  width: MediaQuery.of(context).size.width-hsp(200),
+                                                  child: ListView.separated(
+                                                    itemBuilder: (context,index){
+                                                      return GestureDetector(
+                                                        behavior: HitTestBehavior.opaque,
+                                                        onTap: (){
+                                                          _timeStr = _priceList[index]['time'];
+                                                          setState(() {
+                                                            _index = index;
+                                                          });
+                                                        },
+                                                        child: Stack(
+                                                          children: [
+                                                            Container(
+                                                              height: hsp(120),
+                                                              width: (MediaQuery.of(context).size.width-hsp(230))/3,
+                                                              decoration: BoxDecoration(
+                                                                  color: index==_index?Color(0xFF007EFF):Color(0xFFF0EEEE),
+                                                                  borderRadius: BorderRadius.all(Radius.circular(5))
+                                                              ),
+                                                              alignment: Alignment.center,
+                                                              child: Text('${_priceList[index]['time']} \n¥${_priceList[index]['price']}',
+                                                                style: TextStyle(fontSize: zsp(20),color: index==_index?Colors.white:Color(0xFF8B8B8B)),textAlign: TextAlign.center,),
+                                                            ),
+                                                            if(_index==index)Container(
+                                                              child: Text(timeTag('${_priceList[index]['time']}'),style: TextStyle(fontSize: zsp(16),color: Color(0xFF007EFF)),),
+                                                              height: hsp(30),
+                                                              padding: EdgeInsets.only(left: wsp(3),right: wsp(3)),
+                                                              decoration: BoxDecoration(
+                                                                  color: Color(0xFFF7F7F7),
+                                                                  borderRadius: BorderRadius.only(topLeft: Radius.circular(3),bottomRight: Radius.circular(5))
+                                                              ),
+                                                              alignment: Alignment.center,
+                                                            ),
+                                                          ],
+                                                        ),
+                                                      );
+                                                    },
+                                                    separatorBuilder: (context,index){
+                                                      return Container(width: hsp(15),color: Colors.white,);
+                                                    },
+                                                    itemCount: _priceList.length,
+                                                    padding: EdgeInsets.all(0),
+                                                    scrollDirection: Axis.horizontal,
+                                                  ),
+                                                ),
+                                                GestureDetector(
+                                                  onTap: (){
+                                                    showModalBottomSheet(
+                                                        context: context,
+                                                        builder: (context){
+                                                          return YSDatePicker(
+                                                            choose: (value){
+                                                              Map time = {'time':value.split(' ')[0],'price':_priceList[0]['price']};
+                                                              int index;
+                                                              for(int i=0;i<_priceList.length;i++){
+                                                                if(_priceList[i]['time']==time['time']){
+                                                                  index = i;
+                                                                }
+                                                              }
+                                                              if(index!=null){
+                                                                _priceList.removeAt(index);
+                                                              }
+                                                              setState(() {
+                                                                _priceList.insert(0, time);
+                                                              });
+                                                            },
+                                                          );
+                                                        }
+                                                    );
+                                                  },
+                                                  behavior: HitTestBehavior.opaque,
+                                                  child: Container(
+                                                    height: hsp(120),
+                                                    width: hsp(140),
+                                                    alignment: Alignment.center,
+                                                    child: Text('更多\n日期',style: TextStyle(fontSize: zsp(26),color: Color(0xFF007EFF)),),
+                                                  ),
+                                                )
+                                              ],
+                                            ),
+                                          ),
+                                        ],
+                                      ),
+                                    ),
+                                    Container(
+                                      padding: EdgeInsets.only(left: wsp(32),right: wsp(32),top: hsp(20),bottom: hsp(20)),
+                                      color: Colors.white,
+                                      child: Column(
+                                        children: [
+                                          Row(
+                                            children: [
+                                              GestureDetector(
+                                                child: Text('${_startCity['display']}',style: TextStyle(fontSize: zsp(40),fontWeight: FontWeight.bold,color: Colors.black),),
+                                              ),
+                                              Image(height: hsp(60),width: hsp(60),image: AssetImage('lib/images/plane.png'),),
+                                              Text('${_endCity['display']}',style: TextStyle(fontSize: zsp(40),fontWeight: FontWeight.bold,color: Colors.black),),
+                                            ],
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                          ),
+                                          Row(
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            children: [
+                                              Text('${_startCity['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                              Text('${_endCity['airplanename']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                            ],
+                                          )
+                                        ],
+                                      ),
+                                    ),
+                                    Container(
+                                      child: Row(
+                                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                        children: [
+                                          RichText(
+                                            text: TextSpan(
+                                                text: '出行人数',
+                                                style: TextStyle(fontSize: zsp(34),color: Color(0xFF9A9A9A)),
+                                                children: [
+                                                  TextSpan(
+                                                      text: ' $_numStr ',
+                                                      style: TextStyle(color: Color(0xFF348AE1))
+                                                  ),
+                                                  TextSpan(
+                                                      text: '人'
+                                                  )
+                                                ]
+                                            ),
+                                          ),
+                                          GestureDetector(
+                                            onTap: (){
+                                              showModalBottomSheet(
+                                                isScrollControlled: true,
+                                                context: context,
+                                                backgroundColor: Colors.transparent,
+                                                builder: (context){
+                                                  return Container(
+                                                    height: MediaQuery.of(context).size.height*0.85,
+                                                    decoration: BoxDecoration(
+                                                      color: Colors.white,
+                                                      borderRadius: BorderRadius.only(topRight: Radius.circular(10),topLeft: Radius.circular(10))
+                                                    ),
+                                                    child: Column(
+                                                      children: [
+                                                        Container(
+                                                          height: hsp(100),
+                                                          padding: EdgeInsets.only(left: hsp(30),right: hsp(30)),
+                                                          child: Row(
+                                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                                            children: [
+                                                              Container(width: wsp(50),),
+                                                              Text('预订须知',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                                              GestureDetector(
+                                                                child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                                                onTap: (){
+                                                                  Navigator.pop(context);
+                                                                },
+                                                              ),
+                                                            ],
+                                                          ),
+                                                        ),
+                                                        Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE5E5E5),),
+                                                        Container(
+                                                          height: MediaQuery.of(context).size.height*0.85-0.5-hsp(100),
+                                                          color: Colors.white,
+                                                        ),
+                                                      ],
+                                                    ),
+                                                  );
+                                                }
+                                              );
+                                            },
+                                            child: RichText(
+                                              text: TextSpan(
+                                                  text: '预订须知',
+                                                  style: TextStyle(fontSize: zsp(28),color: Color(0xFF348AE1)),
+                                                  children: [
+                                                    TextSpan(
+                                                        text: ' >',
+                                                        style: TextStyle(color: Color(0xFF000000))
+                                                    ),
+                                                  ]
+                                              ),
+                                            ),
+                                          ),
+                                        ],
+                                      ),
+                                      padding: EdgeInsets.only(left: wsp(40),right: wsp(40)),
+                                      margin: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
+                                      height: hsp(100),
+                                      width: MediaQuery.of(context).size.width,
+                                      alignment: Alignment.centerLeft,
+                                      color: Colors.white,
+                                    ),
+                                    GestureDetector(
+                                      onTap: (){
+                                        setState(() {
+                                          _isShow = !_isShow;
+                                        });
+                                      },
+                                      behavior: HitTestBehavior.opaque,
+                                      child: Container(
+                                          padding: EdgeInsets.only(left: wsp(40),right: wsp(40),top: hsp(20),bottom: hsp(20)),
+                                          color: Colors.white,
+                                          child: Row(
+                                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            children: [
+                                              Text('更多服务',style: TextStyle(fontSize: zsp(30),color: Color(0xFF9A9A9A)),),
+                                              Icon(Icons.keyboard_arrow_down,size: hsp(50),color: Color(0xFFC1C1C1),)
+                                            ],
+                                          )
+                                      ),
+                                    ),
+                                    if(_isShow==true)Container(
+                                      padding: EdgeInsets.only(left: wsp(32),right: wsp(32),top: hsp(20),bottom: hsp(10)),
+                                      decoration: BoxDecoration(
+                                          color: Color(0xFFFAFAFA),
+                                          borderRadius: BorderRadius.only(bottomRight: Radius.circular(10),bottomLeft: Radius.circular(10))
+                                      ),
+                                      child: ListView.builder(
+                                        shrinkWrap: true,
+                                        itemBuilder: (context,index){
+                                          return Container(
+                                            padding: EdgeInsets.only(bottom: wsp(20)),
+                                            child: Row(
+                                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                              children: [
+                                                Row(
+                                                  children: [
+                                                    Text('${_packList[index]['name']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),),
+                                                    Container(
+                                                      width: wsp(50),
+                                                      child: GestureDetector(
+                                                        child: Icon(Icons.error_outline,size: hsp(40),color: Color(0xFF999999)),
+                                                      ),
+                                                    ),
+                                                    Text('${_packList[index]['price']}元',style: TextStyle(fontSize: zsp(28),color: Colors.black),),
+                                                  ],
+                                                ),
+                                                GestureDetector(
+                                                  child: Container(
+                                                    height: hsp(60),
+                                                    width: hsp(100),
+                                                    child: Image.asset(_chooses.contains(_packList[index])==true?'lib/images/kaiguankai.png':'lib/images/kaiguanguan.png'),
+                                                  ),
+                                                  onTap: (){
+                                                    setState(() {
+                                                      if(_chooses.contains(_packList[index])==true){
+                                                        _chooses.remove(_packList[index]);
+                                                      }else{
+                                                        _chooses.add(_packList[index]);
+                                                      }
+                                                    });
+                                                  },
+                                                )
+                                              ],
+                                            ),
+                                          );
+                                        },
+                                        itemCount: _packList.length,
+                                        padding: EdgeInsets.all(0),
+                                        physics: NeverScrollableScrollPhysics(),
+                                      ),
+                                    )
+                                  ],
+                                ),
+                              ),
+                            ),
+                          ],
+                        ),
+                      ),
+                      Container(
+                        height: hsp(120),
+                        width: MediaQuery.of(context).size.width,
+                        color: Colors.white,
+                        padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            RichText(
+                              text: TextSpan(
+                                  text: '参考价(¥)',
+                                  style: TextStyle(fontSize: zsp(22),color: Color(0xFF181818)),
+                                  children: [
+                                    TextSpan(
+                                      text: ' ${_getPrice()}',
+                                      style: TextStyle(fontSize: zsp(40),color: Color(0xFFFF6600)),
+                                    )
+                                  ]
+                              ),
+                            ),
+                            GestureDetector(
+                              child: Row(
+                                children: [
+                                  Text('明细',style: TextStyle(fontSize: zsp(22),color: Color(0xFF181818)),),
+                                  Icon(Icons.keyboard_arrow_up,size: hsp(30),color: Color(0xFF007EFF),),
+                                ],
+                              ),
+                              onTap: (){
+                                setState(() {
+                                  _isDetail = !_isDetail;
+                                });
+                              },
+                            ),
+                            GestureDetector(
+                              onTap: (){
+                                _postPlaneOrderData();
+                              },
+                              child: Container(
+                                height: hsp(70),
+                                padding: EdgeInsets.only(left: wsp(50),right: wsp(50)),
+                                decoration: BoxDecoration(
+                                    color: Color(0xFF007EFF),
+                                    borderRadius: BorderRadius.all(Radius.circular(50))
+                                ),
+                                alignment: Alignment.center,
+                                child: Text('立即预约',style: TextStyle(fontSize: zsp(30),color: Colors.white,fontWeight: FontWeight.bold),),
+                              ),
+                            )
+                          ],
+                        ),
+                      )
+
+                    ],
+                  ),
+                ),
+              ),
+            ),
+            if(_isDetail==true)GestureDetector(
+              onTap: (){
+                setState(() {
+                  _isDetail = false;
+                });
+              },
+              child: Container(
+                height: MediaQuery.of(context).size.height-hsp(120),
+                color: Colors.black45,
+                child: Container(
+                  margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(120)-hsp(370)),
+                  height: hsp(370),
+                  decoration: BoxDecoration(
+                      color: Colors.white,
+                      borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                  ),
+                  child: GestureDetector(
+                    onTap: (){},
+                    behavior: HitTestBehavior.opaque,
+                    child: Column(
+                      children: [
+                        Container(
+                          height: hsp(100),
+                          padding: EdgeInsets.only(left: 15,right: 15),
+                          child: Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              GestureDetector(
+                                child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none),),
+                                onTap: (){
+                                  setState(() {
+                                    _isDetail = false;
+                                  });
+                                },
+                              ),
+                              Text('明细',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                              Container(width: wsp(50),),
+                            ],
+                          ),
+                        ),
+                        Container(
+                          height: hsp(100),
+                          color: Color(0xFFF7F8F9),
+                          padding: EdgeInsets.only(left: wsp(40),right: wsp(40),bottom: hsp(20),top: hsp(20)),
+                          child: Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              Text('座位',style: TextStyle(fontSize: zsp(32),color: Color(0xFF000000),decoration: TextDecoration.none),),
+                              Text('¥ ${_priceList[_index]['price']}x $_numStr人',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none),),
+                            ],
+                          ),
+                        ),
+                        Container(
+                          color: Color(0xFFF7F8F9),
+                          height: hsp(170),
+                          child: ListView.builder(
+                            padding: EdgeInsets.all(0),
+                            itemBuilder: (context,index){
+                              return Container(
+                                padding: EdgeInsets.only(left: wsp(40),right: wsp(40),bottom: hsp(10)),
+                                child: Row(
+                                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                  children: [
+                                    Text('${_chooses[index]['name']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF9A9A9A)),),
+                                    Text('¥ ${_chooses[index]['price']}',style: TextStyle(fontSize: zsp(28),color: Color(0xFF9A9A9A)),),
+                                  ],
+                                ),
+                              );
+                            },
+                            itemCount: _chooses.length,
+                          ),
+                        )
+                      ],
+                    ),
+                  ),
+                ),
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+
+  _getBackImages() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/wallconfigure/get',parameter: {'type':1},isLoading: true,isToken: false);
+    if(dict!=null){
+      setState(() {
+        _msgDict = dict['data'];
+      });
+    }
+  }
+
+  _getPackData() async{
+    if(_startCity==null){
+      ysFlutterToast(context,'请选择出发地');
+      return;
+    }
+    if(_endCity==null){
+      ysFlutterToast(context,'请选择目的地');
+      return;
+    }
+    if(_timeStr==null){
+      ysFlutterToast(context,'请选择出发时间');
+      return;
+    }
+    if(_numStr==null){
+      ysFlutterToast(context,'请选择出行人数');
+      return;
+    }
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneservice/get',parameter: {'type':1},isLoading: true,isToken: false);
+    if(dict!=null){
+      _isOrder = true;
+      _packList = dict['data'];
+      _getPriceData();
+    }
+  }
+
+  _getPriceData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/airplaneorder/getDateAndTime',parameter: {'time':_timeStr,'type':1},isLoading: true,isToken: true);
+    if(dict!=null){
+      setState(() {
+        _priceList = dict['data'];
+      });
+    }
+  }
+
+  _getPrice(){
+    double price = double.parse('${_priceList[_index]['price']}')*int.parse('$_numStr');
+    _chooses.forEach((element) {
+      price+=double.parse('${element['price']}');
+    });
+    return price;
+  }
+
+  _postPlaneOrderData() async{
+    if(_startCity==null){
+      ysFlutterToast(context,'请选择出发地');
+      return;
+    }
+    if(_endCity==null){
+      ysFlutterToast(context,'请选择目的地');
+      return;
+    }
+    if(_timeStr==null){
+      ysFlutterToast(context,'请选择出发时间');
+      return;
+    }
+    if(_numStr==null){
+      ysFlutterToast(context,'请选择出行人数');
+      return;
+    }
+    isLogin(context,login: (){});
+    Map requestDict = {};
+    requestDict['flightTime'] = _timeStr;
+    requestDict['type'] = 1;
+    requestDict['travelersNumber'] = _numStr;
+    requestDict['citySetout'] = _startCity['display'];
+    requestDict['airportSetout'] = _startCity['airplanename'];
+    requestDict['cityArrive'] = _endCity['display'];
+    requestDict['airportArrive'] = _endCity['airplanename'];
+    requestDict['price'] = '${_getPrice()}';
+    List array = [];
+    _chooses.forEach((element) {
+      array.add(element['id']);
+    });
+    requestDict['serviceIds'] = array.join(',');
+    Map dict = await ysRequestHttp(context,type: requestType.post,api: '/app/applets/airplaneorder/createOrder',parameter: requestDict,isLoading: true,isToken: true);
+    if(dict!=null){
+      Navigator.of(context).push(
+          CupertinoPageRoute(
+              builder: (context){
+                return YSPay(orderDict: dict['data'],type: payType.doctor,);
+              }
+          )
+      );
+    }
+  }
+}

+ 72 - 0
ysairplane1/lib/code/YSFeedback.dart

@@ -0,0 +1,72 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:ysairplane/base/YSBase.dart';
+
+class YSFeedback extends StatefulWidget {
+  @override
+  _YSFeedbackState createState() => _YSFeedbackState();
+}
+
+class _YSFeedbackState extends State<YSFeedback> {
+  List array = ['选择1','选择2','选择3'];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '意见反馈',
+      yschild: Column(
+        children: [
+          Divider(height: 5,thickness: 5,color: Color(0xFFF5F6F8),),
+          Container(
+            height: 50,
+            padding: EdgeInsets.only(left: 15,right: 15),
+            child: Row(
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Text('意见反馈类型',style: TextStyle(fontSize: 16,color: Color(0xFF000000)),),
+                DropdownButton(
+                  value: '${array[0]}',
+                  items: [
+                    for(int i=0;i<array.length;i++)DropdownMenuItem(child: Text('${array[i]}'),value: '${array[i]}',),
+                  ],
+                  onChanged: (value){
+
+                  },
+                  underline: Container(),
+                  icon: Icon(Icons.keyboard_arrow_down,size: 20,color: Color(0xFF999999),),
+                  style: TextStyle(fontSize: 15,color: Color(0xFF999999)),
+                )
+              ],
+            ),
+          ),
+          Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF5F6F8),),
+          Container(
+            margin: EdgeInsets.only(top: 15,bottom: 15),
+            width: MediaQuery.of(context).size.width-30,
+            child: Text('留言内容',style: TextStyle(fontSize: 14,color: Color(0xFF999999)),),
+          ),
+          Container(
+            width: MediaQuery.of(context).size.width-30,
+            padding: EdgeInsets.all(5),
+            height: 200,
+            color: Color(0xFFF5F5F7),
+            child: CupertinoTextField(
+              style: TextStyle(fontSize: 14,color: Color(0xFF000000)),
+              decoration: BoxDecoration(),
+            ),
+          ),
+          Container(
+            width: MediaQuery.of(context).size.width-30,
+            margin: EdgeInsets.only(top: 40),
+            height: 40,
+            alignment: Alignment.center,
+            decoration: BoxDecoration(
+              color: Color(0xFF0079FF),
+              borderRadius: BorderRadius.all(Radius.circular(5))
+            ),
+            child: Text('提交',style: TextStyle(fontSize: 17,color: Colors.white,fontWeight: FontWeight.bold),),
+          )
+        ],
+      ),
+    );
+  }
+}

+ 566 - 0
ysairplane1/lib/code/YSHelpPlane.dart

@@ -0,0 +1,566 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:url_launcher/url_launcher.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+import 'YSPay.dart';
+
+class YSHelpPlane extends StatefulWidget {
+  @override
+  _YSHelpPlaneState createState() => _YSHelpPlaneState();
+}
+
+class _YSHelpPlaneState extends State<YSHelpPlane> {
+  bool _isDetail = false;
+  bool _isOrder = false;
+  Map _msgDict,_typeDict;
+  String _numStr,_startStr,_endStr,_priceStr;
+  TextEditingController _phone = TextEditingController();
+  TextEditingController _des = TextEditingController();
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getHelpPlaneData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '召唤直升机',
+      yschild: Container(
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        width: MediaQuery.of(context).size.width,
+        color: Color(0xFFF1F2F4),
+        child: Stack(
+          children: [
+            Column(
+              children: [
+                Container(
+                  height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(150),
+                  width: MediaQuery.of(context).size.width,
+                  color: Colors.white,
+                  child: Stack(
+                    children: [
+                      Container(
+                        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(150)-hsp(550),
+                        width: MediaQuery.of(context).size.width,
+                        color: Color(0xFFF1F2F3),
+                      ),
+                      GestureDetector(
+                          onTap: (){
+                            if(_msgDict==null){
+                              ysFlutterToast(context, '呼叫信息获取失败');
+                              return;
+                            }
+                            showDialog(
+                              context: context,
+                              builder: (context){
+                                return CupertinoAlertDialog(
+                                  title: Text('提示\n'),
+                                  content: Text('是否拨打${_msgDict['emergencyCall']}'),
+                                  actions: [
+                                    CupertinoButton(
+                                      child: Container(
+                                        child: Text('取消',style: TextStyle(fontSize: 16,color: Color(0xFF292929),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                                        height: 40,
+                                        alignment: Alignment.center,
+                                      ),
+                                      padding: EdgeInsets.all(0),
+                                      onPressed: (){
+                                        Navigator.pop(context);
+                                      },
+                                    ),
+                                    CupertinoButton(
+                                      child: Container(
+                                        child: Text('确定',style: TextStyle(fontSize: 16,color: Color(0xFF292929),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
+                                        height: 40,
+                                        alignment: Alignment.center,
+                                      ),
+                                      padding: EdgeInsets.all(0),
+                                      onPressed: (){
+                                        Navigator.pop(context);
+                                        launch('tel:${_msgDict['emergencyCall']}');
+                                      },
+                                    )
+                                  ],
+                                );
+                              }
+                          );
+                        },
+                        child: Container(
+                          margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(150)-hsp(700),left: hsp(20)),
+                          width: wsp(250),
+                          height: hsp(70),
+                          alignment: Alignment.center,
+                          decoration: BoxDecoration(
+                            color: Color(0xFFF15204),
+                            borderRadius: BorderRadius.all(Radius.circular(50))
+                          ),
+                          child: Text('SOS 紧急呼叫',style: TextStyle(fontSize: zsp(30),color: Colors.white),),
+                        ),
+                      ),
+                      Container(
+                        margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(150)-hsp(700),left: MediaQuery.of(context).size.width-wsp(270)),
+                        width: wsp(250),
+                        height: hsp(70),
+                        child: Row(
+                          children: [
+                            Container(
+                              height: hsp(70),
+                              width: hsp(70),
+                              color: Colors.white,
+                              child: Icon(Icons.flight,size: hsp(50),color: Color(0xFF3262FF),),
+                              alignment: Alignment.center,
+                            ),
+                            Container(
+                              height: hsp(70),
+                              width: hsp(180),
+                              color: Color(0xFFE8EFFD),
+                              child: Text('${_msgDict==null?0:_msgDict['airportNum']}架飞机',style: TextStyle(fontSize: zsp(26),color: Color(0xFF3856A0),fontWeight: FontWeight.bold),),
+                              alignment: Alignment.center,
+                            ),
+                          ],
+                        )
+                      ),
+                      Container(
+                        margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(150)-hsp(600)-2.5),
+                        decoration: BoxDecoration(
+                          color: Colors.white,
+                          borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
+                        ),
+                        height: hsp(600)+2.5,
+                        child: Column(
+                          children: [
+                            Container(
+                              child: Text('空中救援',style: TextStyle(fontSize: zsp(32),color: Color(0xFF212121),fontWeight: FontWeight.bold),),
+                              height: hsp(100),
+                              alignment: Alignment.center,
+                            ),
+                            Divider(color: Color(0xFFF1F2F4),height: 0.5,thickness: 0.5,),
+                            Container(
+                              height: hsp(500)+2,
+                              child: ListView.separated(
+                                itemBuilder: (context,index){
+                                  return GestureDetector(
+                                    onTap: (){
+                                      if(index==1||index==2){
+                                        FocusScope.of(context).unfocus();
+                                        showModalBottomSheet(
+                                            context: context,
+                                            builder: (context){
+                                              return index==1?YSPicker(dataArray: _msgDict['dtRescueTypeList'],title: 'name',choose: (value){
+                                                print(value);
+                                                setState(() {
+                                                  _typeDict = value;
+                                                });
+                                              },):YSPicker(dataArray: [for(int i=0;i<30;i++){'title':'${i+1}','id':i+1}],title: 'title',choose: (value){
+                                                print(value);
+                                                setState(() {
+                                                  _numStr = value['title'];
+                                                });
+                                              },);
+                                            }
+                                        );
+                                      }
+                                    },
+                                    behavior: HitTestBehavior.opaque,
+                                    child: Container(
+                                      height: hsp(100),
+                                      padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                                      child: Row(
+                                        children: [
+                                          Container(child: Text(index==0?'救援地点':index==1?'救援类型':index==2?'涉险人数':index==3?'联系方式':'描述',style: TextStyle(fontSize: zsp(30),color: Color(0xFFA7A7A7)),),width: wsp(150),),
+                                          Container(
+                                            margin: EdgeInsets.only(left: wsp(20)),
+                                            width: MediaQuery.of(context).size.width-wsp(230),
+                                            child: index==0?Text(
+                                              '长安文化中心',style: TextStyle(fontSize: zsp(30),color: Color(0xFF000000),fontWeight: FontWeight.bold),
+                                            ):index==1||index==2?Row(
+                                              children: [
+                                                Text(index==1?(_typeDict==null?'请选择救援类型':_typeDict['name']):(_numStr==null?'请选择险人数式':_numStr),style: TextStyle(fontSize: zsp(30),color: Color(0xFF999999)),),
+                                                Icon(Icons.keyboard_arrow_down,size: hsp(40),color: Color(0xFF999999),)
+                                              ],
+                                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                            ):CupertinoTextField(
+                                              placeholder: index==3?'请输入联系方式':'请输入描述(20个字以内)',
+                                              placeholderStyle: TextStyle(fontSize: zsp(30),color: Color(0xFF999999)),
+                                              style: TextStyle(fontSize: zsp(30),color: Color(0xFF999999)),
+                                              decoration: BoxDecoration(),
+                                              keyboardType: index==3?TextInputType.phone:TextInputType.text,
+                                              maxLength: index==3?11:20,
+                                              controller: index==3?_phone:_des,
+                                            ),
+                                          ),
+                                        ],
+                                      ),
+                                    ),
+                                  );
+                                },
+                                separatorBuilder: (context,index){
+                                  return Divider(color: Color(0xFFF1F2F4),height: 0.5,thickness: 0.5,);
+                                },
+                                itemCount: 5,
+                                padding: EdgeInsets.all(0),
+                              ),
+                            )
+                          ],
+                        ),
+                      )
+                    ],
+                  ),
+                ),
+                GestureDetector(
+                  onTap: (){
+                    _getPriceData();
+                  },
+                  child: Container(
+                    height: hsp(100),
+                    margin: EdgeInsets.only(top: hsp(25)),
+                    width: MediaQuery.of(context).size.width-hsp(60),
+                    decoration: BoxDecoration(
+                        color: Color(0xFFF15103),
+                        borderRadius: BorderRadius.all(Radius.circular(5))
+                    ),
+                    child: Text('一键召唤直升机',style: TextStyle(fontSize: zsp(36),color: Colors.white,fontWeight: FontWeight.bold),),
+                    alignment: Alignment.center,
+                  ),
+                ),
+              ],
+            ),
+            if(_isOrder==true)GestureDetector(
+              onTap: (){
+                setState(() {
+                  _isOrder = false;
+                });
+              },
+              child: Container(
+                height: MediaQuery.of(context).size.height,
+                width: MediaQuery.of(context).size.width,
+                color: Colors.black54,
+                child: GestureDetector(
+                  onTap: (){},
+                  child: Column(
+                    children: [
+                      Container(
+                        height: (MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44)*0.8-hsp(120),
+                        width: MediaQuery.of(context).size.width,
+                        margin: EdgeInsets.only(top: (MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44)*0.2),
+                        decoration: BoxDecoration(
+                            color: Color(0xFFF1F2F3),
+                            borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                        ),
+                        child: Column(
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          children: [
+                            Container(
+                              height: hsp(100),
+                              decoration: BoxDecoration(
+                                  color: Colors.white,
+                                  borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                              ),
+                              padding: EdgeInsets.only(left: 15,right: 15),
+                              child: Row(
+                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                children: [
+                                  Container(width: wsp(50),),
+                                  Text('订单确认',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                  GestureDetector(
+                                    child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                                    onTap: (){
+                                      setState(() {
+                                        _isDetail = false;
+                                      });
+                                    },
+                                  ),
+                                ],
+                              ),
+                            ),
+                            Divider(height: 0.5,thickness: 0.5,color: Color(0xFFE5E5E5),),
+                            Container(
+                              height: (MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44)*0.8-hsp(220)-0.5,
+                              child: SingleChildScrollView(
+                                padding: EdgeInsets.all(0),
+                                child: Column(
+                                  children: [
+                                    Container(
+                                      height: hsp(500)+2,
+                                      child: ListView.separated(
+                                        itemBuilder: (context,index){
+                                          return Container(
+                                            height: hsp(100),
+                                            color: Colors.white,
+                                            padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                                            child: Row(
+                                              children: [
+                                                Container(child: Text(index==0?'救援地点':index==1?'救援类型':index==2?'涉险人数':index==3?'联系方式':'描述',style: TextStyle(fontSize: zsp(30),color: Color(0xFFA7A7A7)),),width: wsp(150),),
+                                                Container(
+                                                  margin: EdgeInsets.only(left: wsp(20)),
+                                                  width: MediaQuery.of(context).size.width-wsp(230),
+                                                  child: Text(index==0?'长安文化中心':index==1?'${_typeDict['name']}':index==2?_numStr:index==3?_phone.text:(_des.text.isEmpty?'无':_des.text),
+                                                    style: TextStyle(fontSize: zsp(30),color: Color(0xFF000000),fontWeight: FontWeight.bold),)
+                                                ),
+                                              ],
+                                            ),
+                                          );
+                                        },
+                                        separatorBuilder: (context,index){
+                                          return Divider(color: Color(0xFFF1F2F4),height: 0.5,thickness: 0.5,);
+                                        },
+                                        itemCount: 5,
+                                        padding: EdgeInsets.all(0),
+                                      ),
+                                    ),
+                                    Container(
+                                      child: RichText(
+                                        text: TextSpan(
+                                            text: '预订须知',
+                                            style: TextStyle(fontSize: zsp(28),color: Color(0xFF348AE1)),
+                                            children: [
+                                              TextSpan(
+                                                  text: ' >',
+                                                  style: TextStyle(color: Color(0xFF000000))
+                                              ),
+                                            ]
+                                        ),
+                                      ),
+                                      padding: EdgeInsets.only(left: wsp(40),right: wsp(40)),
+                                      margin: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
+                                      height: hsp(80),
+                                      width: MediaQuery.of(context).size.width,
+                                      alignment: Alignment.centerLeft,
+                                      color: Colors.white,
+                                    ),
+                                    Container(
+                                      height: hsp(80),
+                                      padding: EdgeInsets.only(left: wsp(40),right: wsp(40)),
+                                      child: Text('说明',style: TextStyle(color: Color(0xFF333333),fontSize: zsp(30),fontWeight: FontWeight.bold),),
+                                      margin: EdgeInsets.only(bottom: 0.5),
+                                      alignment: Alignment.centerLeft,
+                                      color: Colors.white,
+                                    ),
+                                    Container(
+                                      padding: EdgeInsets.only(left: wsp(40),right: wsp(40),top: hsp(20),bottom: hsp(20)),
+                                      child: Text('信息提交后,将有我们的工作人员联系您讨论具体的救援方案,请保证手机畅通',style: TextStyle(color: Color(0xFF999999),fontSize: zsp(30)),),
+                                      alignment: Alignment.centerLeft,
+                                      color: Colors.white,
+                                    )
+                                  ],
+                                ),
+                              ),
+                            ),
+                          ],
+                        ),
+                      ),
+                      Container(
+                        height: hsp(120),
+                        width: MediaQuery.of(context).size.width,
+                        color: Colors.white,
+                        padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            RichText(
+                              text: TextSpan(
+                                  text: '参考价(¥)  ',
+                                  style: TextStyle(fontSize: zsp(22),color: Color(0xFF181818)),
+                                  children: [
+                                    TextSpan(
+                                      text: _priceStr==null?'0':_priceStr,
+                                      style: TextStyle(fontSize: zsp(40),color: Color(0xFFFF6600)),
+                                    ),
+                                    TextSpan(
+                                      text: '元'
+                                    )
+                                  ]
+                              ),
+                            ),
+                            // GestureDetector(
+                            //   child: Row(
+                            //     children: [
+                            //       Text('明细',style: TextStyle(fontSize: zsp(22),color: Color(0xFF181818)),),
+                            //       Icon(Icons.keyboard_arrow_up,size: hsp(30),color: Color(0xFF007EFF),),
+                            //     ],
+                            //   ),
+                            //   onTap: (){
+                            //     setState(() {
+                            //       _isDetail = !_isDetail;
+                            //     });
+                            //   },
+                            // ),
+                            GestureDetector(
+                              onTap: (){
+                                _postHelpPlaneOrderData();
+                              },
+                              child: Container(
+                                height: hsp(70),
+                                padding: EdgeInsets.only(left: wsp(50),right: wsp(50)),
+                                decoration: BoxDecoration(
+                                    color: Color(0xFF007EFF),
+                                    borderRadius: BorderRadius.all(Radius.circular(50))
+                                ),
+                                alignment: Alignment.center,
+                                child: Text('立即预约',style: TextStyle(fontSize: zsp(30),color: Colors.white,fontWeight: FontWeight.bold),),
+                              ),
+                            )
+                          ],
+                        ),
+                      )
+
+                    ],
+                  ),
+                ),
+              ),
+            ),
+            if(_isDetail==true)GestureDetector(
+              onTap: (){
+                setState(() {
+                  _isDetail = false;
+                });
+              },
+              child: Container(
+                height: (MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44)-hsp(120),
+                color: Colors.black45,
+                child: Container(
+                  margin: EdgeInsets.only(top: (MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44)-hsp(120)-hsp(370)),
+                  height: hsp(370),
+                  decoration: BoxDecoration(
+                      color: Colors.white,
+                      borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10))
+                  ),
+                  child: GestureDetector(
+                    onTap: (){},
+                    behavior: HitTestBehavior.opaque,
+                    child: Column(
+                      children: [
+                        Container(
+                          height: hsp(100),
+                          padding: EdgeInsets.only(left: 15,right: 15),
+                          child: Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              GestureDetector(
+                                child: Text('关闭',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none),),
+                                onTap: (){
+                                  setState(() {
+                                    _isDetail = false;
+                                  });
+                                },
+                              ),
+                              Text('明细',style: TextStyle(fontSize: 15,color: Color(0xFF000000),decoration: TextDecoration.none,fontWeight: FontWeight.bold),),
+                              Container(width: wsp(50),),
+                            ],
+                          ),
+                        ),
+                        Container(
+                          height: hsp(100),
+                          color: Color(0xFFF7F8F9),
+                          padding: EdgeInsets.only(left: wsp(40),right: wsp(40),bottom: hsp(20),top: hsp(20)),
+                          child: Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              Text('VIP尊享座位',style: TextStyle(fontSize: zsp(32),color: Color(0xFF000000),decoration: TextDecoration.none),),
+                              Text('¥ 780x 10人',style: TextStyle(fontSize: 15,color: Color(0xFF007EFF),decoration: TextDecoration.none),),
+                            ],
+                          ),
+                        ),
+                        Container(
+                          color: Color(0xFFF7F8F9),
+                          height: hsp(170),
+                          child: ListView.builder(
+                            padding: EdgeInsets.all(0),
+                            itemBuilder: (context,index){
+                              return Container(
+                                padding: EdgeInsets.only(left: wsp(40),right: wsp(40),bottom: hsp(10)),
+                                child: Row(
+                                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                  children: [
+                                    Text('票价',style: TextStyle(fontSize: zsp(28),color: Color(0xFF9A9A9A)),),
+                                    Text('¥ 770x 10人',style: TextStyle(fontSize: zsp(28),color: Color(0xFF9A9A9A)),),
+                                  ],
+                                ),
+                              );
+                            },
+                            itemCount: 3,
+                          ),
+                        )
+                      ],
+                    ),
+                  ),
+                ),
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+
+  _getHelpPlaneData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/wallconfigure/get',parameter: {'type':2},isLoading: true,isToken: false);
+    if(dict!=null){
+      _msgDict = dict['data'];
+    }
+  }
+
+  _postHelpPlaneOrderData() async{
+    Map request = {};
+    request['type'] = 2;
+    request['travelersNumber'] = _numStr;
+    request['phone'] = _phone.text;
+    if(_des.text.isNotEmpty)request['des'] = _des.text;
+    request['loactionSetout'] = _startStr;
+    request['loactionArrive'] = _endStr;
+    request['rescueTypeId'] = _typeDict['id'];
+    request['price'] = _priceStr;
+    Map dict = await ysRequestHttp(context,type: requestType.post,api: '/app/applets/airplaneorder/createOrder',parameter: request,isLoading: true,isToken: true);
+    if(dict!=null){
+      Navigator.of(context).push(
+        CupertinoPageRoute(
+          builder: (context){
+            return YSPay(orderDict: dict['data'],type: payType.help,);
+          }
+        )
+      );
+    }
+  }
+
+  _getPriceData() async{
+    FocusScope.of(context).unfocus();
+    _startStr = '34,108';
+    _endStr = '34.1,108.1';
+    if(_startStr==null){
+      ysFlutterToast(context,'请选择出发位置');
+      return;
+    }
+    if(_endStr==null){
+      ysFlutterToast(context,'请选择到达位置');
+      return;
+    }
+    if(_typeDict==null){
+      ysFlutterToast(context,'请选择救援类型');
+      return;
+    }
+    if(_numStr==null){
+      ysFlutterToast(context,'请选择救援人数');
+      return;
+    }
+    if(_phone.text.isEmpty){
+      ysFlutterToast(context,'电话号码不能为空');
+      return;
+    }
+    if(isChinaPhoneLegal(_phone.text)==false){
+      ysFlutterToast(context,'电话号码格式不正确');
+      return;
+    }
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/wallconfigure/calculation',parameter: {'loactionSetout':_startStr,'loactionArrive':_endStr},isLoading: true,isToken: false);
+    if(dict!=null){
+      _priceStr = '${dict['data']}';
+      setState(() {
+        _isOrder = true;
+      });
+    }
+  }
+}

+ 666 - 0
ysairplane1/lib/code/YSHome.dart

@@ -0,0 +1,666 @@
+import 'dart:convert';
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+import 'package:ysairplane/code/YSCity.dart';
+import 'package:ysairplane/code/YSDoctorPlane.dart';
+import 'package:ysairplane/code/YSHelpPlane.dart';
+import 'package:ysairplane/code/YSHomeMsg.dart';
+import 'package:ysairplane/code/YSSearch.dart';
+import 'package:ysairplane/code/YSShortGoods.dart';
+import 'package:ysairplane/code/YSShortPlane.dart';
+import 'package:ysairplane/code/YSTravelling.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:flutter_swiper/flutter_swiper.dart';
+import 'package:ysairplane/code/YSNews.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+import 'YSContractPlane.dart';
+import 'YSSightseeingPlane.dart';
+
+class YSHome extends StatefulWidget {
+  @override
+  _YSHomeState createState() => _YSHomeState();
+}
+
+class _YSHomeState extends State<YSHome> with AutomaticKeepAliveClientMixin{
+  @override
+  bool get wantKeepAlive => true;
+  List _banners = List();
+  List _products = List();
+  Map _advertising;
+  String _city = '';
+  List _dataArray = [];
+  @override
+  void initState() {
+    Future.delayed(Duration(seconds: 0)).then((value){
+      _getFeatureDisplayShowData();
+    });
+    super.initState();
+  }
+  @override
+  Widget build(BuildContext context) {
+    super.build(context);
+    return Scaffold(
+      backgroundColor: Colors.white,
+      appBar: CupertinoNavigationBar(
+        leading: GestureDetector(
+          onTap: (){
+            Navigator.of(context,rootNavigator: true).push(
+              CupertinoPageRoute(
+                builder: (context){
+                  return YSCity();
+                }
+              )
+            ).then((value){
+              if(value!=null){
+                _city = value['display'];
+                _getFeatureDisplayListData(_city);
+               // _getFeatureDisplayListData();
+              }
+            });
+          },
+          child: Row(
+            mainAxisSize: MainAxisSize.min,
+            children: [
+              Container(
+                width: hsp(35*(_city.length>5?5:_city.length)),
+                child: Text(_city,style: TextStyle(fontSize: zsp(28),color: Color(0xFF8E8E93)),overflow: TextOverflow.ellipsis,),
+              ),
+              Icon(Icons.keyboard_arrow_down,size: zsp(30),color: Color(0xFF8E8E93),)
+            ],
+          ),
+        ),
+        middle: GestureDetector(
+          onTap: (){
+            Navigator.of(context,rootNavigator: true).push(
+              CupertinoPageRoute(
+                builder: (context){
+                  return YSSearch();
+                }
+              )
+            );
+          },
+          child: Container(
+            height: hsp(66),
+            padding: EdgeInsets.only(left: wsp(30),right: wsp(30)),
+            decoration: BoxDecoration(
+              color: Color(0xFFF0F0F1),
+              borderRadius: BorderRadius.all(Radius.circular(5))
+            ),
+            child: Row(
+              children: [
+                Icon(Icons.search,size: hsp(40),color: Color(0xFF8E8E93),),
+                Text('  目的地·酒店·关键词',style: TextStyle(fontSize: zsp(28),color: Color(0xFF8E8E93),fontWeight: FontWeight.normal),)
+              ],
+            ),
+          ),
+        ),
+        trailing: GestureDetector(
+          onTap: (){
+            Navigator.of(context,rootNavigator: true).push(
+                CupertinoPageRoute(
+                    builder: (context){
+                      return YSHomeMsg();
+                    }
+                )
+            );
+          },
+          child: Container(
+            height: hsp(45),
+            width: wsp(45),
+            child: Image.asset('lib/images/homeMsg.png'),
+          ),
+        ),
+        border: Border.all(width: 0.5,color: Colors.white),
+      ),
+      body: Container(
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-94,
+        child: SingleChildScrollView(
+          padding: EdgeInsets.all(0),
+          child: Column(
+            children: [
+              Container(
+                height: hsp(292),
+                margin: EdgeInsets.all(hsp(24)),
+                child: _banners.length>0?Swiper(
+                  itemBuilder: (BuildContext context, int index) {
+                    return CachedNetworkImage(
+                      imageUrl: '${_banners[index]['url']}',
+                      fit: BoxFit.fill,
+                    );
+                  },
+                  itemCount: _banners.length,
+                  scrollDirection: Axis.horizontal,
+                  loop: true,
+                  duration: 300,
+                  autoplay: true,
+                  onTap: (index) {
+                    debugPrint("点击了第:$index个");
+                  },
+                  pagination: SwiperPagination(
+                    alignment: Alignment.bottomCenter,
+                    builder: DotSwiperPaginationBuilder(
+                      color: Colors.white,
+                      activeColor: Colors.white,
+                      size: 5.0,
+                      activeSize: 10.0
+                    ),
+                  ),
+                  autoplayDisableOnInteraction : true,
+                ):Container(),
+              ),
+              Container(
+                margin: EdgeInsets.only(left: hsp(24),right: hsp(24),top: hsp(15),bottom: hsp(34)),
+                height: hsp(350),
+                child: GridView.builder(
+                    gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                        crossAxisCount: 5,
+                        crossAxisSpacing: wsp(51),
+                        mainAxisSpacing: hsp(36),
+                        childAspectRatio: 0.8
+                    ),
+                    itemBuilder: (context,index){
+                      return GestureDetector(
+                        onTap: (){
+                          Navigator.of(context,rootNavigator: true).push(
+                            CupertinoPageRoute(
+                              builder: (context){
+                                return _products[index]['target']==1?YSDoctorPlane():_products[index]['target']==2?YSHelpPlane():_products[index]['target']==3?YSShortGoods():
+                                _products[index]['target']==4?YSSightseeingPlane(type: planeType.marry,):_products[index]['target']==5?YSSightseeingPlane(type: planeType.sport,):_products[index]['target']==6?YSShortPlane():
+                                _products[index]['target']==7?YSTravelling():_products[index]['target']==8?YSContractPlane():_products[index]['target']==9?YSSightseeingPlane(type: planeType.sightseeing,):YSNews();
+                              }
+                            )
+                          );
+                        },
+                        child: Container(
+                          child: Column(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              CachedNetworkImage(
+                                width: 40,
+                                height: 40,
+                                imageUrl: '${_products[index]['url']}',
+                                fit: BoxFit.fill
+                              ),
+                              Text('${_products[index]['name']}',style: TextStyle(fontSize: zsp(23),color: Color(0xFF34373A)),)
+                            ],
+                          ),
+                        ),
+                      );
+                    },
+                  itemCount: _products.length,
+                  padding: EdgeInsets.all(0),
+                  physics: NeverScrollableScrollPhysics(),
+                ),
+              ),
+              if(_advertising!=null)Container(
+                margin: EdgeInsets.only(left: hsp(24),right: hsp(24),bottom: hsp(24)),
+                height: wsp(136),
+                decoration: BoxDecoration(
+                  image: DecorationImage(
+                    image: NetworkImage('${_advertising['url']}'),
+                    fit: BoxFit.fill
+                  )
+                ),
+              ),
+              Divider(height: 10,thickness: 10,color: Color(0xFFF5F6F8),),
+              ListView.separated(
+                itemBuilder: (context,index){
+                  return _dataArray[index]['displayType']=='1'?Column(
+                    children: [
+                      Container(
+                        height: hsp(100),
+                        padding: EdgeInsets.all(hsp(24)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Row(
+                              children: [
+                                Container(
+                                  height: hsp(36),
+                                  width: wsp(5),
+                                  color: Color(0xFF3676EC),
+                                  margin: EdgeInsets.only(right: wsp(20),top: hsp(8)),
+                                ),
+                                Text('${_dataArray[index]['labelName']}',style: TextStyle(fontSize: zsp(36),color: Color(0xFF181818),fontWeight: FontWeight.bold),)
+                              ],
+                            ),
+                            Row(
+                              children: [
+                                Text('更多',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                Icon(Icons.keyboard_arrow_right,size: hsp(30),color: Color(0xFF999999),)
+                              ],
+                            )
+                          ],
+                        ),
+                      ),
+                      Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F2),),
+                      Container(
+                        height: hsp(387),
+                        margin: EdgeInsets.all(hsp(24)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Stack(
+                              children: [
+                                Container(
+                                  height: hsp(387),
+                                  width: (MediaQuery.of(context).size.width-wsp(24)*2-wsp(6))/2,
+                                  decoration: BoxDecoration(
+                                      borderRadius: BorderRadius.all(Radius.circular(5))
+                                  ),
+                                  child: ClipRRect(
+                                    child: CachedNetworkImage(
+                                      imageUrl: '${_dataArray[index]['dtAirTours'][0]['cover']}',
+                                      fit: BoxFit.fill,
+                                    ),
+                                    borderRadius: BorderRadius.all(Radius.circular(5)),
+                                  )
+                                ),
+                                Container(
+                                  height: hsp(40),
+                                  alignment: Alignment.centerLeft,
+                                  child: Text('${_dataArray[index]['dtAirTours'][0]['title']}',style: TextStyle(fontSize: zsp(20),color: Colors.white),),
+                                  decoration: BoxDecoration(
+                                      color: Colors.black26,
+                                      borderRadius: BorderRadius.only(bottomRight: Radius.circular(5),topLeft: Radius.circular(5))
+                                  ),
+                                  padding: EdgeInsets.only(left: hsp(10),right: hsp(10)),
+                                )
+                              ],
+                            ),
+                            Column(
+                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                              children: [
+                                Stack(
+                                  children: [
+                                    Container(
+                                        height: hsp(387)/2-wsp(6),
+                                        width: (MediaQuery.of(context).size.width-wsp(24)*2-wsp(6))/2,
+                                        decoration: BoxDecoration(
+                                            borderRadius: BorderRadius.all(Radius.circular(5))
+                                        ),
+                                        child: ClipRRect(
+                                          child: CachedNetworkImage(
+                                            imageUrl: '${_dataArray[index]['dtAirTours'][1]['cover']}',
+                                            fit: BoxFit.fill,
+                                          ),
+                                          borderRadius: BorderRadius.all(Radius.circular(5)),
+                                        )
+                                    ),
+                                    Container(
+                                      height: hsp(40),
+                                      alignment: Alignment.centerLeft,
+                                      child: Text('${_dataArray[index]['dtAirTours'][1]['title']}',style: TextStyle(fontSize: zsp(20),color: Colors.white),),
+                                      decoration: BoxDecoration(
+                                          color: Color(0xFFEC6163),
+                                          borderRadius: BorderRadius.only(bottomRight: Radius.circular(5),topLeft: Radius.circular(5))
+                                      ),
+                                      padding: EdgeInsets.only(left: hsp(10),right: hsp(10)),
+                                    )
+                                  ],
+                                ),
+                                Stack(
+                                  children: [
+                                    Container(
+                                        height: hsp(387)/2-wsp(6),
+                                        width: (MediaQuery.of(context).size.width-wsp(24)*2-wsp(6))/2,
+                                        decoration: BoxDecoration(
+                                            borderRadius: BorderRadius.all(Radius.circular(5))
+                                        ),
+                                        child: ClipRRect(
+                                          child: CachedNetworkImage(
+                                            imageUrl: '${_dataArray[index]['dtAirTours'][2]['cover']}',
+                                            fit: BoxFit.fill,
+                                          ),
+                                          borderRadius: BorderRadius.all(Radius.circular(5)),
+                                        )
+                                    ),
+                                    Container(
+                                      height: hsp(40),
+                                      alignment: Alignment.centerLeft,
+                                      child: Text('${_dataArray[index]['dtAirTours'][2]['title']}',style: TextStyle(fontSize: zsp(20),color: Colors.white),),
+                                      decoration: BoxDecoration(
+                                          color: Color(0xFFFB882E),
+                                          borderRadius: BorderRadius.only(bottomRight: Radius.circular(5),topLeft: Radius.circular(5))
+                                      ),
+                                      padding: EdgeInsets.only(left: hsp(10),right: hsp(10)),
+                                    )
+                                  ],
+                                ),
+                              ],
+                            )
+                          ],
+                        ),
+                      ),
+                    ],
+                  ):_dataArray[index]['displayType']=='2'?Column(
+                    children: [
+                      Container(
+                        height: hsp(100),
+                        color: Colors.white,
+                        padding: EdgeInsets.all(hsp(24)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Row(
+                              children: [
+                                Container(
+                                  height: hsp(36),
+                                  width: wsp(5),
+                                  color: Color(0xFF3676EC),
+                                  margin: EdgeInsets.only(right: wsp(20),top: hsp(8)),
+                                ),
+                                Text('${_dataArray[index]['labelName']}',style: TextStyle(fontSize: zsp(36),color: Color(0xFF181818),fontWeight: FontWeight.bold),)
+                              ],
+                            ),
+                            Row(
+                              children: [
+                                Text('更多',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                Icon(Icons.keyboard_arrow_right,size: hsp(30),color: Color(0xFF999999),)
+                              ],
+                            )
+                          ],
+                        ),
+                      ),
+                      Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F2),),
+                      Container(
+                        height: hsp(420),
+                        margin: EdgeInsets.only(top: hsp(24),bottom: hsp(24),left: wsp(40),right: wsp(24)),
+                        child: Swiper(
+                          itemBuilder: (BuildContext context, int indexSub) {
+                            return Container(
+                                width: wsp(350),
+                                margin: EdgeInsets.only(bottom: hsp(20),top: hsp(10)),
+                                decoration: BoxDecoration(
+                                    color: Colors.white,
+                                    boxShadow: [
+                                      BoxShadow(
+                                        color: Color(0x1A000000),
+                                        blurRadius: wsp(20),
+                                        offset: Offset(1, 1),
+                                      )
+                                    ]
+                                ),
+                                child: Column(
+                                  children: [
+                                    Stack(
+                                      children: [
+                                        Container(
+                                          height: hsp(200),
+                                          width: wsp(350),
+                                          decoration: BoxDecoration(
+                                            borderRadius: BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)),
+                                          ),
+                                          child: ClipRRect(
+                                            child: CachedNetworkImage(
+                                              imageUrl: '${_dataArray[index]['dtAirTours'][indexSub]['cover']}',
+                                              fit: BoxFit.fill,
+                                            ),
+                                            borderRadius: BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)),
+                                          )
+                                        ),
+                                        Row(
+                                          children: [
+                                            Container(
+                                              height: hsp(32),
+                                              alignment: Alignment.centerLeft,
+                                              child: Text('西安',style: TextStyle(fontSize: zsp(20),color: Colors.white),),
+                                              decoration: BoxDecoration(
+                                                  color: Color(0xFFE9C68E),
+                                                  borderRadius: BorderRadius.only(topLeft: Radius.circular(5),bottomRight: Radius.circular(5))
+                                              ),
+                                              padding: EdgeInsets.only(left: hsp(10),right: hsp(10)),
+                                            )
+
+                                          ],
+                                        )
+                                      ],
+                                    ),
+                                    Container(
+                                      decoration: BoxDecoration(
+                                        borderRadius: BorderRadius.only(bottomLeft: Radius.circular(5),bottomRight: Radius.circular(5)),
+                                      ),
+                                      child: Column(
+                                        children: [
+                                          Container(
+                                            width: wsp(350),
+                                            child: Text('${_dataArray[index]['dtAirTours'][indexSub]['title']}',
+                                              style: TextStyle(fontSize: zsp(28),fontWeight: FontWeight.bold,color: Color(0xFF181818)),overflow: TextOverflow.ellipsis,maxLines: 2,),
+                                            margin: EdgeInsets.only(top: hsp(20),bottom: hsp(15)),
+                                          ),
+                                          SingleChildScrollView(
+                                            scrollDirection: Axis.horizontal,
+                                            child: Row(
+                                              children: [
+                                                Text('¥',style: TextStyle(fontSize: zsp(20),color: Color(0xFFEB423B),fontWeight: FontWeight.bold),),
+                                                Text('${_dataArray[index]['dtAirTours'][indexSub]['price']}',style: TextStyle(fontSize: zsp(38),color: Color(0xFFEB423B),fontWeight: FontWeight.bold),),
+                                                Text(' 元起',style: TextStyle(fontSize: zsp(20),color: Color(0xFFEB423B),fontWeight: FontWeight.bold),),
+                                                Text('${_dataArray[index]['dtAirTours'][indexSub]['dtFlightInformation']['seatNum']}人体验',style: TextStyle(fontSize: zsp(16),color: Color(0xFFA2A2A2),fontWeight: FontWeight.normal),),
+                                              ],
+                                            ),
+                                          )
+                                        ],
+                                        crossAxisAlignment: CrossAxisAlignment.start,
+                                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                      ),
+                                      padding: EdgeInsets.all(hsp(20)),
+                                    )
+                                  ],
+                                ),
+                              );
+                          },
+                          itemCount: (_dataArray[index]['dtAirTours']).length,
+                          scrollDirection: Axis.horizontal,
+                          loop: true,
+                          viewportFraction: 0.5,
+                          scale: 0.8,
+                          onTap: (index) {
+                            debugPrint("点击了第:$index个");
+                          },
+                        ),
+                      ),
+                    ],
+                  ):Column(
+                    children: [
+                      Container(
+                        height: hsp(100),
+                        color: Colors.white,
+                        padding: EdgeInsets.all(hsp(24)),
+                        child: Row(
+                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          children: [
+                            Row(
+                              children: [
+                                Container(
+                                  height: hsp(36),
+                                  width: wsp(5),
+                                  color: Color(0xFF3676EC),
+                                  margin: EdgeInsets.only(right: wsp(20),top: hsp(8)),
+                                ),
+                                Text('${_dataArray[index]['labelName']}',style: TextStyle(fontSize: zsp(36),color: Color(0xFF181818),fontWeight: FontWeight.bold),)
+                              ],
+                            ),
+                            Row(
+                              children: [
+                                Text('更多',style: TextStyle(fontSize: zsp(24),color: Color(0xFF999999)),),
+                                Icon(Icons.keyboard_arrow_right,size: hsp(30),color: Color(0xFF999999),)
+                              ],
+                            )
+                          ],
+                        ),
+                      ),
+                      Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F2),),
+                      Container(
+                        height: hsp(470),
+                        margin: EdgeInsets.all(hsp(24)),
+                        child: ListView.separated(
+                          scrollDirection: Axis.horizontal,
+                          itemBuilder: (context,indexSub){
+                            return Container(
+                              height: hsp(450),
+                              width: wsp(350),
+                              decoration: BoxDecoration(
+                                  color: Colors.white,
+                                  boxShadow: [
+                                    BoxShadow(
+                                      color: Color(0x1A000000),
+                                      blurRadius: wsp(20),
+                                      offset: Offset(1, 1),
+                                    )
+                                  ]
+                              ),
+                              child: Column(
+                                children: [
+                                  Stack(
+                                    children: [
+                                      Container(
+                                          height: hsp(210),
+                                          width: wsp(330),
+                                          decoration: BoxDecoration(
+                                            borderRadius: BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)),
+                                          ),
+                                          child: ClipRRect(
+                                            child: CachedNetworkImage(
+                                              imageUrl: '${_dataArray[index]['dtAirTours'][indexSub]['cover']}',
+                                              fit: BoxFit.fill,
+                                            ),
+                                            borderRadius: BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)),
+                                          )
+                                      ),
+                                      Row(
+                                        children: [
+                                          if(_dataArray[index]['dtAirTours'][indexSub]['isVip']==1)Container(
+                                            height: hsp(32),
+                                            width: wsp(59),
+                                            decoration: BoxDecoration(
+                                                color: Color(0xFFE9C68E),
+                                                borderRadius: BorderRadius.only(topLeft: Radius.circular(5),bottomRight: Radius.circular(5))
+                                            ),
+                                            padding: EdgeInsets.only(left: wsp(10),right: wsp(10)),
+                                            child: Image.asset('lib/images/vip.png'),
+                                          )
+                                        ],
+                                      )
+                                    ],
+                                  ),
+                                  Container(
+                                    height: hsp(240),
+                                    decoration: BoxDecoration(
+                                      borderRadius: BorderRadius.only(bottomLeft: Radius.circular(5),bottomRight: Radius.circular(5)),
+                                    ),
+                                    child: Column(
+                                      children: [
+                                        Container(
+                                          width: wsp(330),
+                                          child: Text('${_dataArray[index]['dtAirTours'][indexSub]['title']}',style: TextStyle(fontSize: zsp(32),fontWeight: FontWeight.bold,color: Color(0xFF181818)),overflow: TextOverflow.ellipsis,),
+                                        ),
+                                        Row(
+                                          children: [
+                                            Container(
+                                              height: hsp(30),
+                                              child: Row(
+                                                children: [
+                                                  Image(image: AssetImage('lib/images/vip2.png'),height: hsp(15),width: wsp(16),),
+                                                  Text(' ${_dataArray[index]['dtAirTours'][indexSub]['dtFlightInformation']['model']}',style: TextStyle(fontSize: zsp(18),color: Color(0xFFF9DEAC)),)
+                                                ],
+                                              ),
+                                              color: Color(0xFF000000),
+                                              padding: EdgeInsets.only(left: wsp(7),right: wsp(7)),
+                                            ),
+                                            Container(
+                                              height: hsp(30),
+                                              decoration: BoxDecoration(
+                                                  border: Border.all(color: Color(0xFF000000),width: 0.1)
+                                              ),
+                                              padding: EdgeInsets.only(left: wsp(10),right: wsp(10)),
+                                              child: Text('座位${_dataArray[index]['dtAirTours'][indexSub]['dtFlightInformation']['seatNum']}',style: TextStyle(fontSize: zsp(18),color: Color(0xFF565656)),),
+                                              alignment: Alignment.center,
+                                            )
+                                          ],
+                                        ),
+                                        Text('${_dataArray[index]['dtAirTours'][indexSub]['flightTime']}',style: TextStyle(fontSize: zsp(24),color: Color(0xFFA2A2A2)),),
+                                        SingleChildScrollView(
+                                          scrollDirection: Axis.horizontal,
+                                          child: Row(
+                                            children: [
+                                              Text('¥',style: TextStyle(fontSize: zsp(20),color: Color(0xFFEB423B),fontWeight: FontWeight.bold),),
+                                              Text('${_dataArray[index]['dtAirTours'][indexSub]['discountPrice']}',style: TextStyle(fontSize: zsp(38),color: Color(0xFFEB423B),fontWeight: FontWeight.bold),),
+                                              Text(' 元起/座',style: TextStyle(fontSize: zsp(20),color: Color(0xFFEB423B),fontWeight: FontWeight.bold),),
+                                              Text('   ¥${_dataArray[index]['dtAirTours'][indexSub]['price']}元起/座',style: TextStyle(fontSize: zsp(16),color: Color(0xFFA2A2A2),fontWeight: FontWeight.normal),),
+                                            ],
+                                          ),
+                                        )
+                                      ],
+                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                    ),
+                                    padding: EdgeInsets.all(hsp(20)),
+                                  )
+                                ],
+                              ),
+                            );
+                          },
+                          separatorBuilder: (context,index){
+                            return Container(
+                              color: Colors.white,
+                              width: wsp(14),
+                            );
+                          },
+                          itemCount: (_dataArray[index]['dtAirTours']).length,
+                          padding: EdgeInsets.only(bottom: hsp(20)),
+                        ),
+                      ),
+                    ],
+                  );
+                },
+                separatorBuilder: (context,index){
+                  return Divider(height: 10,thickness: 10,color: Color(0xFFF5F6F8),);
+                },
+                itemCount: _dataArray.length,
+                padding: EdgeInsets.all(0),
+                shrinkWrap: true,
+                physics: NeverScrollableScrollPhysics(),
+              ),
+              Container(
+                height: 30,
+                color: Color(0xFFF5F6F8),
+              )
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+  _getFeatureDisplayShowData() async{
+    Map dict = await ysRequestHttp(context,type: requestType.get,api: '/app/applets/featureDisplay/show',parameter: {},isLoading: false,isToken: false);
+    if(dict!=null){
+      _banners = dict['data']['banner'];
+      _products = dict['data']['product'];
+      _advertising = dict['data']['advertising'];
+      SharedPreferences prefer = await SharedPreferences.getInstance();
+      if(prefer.getString('cityHistory')!=null){
+        String historyStr = prefer.getString('cityHistory');
+        List historyList = jsonDecode(historyStr);
+        _city = '${historyList[0]['display']}';
+      }else{
+        _city = '';
+      }
+      setState(() {
+
+      });
+      _getFeatureDisplayListData(_city);
+    }
+  }
+
+  _getFeatureDisplayListData(String city) async {
+    Map dict = await ysRequestHttp(context, type: requestType.get,api: '/app/applets/featureDisplay/list',parameter: {'city':city},isLoading: true,isToken: false);
+    if (dict != null) {
+      setState(() {
+        _dataArray = dict['data'];
+      });
+    }
+  }
+}
+

+ 111 - 0
ysairplane1/lib/code/YSHomeMsg.dart

@@ -0,0 +1,111 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/code/YSHomeMsgDetail.dart';
+import 'package:ysairplane/code/YSHomeMsgSetting.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSHomeMsg extends StatefulWidget {
+  @override
+  _YSHomeMsgState createState() => _YSHomeMsgState();
+}
+
+class _YSHomeMsgState extends State<YSHomeMsg> {
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '消息',
+      ysright: GestureDetector(
+        child: Icon(Icons.settings,size: hsp(40),color: Color(0xFF444444),),
+        onTap: (){
+          Navigator.of(context).push(
+              CupertinoPageRoute(
+                  builder: (context){
+                    return YSHomeMsgSetting();
+                  }
+              )
+          );
+        },
+      ),
+      yschild: Container(
+        width: MediaQuery.of(context).size.width,
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        color: Color(0xFFF1F2F3),
+        child: ListView.separated(
+          padding: EdgeInsets.only(top: hsp(10),bottom: hsp(10)),
+          shrinkWrap: true,
+          itemBuilder: (context,index){
+            return GestureDetector(
+              onTap: (){
+                Navigator.of(context).push(
+                  CupertinoPageRoute(
+                    builder: (context){
+                      return YSHomeMsgDetail();
+                    }
+                  )
+                );
+              },
+              child: Container(
+                color: Color(0xFFFAFAFA),
+                padding: EdgeInsets.all(hsp(30)),
+                child: Row(
+                  children: [
+                    Stack(
+                      children: [
+                        Container(
+                          height: hsp(100),
+                          width: hsp(100),
+                          margin: EdgeInsets.only(top: hsp(5),right: wsp(20)),
+                          decoration: BoxDecoration(
+                            color: Color(0xFF3E81D0),
+                            borderRadius: BorderRadius.all(Radius.circular(5))
+                          ),
+                        ),
+                        Container(
+                          height: hsp(20),
+                          width: hsp(20),
+                          margin: EdgeInsets.only(left: hsp(85)),
+                          decoration: BoxDecoration(
+                              color: Color(0xFFE95D58),
+                              borderRadius: BorderRadius.all(Radius.circular(hsp(10)))
+                          ),
+                        )
+                      ],
+                    ),
+                    Column(
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      children: [
+                        Container(
+                          width: MediaQuery.of(context).size.width-hsp(160)-wsp(20),
+                          margin: EdgeInsets.only(bottom: hsp(10)),
+                          child: Row(
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            children: [
+                              Container(
+                                child: Text('订单生成成功',style: TextStyle(fontSize: zsp(32),color: Color(0xFF000000)),maxLines: 1,overflow: TextOverflow.ellipsis,),
+                                width: (MediaQuery.of(context).size.width-hsp(160)-wsp(20))*0.65,
+                              ),
+                              Text('下午 3:44',style: TextStyle(fontSize: zsp(22),color: Color(0xFFCCCCCC)),),
+                            ],
+                          ),
+                        ),
+                        Container(
+                          child: Text('订单编号:23140000,上海到西安,请及时支付',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),maxLines: 1,overflow: TextOverflow.ellipsis,),
+                          width: MediaQuery.of(context).size.width-hsp(160)-wsp(20),
+                        )
+                      ],
+                    )
+                  ],
+                ),
+              ),
+            );
+          },
+          separatorBuilder: (context,index){
+            return Divider(height: 0.5,thickness: 0.5,color: Color(0xFFF1F2F3),);
+          },
+          itemCount: 5
+        ),
+      ),
+    );
+  }
+}

+ 42 - 0
ysairplane1/lib/code/YSHomeMsgDetail.dart

@@ -0,0 +1,42 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSHomeMsgDetail extends StatefulWidget {
+  @override
+  _YSHomeMsgDetailState createState() => _YSHomeMsgDetailState();
+}
+
+class _YSHomeMsgDetailState extends State<YSHomeMsgDetail> {
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '订单创建成功',
+      yschild: Container(
+        width: MediaQuery.of(context).size.width,
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        color: Color(0xFFF1F2F3),
+        child: Column(
+          children: [
+            Container(
+              padding: EdgeInsets.all(hsp(30)),
+              color: Color(0xFFFAFAFA),
+              child: Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  Text('2020.09.09 13:44',style: TextStyle(fontSize: zsp(22),color: Color(0xFFCCCCCC)),),
+                  Container(
+                    margin: EdgeInsets.only(top: hsp(20),bottom: hsp(20)),
+                    child: Text('订单创建成功',style: TextStyle(fontSize: zsp(34),color: Color(0xFF000000),fontWeight: FontWeight.bold),),
+                  ),
+                  Text('订单创建成功,订单编号: 3232132131,上海到西安,请及时支付!',style: TextStyle(fontSize: zsp(26),color: Color(0xFFB7B7B7)),),
+                ],
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 50 - 0
ysairplane1/lib/code/YSHomeMsgSetting.dart

@@ -0,0 +1,50 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSHomeMsgSetting extends StatefulWidget {
+  @override
+  _YSHomeMsgSettingState createState() => _YSHomeMsgSettingState();
+}
+
+class _YSHomeMsgSettingState extends State<YSHomeMsgSetting> {
+  bool _isOpen = false;
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '设置',
+      yschild: Container(
+        width: MediaQuery.of(context).size.width,
+        height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44,
+        color: Color(0xFFF1F2F3),
+        child: Column(
+          children: [
+            Container(
+              padding: EdgeInsets.all(hsp(30)),
+              color: Color(0xFFFAFAFA),
+              child: Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                children: [
+                  Text('消息提醒',style: TextStyle(fontSize: zsp(34),color: Color(0xFF333333)),),
+                  GestureDetector(
+                    onTap: (){
+                      setState(() {
+                        _isOpen = !_isOpen;
+                      });
+                    },
+                    child: Container(
+                      height: hsp(60),
+                      width: hsp(100),
+                      child: Image.asset(_isOpen==false?'lib/images/kaiguankai.png':'lib/images/kaiguanguan.png'),
+                    ),
+                  )
+                ],
+              ),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 274 - 0
ysairplane1/lib/code/YSInputPayPass.dart

@@ -0,0 +1,274 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:ysairplane/base/YSBase.dart';
+import 'package:ysairplane/tools/YSNetWorking.dart';
+import 'package:ysairplane/tools/YSTools.dart';
+
+class YSInputPayPass extends StatefulWidget {
+  final String code;
+  const YSInputPayPass({Key key, this.code}) : super(key: key);
+  @override
+  _YSInputPayPassState createState() => _YSInputPayPassState();
+}
+
+class _YSInputPayPassState extends State<YSInputPayPass> {
+  List _passArray = [];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '设置支付密码',
+      yschild: Stack(
+        children: [
+          Column(
+            children: [
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(150)),
+                child: Text('设置6位数字支付密码',style: TextStyle(fontSize: zsp(40),color: Color(0xFF333333),fontWeight: FontWeight.bold),),
+              ),
+              Container(
+                width: MediaQuery.of(context).size.width-hsp(100),
+                height: hsp(100),
+                margin: EdgeInsets.only(top: hsp(200)),
+                decoration: BoxDecoration(
+                    border: Border.all(color: Color(0xFF108EE9),width: 2),
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                ),
+                child: ListView.separated(
+                  itemBuilder: (context,index){
+                    return Container(
+                      height: hsp(100),
+                      width: (MediaQuery.of(context).size.width-hsp(100)-9)/6,
+                      child: Container(
+                        height: hsp(20),
+                        width: hsp(20),
+                        decoration: BoxDecoration(
+                            color: index<_passArray.length?Colors.black:Colors.transparent,
+                            borderRadius: BorderRadius.all(Radius.circular(50))
+                        ),
+                      ),
+                      alignment: Alignment.center,
+                    );
+                  },
+                  separatorBuilder: (context,index){
+                    return Container(width: 1,color: Color(0xFF9A9A9A),height: hsp(100),);
+                  },
+                  itemCount: 6,
+                  padding: EdgeInsets.all(0),
+                  scrollDirection: Axis.horizontal,
+                ),
+              ),
+              Container(
+                height: hsp(50),
+                alignment: Alignment.center,
+                child: Text('支付密码不能是重复、连续的数字',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),),
+              ),
+            ],
+          ),
+          Container(
+              margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(432)-MediaQuery.of(context).padding.top-44),
+              width: MediaQuery.of(context).size.width,
+              decoration: BoxDecoration(
+                  color: Color(0xFF8C8C8C),
+                  border: Border(top: BorderSide(width: 1,color: Color(0xFF8C8C8C)))
+              ),
+              height: hsp(432),
+              child: GridView.builder(
+                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                    crossAxisCount: 3,
+                    mainAxisSpacing: 1,
+                    crossAxisSpacing: 1,
+                    childAspectRatio: ((MediaQuery.of(context).size.width-2)/3)/((hsp(432)-3)/4)
+                ),
+                itemBuilder: (context, index) {
+                  return GestureDetector(
+                    onTap: (){
+                      if(index==9){
+                        if(_passArray.length>0){
+                          _passArray.removeAt(_passArray.length-1);
+                        }
+                        setState(() {});
+                      }else if(index==11){
+                        if(_passArray.length==6){
+                          Navigator.of(context).push(
+                            CupertinoPageRoute(
+                              builder: (context){
+                                return YSInputPayPassAgain(code: widget.code,);
+                              }
+                            )
+                          );
+                        }else{
+                          ysFlutterToast(context, '支付密码为6位数字');
+                        }
+                      }else{
+                        if(_passArray.length<6){
+                          _passArray.add(index+1);
+                          setState(() {});
+                        }
+                      }
+                    },
+                    child: Container(
+                      color: index==9||index==11?Color(0xFFD0D5DC):Colors.white,
+                      child: Text(index==9?'删除':index==10?'0':index==11?'确认':'${index+1}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),),
+                      alignment: Alignment.center,
+                    ),
+                  );
+                },
+                itemCount: 12,
+                padding: EdgeInsets.all(0),
+                physics: NeverScrollableScrollPhysics(),
+              )
+          )
+        ],
+      ),
+    );
+  }
+}
+
+class YSInputPayPassAgain extends StatefulWidget {
+  final String code;
+  const YSInputPayPassAgain({Key key, this.code}) : super(key: key);
+  @override
+  _YSInputPayPassAgainState createState() => _YSInputPayPassAgainState();
+}
+
+class _YSInputPayPassAgainState extends State<YSInputPayPassAgain> {
+  List _passArray = [];
+  @override
+  Widget build(BuildContext context) {
+    return YSBase(
+      ystitle: '设置支付密码',
+      yschild: Stack(
+        children: [
+        Column(
+          children: [
+            Container(
+              height: hsp(50),
+              alignment: Alignment.center,
+              margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top+hsp(150)),
+              child: Text('请再次填写以确认',style: TextStyle(fontSize: zsp(40),color: Color(0xFF333333),fontWeight: FontWeight.bold),),
+            ),
+            Container(
+              width: MediaQuery.of(context).size.width-hsp(100),
+              height: hsp(100),
+              margin: EdgeInsets.only(top: hsp(200)),
+              decoration: BoxDecoration(
+                  border: Border.all(color: Color(0xFF108EE9),width: 2),
+                  borderRadius: BorderRadius.all(Radius.circular(5))
+              ),
+              child: ListView.separated(
+                itemBuilder: (context,index){
+                  return Container(
+                    height: hsp(100),
+                    width: (MediaQuery.of(context).size.width-hsp(100)-9)/6,
+                    child: Container(
+                      height: hsp(20),
+                      width: hsp(20),
+                      decoration: BoxDecoration(
+                          color: index<_passArray.length?Colors.black:Colors.transparent,
+                          borderRadius: BorderRadius.all(Radius.circular(50))
+                      ),
+                    ),
+                    alignment: Alignment.center,
+                  );
+                },
+                separatorBuilder: (context,index){
+                  return Container(width: 1,color: Color(0xFF9A9A9A),height: hsp(100),);
+                },
+                itemCount: 6,
+                padding: EdgeInsets.all(0),
+                scrollDirection: Axis.horizontal,
+              ),
+            ),
+            Container(
+              height: hsp(50),
+              alignment: Alignment.center,
+              child: Text('支付密码不能是重复、连续的数字',style: TextStyle(fontSize: zsp(28),color: Color(0xFF999999)),),
+            ),
+            GestureDetector(
+              onTap: (){
+                if(_passArray.length==6){
+                  _postPayPassData();
+                }else{
+                  ysFlutterToast(context, '支付密码为6位数字');
+                }
+              },
+              child: Container(
+                height: hsp(90),
+                width: MediaQuery.of(context).size.width-wsp(50)*2,
+                alignment: Alignment.center,
+                margin: EdgeInsets.only(top: hsp(80)),
+                decoration: BoxDecoration(
+                    color: Color(0xFF3B7EF2),
+                    borderRadius: BorderRadius.all(Radius.circular(5))
+                ),
+                child: Text('完成',style: TextStyle(fontSize: zsp(34),color: Colors.white),),
+              ),
+            ),
+          ],
+        ),
+          Container(
+              margin: EdgeInsets.only(top: MediaQuery.of(context).size.height-hsp(432)-MediaQuery.of(context).padding.top-44),
+              width: MediaQuery.of(context).size.width,
+              decoration: BoxDecoration(
+                  color: Color(0xFF8C8C8C),
+                  border: Border(top: BorderSide(width: 1,color: Color(0xFF8C8C8C)))
+              ),
+              height: hsp(432),
+              child: GridView.builder(
+                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                    crossAxisCount: 3,
+                    mainAxisSpacing: 1,
+                    crossAxisSpacing: 1,
+                    childAspectRatio: ((MediaQuery.of(context).size.width-2)/3)/((hsp(432)-3)/4)
+                ),
+                itemBuilder: (context, index) {
+                  return GestureDetector(
+                    onTap: (){
+                      if(index==9){
+                        if(_passArray.length>0){
+                          _passArray.removeAt(_passArray.length-1);
+                        }
+                        setState(() {});
+                      }else if(index==11){
+                        if(_passArray.length==6){
+                          _postPayPassData();
+                        }else{
+                          ysFlutterToast(context, '支付密码为6位数字');
+                        }
+                      }else{
+                        if(_passArray.length<6){
+                          _passArray.add(index+1);
+                          setState(() {});
+                        }
+                      }
+                    },
+                    child: Container(
+                      color: index==9||index==11?Color(0xFFD0D5DC):Colors.white,
+                      child: Text(index==9?'删除':index==10?'0':index==11?'确认':'${index+1}',style: TextStyle(fontSize: zsp(40),color: Colors.black,fontWeight: FontWeight.bold),),
+                      alignment: Alignment.center,
+                    ),
+                  );
+                },
+                itemCount: 12,
+                padding: EdgeInsets.all(0),
+                physics: NeverScrollableScrollPhysics(),
+              )
+          )
+
+        ],
+      ),
+    );
+  }
+
+  _postPayPassData() async{
+    var dict = await ysRequestHttpEncrypt(context,type: requestType.post,api: '/app/applets/balance/setPayPassword',
+        parameter: {'verificationCode':widget.code,'password':_passArray.join('')},isLoading: false,isToken: true);
+    if(dict!=null){
+      Navigator.pop(context);
+      Navigator.pop(context);
+      Navigator.pop(context);
+    }
+  }
+}

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels