younger_times
2023-08-15 2ebbafa4b4a2994ae979fed38e1266d9efd5657e
优化
16个文件已修改
36个文件已添加
939 ■■■■ 已修改文件
BrokerDriver.xcodeproj/project.pbxproj 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/Contents.json 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-40.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-72.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-76.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small-50.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/ios-marketing.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/maker_start.imageset/Contents.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/maker_start.imageset/maker_start@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/maker_start.imageset/maker_start@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_check.imageset/Contents.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_check.imageset/marker_check@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_check.imageset/marker_check@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_terminal.imageset/Contents.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_terminal.imageset/marker_terminal@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_terminal.imageset/marker_terminal@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_warehouse.imageset/Contents.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_warehouse.imageset/marker_warehouse@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Assets.xcassets/Icon/marker_warehouse.imageset/marker_warehouse@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Enums.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Exception/LocationTool.swift 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeDetailContentVC.swift 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeDetailMapVC.swift 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeDetailMenuVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeVC.swift 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Info.plist 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Login/VC/LoginVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Network/NetworkRequest.swift 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Network/Services.swift 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/SceneDelegate.swift 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Tools/AttachTypeView.swift 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Tools/AttachTypeView.xib 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Tools/PhotoPickerView.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/ViewModels/OrderViewModel.swift 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver.xcodeproj/project.pbxproj
@@ -57,6 +57,7 @@
        138DA4D829F6305600A71FE7 /* Colors+Exception.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138DA4D029F6305600A71FE7 /* Colors+Exception.swift */; };
        138DA4D929F6305600A71FE7 /* LoginVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138DA4D329F6305600A71FE7 /* LoginVC.swift */; };
        138DA4DA29F6305600A71FE7 /* LoginVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 138DA4D429F6305600A71FE7 /* LoginVC.xib */; };
        138E53E92A8B6C91005B3C47 /* LocationTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138E53E82A8B6C91005B3C47 /* LocationTool.swift */; };
        13941CDF29F6901D00AB569F /* BaseTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13941CDE29F6901D00AB569F /* BaseTableView.swift */; };
        13941CE329F763C900AB569F /* PersonalCenterVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13941CE129F763C900AB569F /* PersonalCenterVC.swift */; };
        13941CE429F763C900AB569F /* PersonalCenterVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13941CE229F763C900AB569F /* PersonalCenterVC.xib */; };
@@ -148,6 +149,7 @@
        138DA4D029F6305600A71FE7 /* Colors+Exception.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Colors+Exception.swift"; sourceTree = "<group>"; };
        138DA4D329F6305600A71FE7 /* LoginVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginVC.swift; sourceTree = "<group>"; };
        138DA4D429F6305600A71FE7 /* LoginVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginVC.xib; sourceTree = "<group>"; };
        138E53E82A8B6C91005B3C47 /* LocationTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationTool.swift; sourceTree = "<group>"; };
        13941CDE29F6901D00AB569F /* BaseTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableView.swift; sourceTree = "<group>"; };
        13941CE129F763C900AB569F /* PersonalCenterVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalCenterVC.swift; sourceTree = "<group>"; };
        13941CE229F763C900AB569F /* PersonalCenterVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PersonalCenterVC.xib; sourceTree = "<group>"; };
@@ -295,6 +297,7 @@
                138DA4D029F6305600A71FE7 /* Colors+Exception.swift */,
                1309ADFA29F7840500F5FA26 /* Currency+Exception.swift */,
                13F47D432A063DE900B8AB63 /* UIButton+Exception.swift */,
                138E53E82A8B6C91005B3C47 /* LocationTool.swift */,
            );
            path = Exception;
            sourceTree = "<group>";
@@ -639,6 +642,7 @@
                130F4EEC29F7B6C100937687 /* CargoInfoTCell.swift in Sources */,
                135FD1F12A04A86B0048BE7A /* TroubleFootView.swift in Sources */,
                1309AE1129F7919900F5FA26 /* HomeDetailAttachVC.swift in Sources */,
                138E53E92A8B6C91005B3C47 /* LocationTool.swift in Sources */,
                139F0F7A29F66EB7007D9EA4 /* HomeHeaderVC.swift in Sources */,
                13F47D422A05F5F900B8AB63 /* GoogleModel.swift in Sources */,
                138DA4D929F6305600A71FE7 /* LoginVC.swift in Sources */,
@@ -827,12 +831,15 @@
                GENERATE_INFOPLIST_FILE = YES;
                INFOPLIST_FILE = BrokerDriver/Info.plist;
                INFOPLIST_KEY_NSCameraUsageDescription = "Upload receipts and vouchers using the camera";
                INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Track driver location and report";
                INFOPLIST_KEY_NSLocationUsageDescription = "Track driver location and report ";
                INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Track driver location and report ";
                INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Upload receipts and vouchers using the photo album";
                INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
                INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
                INFOPLIST_KEY_UIMainStoryboardFile = Main;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
                IPHONEOS_DEPLOYMENT_TARGET = 13.0;
                LD_RUNPATH_SEARCH_PATHS = (
                    "$(inherited)",
@@ -843,9 +850,12 @@
                PRODUCT_NAME = "$(TARGET_NAME)";
                PROVISIONING_PROFILE_SPECIFIER = "";
                "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = dev_profile;
                SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
                SUPPORTS_MACCATALYST = NO;
                SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
                SWIFT_EMIT_LOC_STRINGS = YES;
                SWIFT_VERSION = 5.0;
                TARGETED_DEVICE_FAMILY = "1,2";
                TARGETED_DEVICE_FAMILY = 1;
            };
            name = Debug;
        };
@@ -864,12 +874,15 @@
                GENERATE_INFOPLIST_FILE = YES;
                INFOPLIST_FILE = BrokerDriver/Info.plist;
                INFOPLIST_KEY_NSCameraUsageDescription = "Upload receipts and vouchers using the camera";
                INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Track driver location and report";
                INFOPLIST_KEY_NSLocationUsageDescription = "Track driver location and report ";
                INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Track driver location and report ";
                INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Upload receipts and vouchers using the photo album";
                INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
                INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
                INFOPLIST_KEY_UIMainStoryboardFile = Main;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
                IPHONEOS_DEPLOYMENT_TARGET = 13.0;
                LD_RUNPATH_SEARCH_PATHS = (
                    "$(inherited)",
@@ -880,9 +893,12 @@
                PRODUCT_NAME = "$(TARGET_NAME)";
                PROVISIONING_PROFILE_SPECIFIER = "";
                "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = adHoc_profile;
                SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
                SUPPORTS_MACCATALYST = NO;
                SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
                SWIFT_EMIT_LOC_STRINGS = YES;
                SWIFT_VERSION = 5.0;
                TARGETED_DEVICE_FAMILY = "1,2";
                TARGETED_DEVICE_FAMILY = 1;
            };
            name = Release;
        };
@@ -961,12 +977,15 @@
                GENERATE_INFOPLIST_FILE = YES;
                INFOPLIST_FILE = BrokerDriver/Info.plist;
                INFOPLIST_KEY_NSCameraUsageDescription = "Upload receipts and vouchers using the camera";
                INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Track driver location and report";
                INFOPLIST_KEY_NSLocationUsageDescription = "Track driver location and report ";
                INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Track driver location and report ";
                INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Upload receipts and vouchers using the photo album";
                INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
                INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
                INFOPLIST_KEY_UIMainStoryboardFile = Main;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
                IPHONEOS_DEPLOYMENT_TARGET = 13.0;
                LD_RUNPATH_SEARCH_PATHS = (
                    "$(inherited)",
@@ -977,9 +996,12 @@
                PRODUCT_NAME = "$(TARGET_NAME)";
                PROVISIONING_PROFILE_SPECIFIER = "";
                "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = dev_profile;
                SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
                SUPPORTS_MACCATALYST = NO;
                SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
                SWIFT_EMIT_LOC_STRINGS = YES;
                SWIFT_VERSION = 5.0;
                TARGETED_DEVICE_FAMILY = "1,2";
                TARGETED_DEVICE_FAMILY = 1;
            };
            name = Staging;
        };
BrokerDriver/Assets.xcassets/.DS_Store
Binary files differ
BrokerDriver/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,8 +1,153 @@
{
  "images" : [
    {
      "idiom" : "universal",
      "platform" : "ios",
      "filename" : "notification-icon@2x.png",
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "20x20"
    },
    {
      "filename" : "notification-icon@3x.png",
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "20x20"
    },
    {
      "filename" : "icon-small.png",
      "idiom" : "iphone",
      "scale" : "1x",
      "size" : "29x29"
    },
    {
      "filename" : "icon-small@2x.png",
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "29x29"
    },
    {
      "filename" : "icon-small@3x.png",
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "29x29"
    },
    {
      "filename" : "icon-40@2x.png",
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "40x40"
    },
    {
      "filename" : "icon-40@3x.png",
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "40x40"
    },
    {
      "filename" : "icon.png",
      "idiom" : "iphone",
      "scale" : "1x",
      "size" : "57x57"
    },
    {
      "filename" : "icon@2x.png",
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "57x57"
    },
    {
      "filename" : "icon-60@2x.png",
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "60x60"
    },
    {
      "filename" : "icon-60@3x.png",
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "60x60"
    },
    {
      "filename" : "notification-icon~ipad.png",
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "20x20"
    },
    {
      "filename" : "notification-icon~ipad@2x.png",
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "20x20"
    },
    {
      "filename" : "icon-small.png",
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "29x29"
    },
    {
      "filename" : "icon-small@2x.png",
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "29x29"
    },
    {
      "filename" : "icon-40.png",
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "40x40"
    },
    {
      "filename" : "icon-40@2x.png",
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "40x40"
    },
    {
      "filename" : "icon-small-50.png",
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "50x50"
    },
    {
      "filename" : "icon-small-50@2x.png",
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "50x50"
    },
    {
      "filename" : "icon-72.png",
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "72x72"
    },
    {
      "filename" : "icon-72@2x.png",
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "72x72"
    },
    {
      "filename" : "icon-76.png",
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "76x76"
    },
    {
      "filename" : "icon-76@2x.png",
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "76x76"
    },
    {
      "filename" : "icon-83.5@2x.png",
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "83.5x83.5"
    },
    {
      "filename" : "ios-marketing.png",
      "idiom" : "ios-marketing",
      "scale" : "1x",
      "size" : "1024x1024"
    }
  ],
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-40.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-72.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-76.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small-50.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/icon@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/ios-marketing.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png
BrokerDriver/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png
BrokerDriver/Assets.xcassets/Icon/maker_start.imageset/Contents.json
New file
@@ -0,0 +1,22 @@
{
  "images" : [
    {
      "idiom" : "universal",
      "scale" : "1x"
    },
    {
      "filename" : "maker_start@2x.png",
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "filename" : "maker_start@3x.png",
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
BrokerDriver/Assets.xcassets/Icon/maker_start.imageset/maker_start@2x.png
BrokerDriver/Assets.xcassets/Icon/maker_start.imageset/maker_start@3x.png
BrokerDriver/Assets.xcassets/Icon/marker_check.imageset/Contents.json
New file
@@ -0,0 +1,22 @@
{
  "images" : [
    {
      "idiom" : "universal",
      "scale" : "1x"
    },
    {
      "filename" : "marker_check@2x.png",
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "filename" : "marker_check@3x.png",
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
BrokerDriver/Assets.xcassets/Icon/marker_check.imageset/marker_check@2x.png
BrokerDriver/Assets.xcassets/Icon/marker_check.imageset/marker_check@3x.png
BrokerDriver/Assets.xcassets/Icon/marker_terminal.imageset/Contents.json
New file
@@ -0,0 +1,22 @@
{
  "images" : [
    {
      "idiom" : "universal",
      "scale" : "1x"
    },
    {
      "filename" : "marker_terminal@2x.png",
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "filename" : "marker_terminal@3x.png",
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
BrokerDriver/Assets.xcassets/Icon/marker_terminal.imageset/marker_terminal@2x.png
BrokerDriver/Assets.xcassets/Icon/marker_terminal.imageset/marker_terminal@3x.png
BrokerDriver/Assets.xcassets/Icon/marker_warehouse.imageset/Contents.json
New file
@@ -0,0 +1,22 @@
{
  "images" : [
    {
      "idiom" : "universal",
      "scale" : "1x"
    },
    {
      "filename" : "marker_warehouse@2x.png",
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "filename" : "marker_warehouse@3x.png",
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
BrokerDriver/Assets.xcassets/Icon/marker_warehouse.imageset/marker_warehouse@2x.png
BrokerDriver/Assets.xcassets/Icon/marker_warehouse.imageset/marker_warehouse@3x.png
BrokerDriver/Enums.swift
@@ -152,8 +152,8 @@
    var str:String{
        switch self {
            case .GetInTicket:return "GET IN TICKET"
            case .GetOutTicket:return "GET OUT TICKET"
            case .GetInTicket:return "GATE IN TICKET"
            case .GetOutTicket:return "GATE OUT TICKET"
            case .Pod:return "POD"
            case .Other:return "OTHER"
            case .none:return "--"
BrokerDriver/Exception/LocationTool.swift
New file
@@ -0,0 +1,268 @@
//
//  File.swift
//  BrokerDriver
//
//  Created by 无故事王国 on 2023/8/15.
//
import UIKit
import CoreLocation
import MapKit
public enum MapNavigationType {
    case BaiduMap //百度地图
    case Amap //高德地图
    case GoogleMap //谷歌地图
    case qqMap //qq地图
    static let allValues = [BaiduMap,Amap,GoogleMap,qqMap]
    public var raw:String{
        get{
            switch self {
                case .BaiduMap:
                    return "BaiduMaps"
                case .Amap:
                    return "AMaps"
                case .GoogleMap:
                    return "GoogleMaps"
                case .qqMap:
                    return "TencentMaps"
            }
        }
    }
    public var URL:String{
        get{
            switch self {
                case .BaiduMap:
                    return "baidumap://"
                case .Amap:
                    return "iosamap://"
                case .GoogleMap:
                    return "comgooglemaps://"
                case .qqMap:
                    return "qqmap://"
            }
        }
    }
}
/*
 配置:LSApplicationQueriesSchemes
 各种地图的 Scheme:
 百度地图:baidumap
 高德地图:iosamap
 谷歌地图:comgooglemaps
 腾讯地图:qqmap
 */
public class MapNavigationTool{
    static var manager:CLLocationManager?;
        //查询已安装的地图
    public static func mapList()->[MapNavigationType]{
        var canOpenMapUrl = [MapNavigationType]()
        for mapEnum in MapNavigationType.allValues{
            if UIApplication.shared.canOpenURL(URL(string: mapEnum.URL)!) {
                canOpenMapUrl.append(mapEnum)
            }
        }
        return canOpenMapUrl
    }
        /// 使用系统自带的弹框进行导航
        /// - Parameters:
        ///   - coor: 经纬度
        ///   - distanceName: 终点名称
        ///   - scheme: 回跳至APP所需scheme
    public static func startNav(_ coor:CLLocationCoordinate2D,distanceName:String,scheme:String){
        let alertVC = UIAlertController(title: "Navigation", message: "Please choose Nav", preferredStyle: .actionSheet)
        for mapItem in JQ_MapNavigationTool.mapList() {
            let alert = UIAlertAction(title: mapItem.raw, style: .default) { (_) in
                JQ_MapNavigationTool.plaformMap(mapItem, scheme: scheme, coor: coor, distanceName: distanceName)
            }
            alertVC.addAction(alert)
        }
        let appleMap = UIAlertAction(title: "AppleMaps", style: .default) { (_) in
            JQ_MapNavigationTool.navMap(coor, distanceName: distanceName)
        }
        alertVC.addAction(appleMap)
        alertVC.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
        JQ_currentViewController().present(alertVC, animated: true, completion: nil)
    }
        /// 原生地图导航
        /// - Parameters:
        ///   - coor: 经纬度
        ///   - distanceName: 终点名称
    public static func navMap(_ coor:CLLocationCoordinate2D,distanceName:String){
        let currentLoc = MKMapItem.forCurrentLocation()
        let distanceLoc = MKMapItem(placemark: MKPlacemark(coordinate: coor,addressDictionary: nil))
        distanceLoc.name = distanceName
        let launchOpt = [MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving,
                           MKLaunchOptionsShowsTrafficKey:true
        ] as [String : Any]
        MKMapItem.openMaps(with: [currentLoc,distanceLoc], launchOptions: launchOpt)
    }
    public static func plaformMap(_ type:JQ_MapNavigationType,scheme:String,coor:CLLocationCoordinate2D,distanceName:String){
        var url = ""
        switch type {
            case .BaiduMap:
                url = "baidumap://map/direction?origin={{My Location}}&destination=latlng:\(coor.latitude),\(coor.longitude)|name=\(distanceName)&mode=driving&coord_type=gcj02"
            case .Amap:
                url = "iosamap://navi?sourceApplication=Nav&backScheme=\(scheme)&lat=\(coor.latitude)&lon=\(coor.longitude)&dev=0&style=2"
            case .GoogleMap:
                url = "comgooglemaps://?x-source=Nav&x-success=\(scheme)&saddr=&daddr=\(coor.latitude),\(coor.longitude)&directionsmode=driving"
            case .qqMap:
                url = "qqmap://map/routeplan?from=My Location&type=drive&tocoord=\(coor.latitude),\(coor.longitude)&to=\(distanceName)&coord_type=1&policy=0"
        }
        UIApplication.shared.open(URL(string: url.jq_urlEncoded())!, options: [:]) { (status) in
            if !status{
                JQ_ShowError(errorStr: "navigation failed,please choose other one")
            }
        }
    }
}
public class JQ_LocationTool:NSObject,CLLocationManagerDelegate{
    public typealias JQLocationLocationClouse = (CLLocation)->Void
    public typealias JQLocationHeadingClouse = (CLHeading,Double)->Void
    public typealias JQLocationErrorClouse = (Error)->Void
    public var manager:CLLocationManager!
    private var currentType = 0
    public private(set) var currentLocation:CLLocation?
    public var locationClouse:JQLocationLocationClouse?
    public var headingClouse:JQLocationHeadingClouse?
    public var errorClouse:JQLocationErrorClouse?
    private static var _sharedInstance: JQ_LocationTool?
    public class func instance() -> JQ_LocationTool {
        guard let instance = _sharedInstance else {
            _sharedInstance = JQ_LocationTool()
            return _sharedInstance!
        }
        return instance
    }
    private override init() {
        super.init()
    }
    public func startLocation(_ locationClouse:@escaping JQLocationLocationClouse,errorClouse:@escaping JQLocationErrorClouse){
        manager = CLLocationManager()
        manager.desiredAccuracy = kCLLocationAccuracyBest
        manager.distanceFilter = 10
        manager.delegate = self
        currentType = 0
        self.locationClouse = locationClouse
        self.errorClouse = errorClouse
        var currentStatus:CLAuthorizationStatus
        if #available(iOS 14.0, *) {
            currentStatus = manager.authorizationStatus
        } else {
            currentStatus = CLLocationManager.authorizationStatus()
        }
        switch currentStatus {
            case .authorizedAlways,.authorizedWhenInUse:break
                    //                manager.startUpdatingLocation()
            case .restricted,.denied:
                JQ_AuthorizesTool.default.openURL(.location)
            case .notDetermined:
                manager.requestWhenInUseAuthorization()
            default:break
        }
    }
    public func geocoder(_ location:CLLocation,completeClouse:@escaping CLGeocodeCompletionHandler){
        CLGeocoder().reverseGeocodeLocation(location, completionHandler: completeClouse)
    }
    public func stopLocation(){
        manager.stopUpdatingLocation()
    }
    public func stopHeading(){
        manager.stopUpdatingHeading()
    }
    public func destroy(){
        JQ_LocationTool._sharedInstance = nil
    }
    public func startHeading(_ headingClouse:@escaping JQLocationHeadingClouse,errorClouse:@escaping JQLocationErrorClouse){
        currentType = 1
        self.headingClouse = headingClouse
        self.errorClouse = errorClouse
        var currentStatus:CLAuthorizationStatus
        if #available(iOS 14.0, *) {
            currentStatus = manager.authorizationStatus
        } else {
            currentStatus = CLLocationManager.authorizationStatus()
        }
        switch currentStatus {
            case .authorizedAlways,.authorizedWhenInUse:
                if CLLocationManager.headingAvailable() {
                    manager.startUpdatingHeading()
                }
            case .restricted,.denied:
                JQ_AuthorizesTool.default.openURL(.location)
            case .notDetermined:
                manager.requestWhenInUseAuthorization()
            default:break
        }
    }
    public func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
        currentLocation = nil
        errorClouse?(error)
    }
    public func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) {
        let angle = newHeading.magneticHeading/180.0*Double.pi
        headingClouse?(newHeading,angle)
    }
    public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
        var currentStatus:CLAuthorizationStatus
        if #available(iOS 14.0, *) {
            currentStatus = manager.authorizationStatus
        } else {
            currentStatus = CLLocationManager.authorizationStatus()
        }
        switch currentStatus {
            case .authorizedAlways,.authorizedWhenInUse:
                manager.startUpdatingLocation()
            case .restricted,.denied:
                JQ_AuthorizesTool.default.openURL(.location)
            case .notDetermined:
                manager.requestWhenInUseAuthorization()
            default:break
        }
    }
    public func locationManagerDidResumeLocationUpdates(_ manager: CLLocationManager) {
    }
    public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        if let location = locations.filter({$0.coordinate.latitude > 0 && $0.coordinate.longitude > 0}).last{
            currentLocation = location
            locationClouse?(location)
        }
    }
}
BrokerDriver/Home/VC/HomeDetailContentVC.swift
@@ -28,7 +28,7 @@
    private(set) var type:Int!
    private var model:OrderDetailModel?{
        didSet{
            if let m = model{
            if let m = model?.data{
                label_type.text = m.orderType
                label_id.text = m.orderId
                icon_id.image = m.status.transImage
@@ -37,60 +37,8 @@
                contentTableView.reloadData()
                cargoTableview.reloadData()
                view_btn.isHidden = true
                var startCoordinate:CLLocationCoordinate2D?
                var endCoordinate:CLLocationCoordinate2D?
                if m.lat != 0 && m.lon != 0 {
                    startCoordinate = CLLocationCoordinate2D(latitude: m.lat, longitude: m.lon)
                }
                if m.eLat != 0 && m.eLon != 0{
                    endCoordinate = CLLocationCoordinate2D(latitude: m.eLat, longitude: m.eLon)
                }
                let tuple = (startCoordinate,endCoordinate)
                NotificationCenter.default.post(name: UpdateMap_Noti, object: tuple)
                NotificationCenter.default.post(name: UpdateMap_Noti, object: model)
                view_btn.isHidden = m.button == 2
//                switch m.status.rawValue{
//                    case 2,3,4,5,12,14:type = 1
//                    case 6,7,8,15:type = 2
//                    case 9,10:type = 3
//                    case 11:type = 4
//                    default:break
//                }
//
//                switch type{
//                    case 1:
//                        switch m.status.rawValue{
//                            case 2,3,4,5,12,14:view_btn.isHidden = false
//                            default:view_btn.isHidden = true
//                        }
//                    case 2:
//                        switch m.status.rawValue{
//                            case 6,7,8,15:
//                                view_btn.isHidden = false
//                            default:view_btn.isHidden = true
//                        }
//                    case 3:
//                        switch m.status.rawValue{
//                            case 9,10:
//                                view_btn.isHidden = false
//                                if m.orderType != "Live Unload" && m.status.rawValue == 9{
//                                    view_btn.isHidden = true
//                                }
//                            default:view_btn.isHidden = true
//                        }
//                    case 4:
//                        switch m.status.rawValue{
//                            case 11:view_btn.isHidden = false
//                            default:view_btn.isHidden = true
//                        }
//                    default:view_btn.isHidden = true
//                }
            }
        }
    }
@@ -155,7 +103,7 @@
        //到达码头:提示上传
        //运输中:上传POD
        //运回码头:提示上传
        guard let m = model else { return }
        guard let m = model?.data else { return }
        if m.nextStatus == .ArrivedPort{
            CommonAlertView.show(title: "Prompt!", content: "You need to upload gate out ticket", bt1: "Not upload yet", bt2: "To upload") { [weak self] in
                AttachTypeView.show(orderId: m.orderId,recordEnum: .GetOutTicket) {
@@ -237,21 +185,21 @@
        if cargoTableview == tableView{
            return 1
        }
        return model?.list.count ?? 0
        return model?.data?.list.count ?? 0
    }
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        if cargoTableview == tableView{
            let cell = tableView.dequeueReusableCell(withIdentifier: "_CargoInfoTCell") as! CargoInfoTCell
            cell.l1.text = model?.tGoods?.containerNumber ?? ""
            cell.l2.text = "\(model?.tGoods?.weight ?? 0)"
            cell.l3.text = model?.tGoods?.size ?? ""
            cell.l4.text = String(format: "%@\n%@", model?.tGoods?.type ?? "" ,model?.tGoods?.typeClass ?? "")
            cell.l1.text = model?.data?.tGoods?.containerNumber ?? ""
            cell.l2.text = "\(model?.data?.tGoods?.weight ?? 0)"
            cell.l3.text = model?.data?.tGoods?.size ?? ""
            cell.l4.text = String(format: "%@\n%@", model?.data?.tGoods?.type ?? "" ,model?.data?.tGoods?.typeClass ?? "")
            return cell
        }
        let cell = tableView.dequeueReusableCell(withIdentifier: "_HomeDetailContentTCell") as! HomeDetailContentTCell
        if let dict = model?.list[indexPath.row]{
        if let dict = model?.data?.list[indexPath.row]{
            cell.dicts = dict
        }
BrokerDriver/Home/VC/HomeDetailMapVC.swift
@@ -18,14 +18,25 @@
    private lazy var mapView:GMSMapView = {
        let map = GMSMapView()
        map.frame = CGRect(x: 0, y: 0, width: JQ_ScreenW, height: JQ_ScreenW * 0.6)
        map.mapType = .normal
        map.settings.scrollGestures = false
        map.settings.zoomGestures = false
        map.accessibilityElementsHidden = false
        map.isBuildingsEnabled = false
        map.isMyLocationEnabled = false
        map.settings.scrollGestures = true
        map.settings.zoomGestures = true
        map.isBuildingsEnabled = true
        map.settings.compassButton = true
        map.settings.myLocationButton = false
        map.setMinZoom(15, maxZoom: 20)
        map.delegate = self
        return map
    }()
    private lazy var mananger:CLLocationManager = {
        let manan = CLLocationManager()
        manan.delegate = self
        manan.requestAlwaysAuthorization()
        manan.distanceFilter = 15
        manan.desiredAccuracy = kCLLocationAccuracyBestForNavigation
        return manan
    }()
    private lazy var destionMarker:GMSMarker = {
        let marker = GMSMarker()
@@ -34,12 +45,33 @@
        return marker
    }()
    private lazy var startMarker:GMSMarker = {
        let marker = GMSMarker()
        marker.title = "Start"
        marker.icon = UIImage(named: "maker_start")
        return marker
    }()
    private lazy var carMarker:GMSMarker = {
        let marker = GMSMarker()
        marker.title = "Car"
        marker.icon = UIImage(named: "marker_car")
        return marker
    }()
    private lazy var checkMarker:GMSMarker = {
        let marker = GMSMarker()
        marker.title = "Check"
        marker.icon = UIImage(named: "marker_check")
        return marker
    }()
    private lazy var yardMarker:GMSMarker = {
        let marker = GMSMarker()
        marker.title = "Warehouse"
        marker.icon = UIImage(named: "marker_warehouse")
        return marker
    }()
    private lazy var polyline:GMSPolyline = {
        let line = GMSPolyline()
@@ -56,8 +88,56 @@
    override func setRx() {
        NotificationCenter.default.rx.notification(UpdateMap_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in
            if let tuple = noti.object as? (CLLocationCoordinate2D?,CLLocationCoordinate2D?){
                self?.updateBounds(carCoordinate: tuple.0, terminalCoordinate: tuple.1)
            guard let weakSelf = self else { return }
            if let tuple = noti.object  as? OrderDetailModel{
                guard let start = tuple.lonlat.first else { return }
                guard let terminal = tuple.lonlat.last else { return }
                var wayPointes = [String]()
                weakSelf.startMarker.position = CLLocationCoordinate2D(latitude: 30.670682, longitude: 104.078942)
//                    weakSelf.startMarker.position = CLLocationCoordinate2D(latitude: start.lat, longitude: start.lat)
                    weakSelf.startMarker.map = weakSelf.mapView
                weakSelf.destionMarker.position = CLLocationCoordinate2D(latitude: 30.616992, longitude: 104.070893)
//                    weakSelf.destionMarker.position = CLLocationCoordinate2D(latitude: terminal.lat, longitude: terminal.lat)
                    weakSelf.destionMarker.map = weakSelf.mapView
                // 1 - 2:  2,3,5,12,13,14
                // 1- 3:   5,6
                // 3 - 4:  7,15
                //4 - 3:  9,10,11
                // 3 - 1:  11,18
                // index = 3 // 1:起点,2:检查站 ,3:场地,4:终点
//                if tuple.lonlat.count == 4{
//                    weakSelf.yardMarker.position = CLLocationCoordinate2D(latitude: tuple.lonlat[2].lat, longitude: tuple.lonlat[2].lon)
//                    weakSelf.yardMarker.map = weakSelf.mapView
//                    wayPointes.append(String(format: "%lf;%lf", weakSelf.yardMarker.position.latitude,weakSelf.yardMarker.position.longitude))
//
//                    weakSelf.checkMarker.position = CLLocationCoordinate2D(latitude: tuple.lonlat[1].lat, longitude: tuple.lonlat[1].lon)
//                    weakSelf.checkMarker.map = weakSelf.mapView
//                    wayPointes.append(String(format: "%lf;%lf", weakSelf.checkMarker.position.latitude,weakSelf.checkMarker.position.longitude))
//                }
//
//                if tuple.lonlat.count == 3{
//                    weakSelf.checkMarker.position = CLLocationCoordinate2D(latitude: tuple.lonlat[1].lat, longitude: tuple.lonlat[1].lon)
//                    weakSelf.checkMarker.map = weakSelf.mapView
//                    wayPointes.append(String(format: "%lf;%lf", weakSelf.checkMarker.position.latitude,weakSelf.checkMarker.position.longitude))
//                }
                GoogleServices.directionsLine(origin: .byCoordinates(weakSelf.startMarker.position), destination: .byCoordinates(weakSelf.destionMarker.position), waypoints: wayPointes.joined(separator: "|")).subscribe(onNext: {[weak self] data in
                    if let lg = data.routes.first?.legs.first{
                        self?.addPathInMap(leg: lg)
                    }
                }) { error in
                }.disposed(by: weakSelf.disposeBag)
                self?.mananger.startUpdatingLocation()
//                self?.updateBounds(carCoordinate: tuple.0, terminalCoordinate: tuple.1)
            }
        }).disposed(by: disposeBag)
    }
@@ -101,6 +181,7 @@
    func updateBounds(carCoordinate:CLLocationCoordinate2D?,terminalCoordinate:CLLocationCoordinate2D?){
        var centerCoordiante:CLLocationCoordinate2D?
        if carCoordinate != nil{
@@ -135,8 +216,62 @@
        polyline.map = mapView
    }
    private func addPathInMap(snaps:[SnappedPointModel]){
        let path = GMSMutablePath()
        for snap in snaps {
            if snap.location?.latitude != nil && snap.location?.longitude != nil{
                let coordinate = CLLocationCoordinate2D(latitude: snap.location!.latitude!, longitude: snap.location!.longitude!)
                path.add(coordinate)
            }
        }
        let polyline = GMSPolyline(path: path)
        polyline.strokeWidth = 6.0
        polyline.strokeColor = Def_ThemeColor
        polyline.geodesic = true
        polyline.map = mapView
        self.polyline = polyline
    }
    private func addPathInMap(leg:GoogleRoteRouteLegModel){
        let path = GMSMutablePath()
        for step in leg.steps{
            let startLocation = CLLocationCoordinate2D(latitude: step.start_location!.lat, longitude: step.start_location!.lng)
            let endLocation = CLLocationCoordinate2D(latitude: step.end_location!.lat, longitude: step.end_location!.lng)
            path.add(startLocation)
            path.add(endLocation)
        }
        let polyline = GMSPolyline(path: path)
        polyline.strokeWidth = 6.0
        polyline.strokeColor = Def_ThemeColor
        polyline.geodesic = true
        polyline.map = mapView
        self.polyline = polyline
    }
    @objc func troubleAction(){
        let vc = TroubleListVC(orderId: orderId)
        push(vc: vc)
    }
}
extension HomeDetailMapVC:GMSMapViewDelegate{
    func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {
        JQ_MapNavigationTool.startNav(marker.position, distanceName: marker.title ?? "None", scheme: "BrokerDriver")
        return true
    }
}
extension HomeDetailMapVC:CLLocationManagerDelegate{
    func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        if let location = locations.last{
            let marker = GMSMarker(position: location.coordinate)
            marker.icon = UIImage(named: "marker_car")
            marker.map = mapView
            mapView.animate(toLocation: location.coordinate)
        }
    }
}
BrokerDriver/Home/VC/HomeDetailMenuVC.swift
@@ -34,7 +34,7 @@
        pageMenu.unSelectedItemTitleFont = UIFont.systemFont(ofSize: 16, weight: .bold)
        view.addSubview(pageMenu)
        var funcView = UIView()
        let funcView = UIView()
        funcView.backgroundColor = .white
        view.addSubview(funcView)
        funcView.snp.makeConstraints { make in
BrokerDriver/Home/VC/HomeVC.swift
@@ -8,6 +8,7 @@
import UIKit
import FFPage
import SPPageMenu
import CoreLocation
class HomeVC: BaseViewController {
@@ -39,9 +40,19 @@
        return vc
    }()
    private lazy var manager:CLLocationManager = {
        let mana = CLLocationManager()
        mana.delegate = self
        mana.requestAlwaysAuthorization()
        mana.distanceFilter = 20
        mana.desiredAccuracy = 10
        return mana
    }()
    override func viewDidLoad() {
        super.viewDidLoad()
        manager.startUpdatingLocation()
    }
@@ -103,3 +114,17 @@
    }
}
extension HomeVC:CLLocationManagerDelegate{
    func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
    }
    func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        if let location = locations.last{
            Services.uploadLocation(coordinate: location.coordinate).subscribe(onNext: {data in
            }).disposed(by: disposeBag)
        }
    }
}
BrokerDriver/Info.plist
@@ -2,6 +2,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>SERVERURL</key>
    <string>$(SERVER_URL)</string>
    <key>UIAppFonts</key>
    <array>
        <string>Impact.ttf</string>
@@ -25,7 +27,9 @@
            </array>
        </dict>
    </dict>
    <key>SERVERURL</key>
    <string>$(SERVER_URL)</string>
    <key>UIBackgroundModes</key>
    <array>
        <string>location</string>
    </array>
</dict>
</plist>
BrokerDriver/Login/VC/LoginVC.swift
@@ -18,7 +18,7 @@
#if DEBUG
        tf_email.text = "1511311473@qq.com"
        tf_email.text = "testdriver@gmail.com"
        tf_pwd.text = "111111"
#endif
BrokerDriver/Network/NetworkRequest.swift
@@ -69,7 +69,7 @@
    }
    
    func append(key: String,value: String?) -> ParamsAppender {
//        if  value?.isEmpty ?? true ||  value == ""  { return self }
        if  value?.isEmpty ?? true ||  value == ""  { return self }
        params += ["\(key)":"\(value ?? "")"]
        return self
    }
@@ -109,7 +109,7 @@
    func done() -> Parameters {
        return self.params
    }
    class func build(url: String) -> ParamsAppender {
        return ParamsAppender(url: url)
    }
@@ -174,7 +174,7 @@
                newEncoding = method == .post ? URLEncoding.httpBody : URLEncoding.queryString
            }
            
            sharedSessionManager.request(params.url.absoluteString, method: method, parameters:params.done(), encoding: newEncoding, headers:headers).validate().responseData{response in
            sharedSessionManager.request(params.url.absoluteString, method: method, parameters:params.done(), encoding: newEncoding, headers:headers).validate().responseData{response in
                LogInfo("请求地址:\(params.url)")
                LogInfo("请求参数:\(params.params)")
                hud?.hide(animated: true)
@@ -209,7 +209,51 @@
            return Disposables.create{}
        }
    }
    class func requestMap<T: HandyJSON>(params: ParamsAppender, method: HTTPMethod,  encoding: ParameterEncoding? = nil, progress: Bool = true) -> Observable<T>{
        return Observable<T>.create{ ob in
            var hud: MBProgressHUD?
            if progress {
                hud = MBProgressHUD.showAdded(to: screnDelegate!.window!, animated: true)
                hud?.bezelView.style = .solidColor
                hud?.contentColor = .white
                hud?.bezelView.backgroundColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.8)
                hud?.bezelView.color = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.8)
                hud?.removeFromSuperViewOnHide = true
            }
            var newEncoding: ParameterEncoding
            if encoding != nil {
                newEncoding = encoding!
            } else {
                newEncoding = method == .post ? URLEncoding.httpBody : URLEncoding.queryString
            }
            sharedSessionManager.request(params.url.absoluteString, method: method, parameters:params.done(), encoding: newEncoding).validate().responseData{response in
                LogInfo("请求地址:\(params.url)")
                LogInfo("请求参数:\(params.params)")
                hud?.hide(animated: true)
                if response.error != nil {
                    LogError("\(response.error!)")
                    alert(msg: response.error!.localizedDescription)
                    ob.onError(response.error!)
                }else if let data = response.data,let jsonString = String(data: data, encoding: String.Encoding.utf8){
                    if let next = T.deserialize(from: jsonString){
                        LogInfo("返回数据:\(next.toJSON())")
                        ob.onNext(next)
                    }else{
                        alert(msg: "数据解析失败")
                        ob.onError(NetRequestError.Other)
                    }
                }else{
                    alert(msg: "解析失败")
                    ob.onError(NetRequestError.Other)
                }
                ob.onCompleted()
            }
            return Disposables.create{}
        }
    }
    class func requestData(params: ParamsAppender, method: HTTPMethod, encoding: ParameterEncoding? = nil, progress: Bool = true) -> Observable<Data>{
        return Observable<Data>.create{ ob in
            var hud: MBProgressHUD?
BrokerDriver/Network/Services.swift
@@ -11,12 +11,12 @@
import Alamofire
#if DEBUG
let All_Url = "http://192.168.110.22:8040"
let All_Url = "http://54.67.44.33:8040"
//let All_Url = "http://54.67.44.33:8040"
let Google_Url = "https://roads.googleapis.com/v1"
let Google_Url = "https://maps.googleapis.com/maps/api"
#else
let All_Url = "http://54.67.44.33:8040"
let Google_Url = "https://roads.googleapis.com/v1"
let Google_Url = "https://maps.googleapis.com/maps/api"
#endif
@@ -171,6 +171,16 @@
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
        /// 上传定位
    class func uploadLocation(coordinate:CLLocationCoordinate2D)->Observable<BaseResponse<SimpleModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/api/order/updateLonLat")
            .append(key: "driverId", value:UserViewModel.getUserInfo()!.id)
            .append(key: "lat", value: "\(coordinate.latitude)")
            .append(key: "lon", value: "\(coordinate.longitude)")
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
}
class GoogleServices:NSObject{
@@ -192,13 +202,14 @@
        }
    }
    class func directionsLine(origin:DirectionType,destination:DirectionType)->Observable<BaseResponse<GoogleRoteModel>>{
    class func directionsLine(origin:DirectionType,destination:DirectionType,waypoints:String)->Observable<GoogleRoteModel>{
        let params = ParamsAppender.build(url: Google_Url)
            .interface(url: "/directions/json")
            .append(key: "origin", value: origin.toFormat())
            .append(key: "destination", value: destination.toFormat())
            .append(key: "waypoints", value: waypoints)
            .append(key: "alternatives", value: false) //可供选择方案:会增加请求时间
        return NetworkRequest.request(params: params.googleMapDone(), method: .post, progress: false)
        return NetworkRequest.requestMap(params: params.googleMapDone(), method: .get, progress: false)
    }
BrokerDriver/SceneDelegate.swift
@@ -7,6 +7,7 @@
import UIKit
import GoogleMaps
import MJRefresh
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
@@ -30,6 +31,8 @@
        window?.overrideUserInterfaceStyle = .light
        window?.makeKeyAndVisible()
        MJRefreshConfig.default.languageCode = "en"
        setupGoogleAMap()
    }
BrokerDriver/Tools/AttachTypeView.swift
@@ -39,7 +39,9 @@
        if let recordEnum{
            pickerView.label_content.text = recordEnum.str
            pickerView.btn_type.isEnabled = false
        }
        }else{
            pickerView.recordEnum = RecordEnum(rawValue: 1)
        }
        pickerView.successClouse = successClouse
        pickerView.frame = screnDelegate?.window?.frame ?? .zero
        screnDelegate?.window?.addSubview(pickerView)
@@ -87,7 +89,11 @@
            guard let weakSelf = self else { return }
            Services.uploadFile(file: data).subscribe(onNext: {[weak self]  data in
                self?.uploadModel = data.data
                self?.imgV.jq_sdimage(url: data.data?.url ?? "")
                self?.imgV.sd_setImage(with:URL(string:  data.data?.url), placeholderImage: nil, options: .progressiveLoad, progress: { p1, p2, url in
                }, completed: { image, error, type, url in
                })
                self?.imgV.isHidden = false
            }) { error in
                alert(msg: error.localizedDescription)
BrokerDriver/Tools/AttachTypeView.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -169,7 +169,7 @@
                                    <rect key="frame" x="0.0" y="0.0" width="201.66666666666666" height="27"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                    <state key="normal" title="GET OUT TICKET">
                                    <state key="normal" title="GATE OUT TICKET">
                                        <color key="titleColor" red="0.16862745100000001" green="0.16862745100000001" blue="0.16862745100000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                    </state>
                                    <connections>
@@ -180,7 +180,7 @@
                                    <rect key="frame" x="0.0" y="27" width="201.66666666666666" height="27"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                    <state key="normal" title="GET IN TICKET">
                                    <state key="normal" title="GATE IN TICKET">
                                        <color key="titleColor" red="0.16862745100000001" green="0.16862745100000001" blue="0.16862745100000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                    </state>
                                    <connections>
BrokerDriver/Tools/PhotoPickerView.swift
@@ -87,7 +87,7 @@
extension PhotoPickerView:TZImagePickerControllerDelegate{
    public func imagePickerController(_ picker: TZImagePickerController!, didFinishPickingPhotos photos: [UIImage]!, sourceAssets assets: [Any]!, isSelectOriginalPhoto: Bool, infos: [[AnyHashable : Any]]!) {
        guard let pngData = photos.first?.pngData() else { return alert(msg: "invaild photo") }
        guard let pngData = photos.first?.jpegData(compressionQuality: 0.5) else { return alert(msg: "invaild photo") }
        clouse?(pngData)
        closeAction()
    }
@@ -97,7 +97,7 @@
    public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
        picker.dismiss(animated: true) { [weak self] in
            guard let originImage = info[UIImagePickerController.InfoKey.originalImage] as? UIImage,let pngData =  originImage.pngData() else { return alert(msg: "invaild photo") }
            guard let originImage = info[UIImagePickerController.InfoKey.originalImage] as? UIImage,let pngData =  originImage.jpegData(compressionQuality: 0.5) else { return alert(msg: "invaild photo") }
            self?.clouse?(pngData)
            self?.closeAction()
        }
BrokerDriver/ViewModels/OrderViewModel.swift
@@ -21,21 +21,33 @@
}
struct OrderDetailModel:HandyJSON {
    var containerNumber: String?
    var eLat: CLLocationDistance = 0
    var eLon: CLLocationDistance = 0
    var lat: CLLocationDistance = 0
    var list = [Dictionary<String,Any>]()
    var lon: CLLocationDistance = 0
    var orderId: String = ""
    var orderType: String = ""
    var status: OrderType = .None
    var nextStatus:OrderType = .None
    var tGoods: OrderDetailGoodsModel?
    var type: Int = 0
    var button:Int = 2
    var data:OrderDetailDataModel?
    var lonlat = [CoordinateModel]() // 1:起点,2:检查站 ,3:场地,4:终点
}
struct OrderDetailDataModel:HandyJSON {
    var containerNumber: String?
    var eLat: CLLocationDistance = 0
    var eLon: CLLocationDistance = 0
    var lat: CLLocationDistance = 0
    var list = [Dictionary<String,Any>]()
    var lon: CLLocationDistance = 0
    var orderId: String = ""
    var orderType: String = ""
    var status: OrderType = .None
    var nextStatus:OrderType = .None
    var tGoods: OrderDetailGoodsModel?
    var type: Int = 0
    var button:Int = 2
}
struct CoordinateModel:HandyJSON{
    var lon:Double = 0
    var lat:Double = 0
}
struct OrderDetailGoodsModel:HandyJSON {
    var billNumber: String = ""
    var containerNumber: String = ""