younger_times
2023-05-06 a8c2422e12becdfc3da0907ff5b589f7f86d0dd5
完成功能
1个文件已添加
15个文件已修改
324 ■■■■ 已修改文件
BrokerDriver.xcodeproj/project.pbxproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Enums.swift 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Exception/UIButton+Exception.swift 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/TCell/HomeDetailContentTCell.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeDetailAttachVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeDetailContentVC.swift 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeDetailContentVC.xib 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomeDetailMapVC.swift 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Home/VC/HomePageVC.swift 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Login/VC/ForgotPwdVC.swift 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Login/VC/ForgotPwdVC.xib 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Network/Services.swift 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Profile/VC/PersonalCenterVC.swift 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Tools/AttachTypeView.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/Tools/CommonAlertView.xib 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver/ViewModels/OrderViewModel.swift 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BrokerDriver.xcodeproj/project.pbxproj
@@ -77,6 +77,7 @@
        13A0133D29FBB41000537A4F /* PhotoPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A0133C29FBB41000537A4F /* PhotoPickerView.swift */; };
        13A0133F29FBB41700537A4F /* PhotoPickerView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13A0133E29FBB41700537A4F /* PhotoPickerView.xib */; };
        13F47D422A05F5F900B8AB63 /* GoogleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13F47D412A05F5F900B8AB63 /* GoogleModel.swift */; };
        13F47D442A063DE900B8AB63 /* UIButton+Exception.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13F47D432A063DE900B8AB63 /* UIButton+Exception.swift */; };
        13F536B229F7D0DF00A7937A /* NoteContentTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13F536B029F7D0DF00A7937A /* NoteContentTCell.swift */; };
        13F536B329F7D0DF00A7937A /* NoteContentTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13F536B129F7D0DF00A7937A /* NoteContentTCell.xib */; };
        13F536B729F7D6CF00A7937A /* Services.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13F536B529F7D6CF00A7937A /* Services.swift */; };
@@ -166,6 +167,7 @@
        13A0133C29FBB41000537A4F /* PhotoPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoPickerView.swift; sourceTree = "<group>"; };
        13A0133E29FBB41700537A4F /* PhotoPickerView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhotoPickerView.xib; sourceTree = "<group>"; };
        13F47D412A05F5F900B8AB63 /* GoogleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoogleModel.swift; sourceTree = "<group>"; };
        13F47D432A063DE900B8AB63 /* UIButton+Exception.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+Exception.swift"; sourceTree = "<group>"; };
        13F536B029F7D0DF00A7937A /* NoteContentTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteContentTCell.swift; sourceTree = "<group>"; };
        13F536B129F7D0DF00A7937A /* NoteContentTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NoteContentTCell.xib; sourceTree = "<group>"; };
        13F536B529F7D6CF00A7937A /* Services.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Services.swift; sourceTree = "<group>"; };
@@ -288,6 +290,7 @@
            children = (
                138DA4D029F6305600A71FE7 /* Colors+Exception.swift */,
                1309ADFA29F7840500F5FA26 /* Currency+Exception.swift */,
                13F47D432A063DE900B8AB63 /* UIButton+Exception.swift */,
            );
            path = Exception;
            sourceTree = "<group>";
@@ -643,6 +646,7 @@
                13F536BB29F8CC0500A7937A /* UserModel.swift in Sources */,
                13F536B729F7D6CF00A7937A /* Services.swift in Sources */,
                13F536C429FA14A000A7937A /* Enums.swift in Sources */,
                13F47D442A063DE900B8AB63 /* UIButton+Exception.swift in Sources */,
                138DA4D629F6305600A71FE7 /* BaseViewController.swift in Sources */,
                1309AE0329F788D900F5FA26 /* PersonalDataVC.swift in Sources */,
                1309ADFB29F7840500F5FA26 /* Currency+Exception.swift in Sources */,
BrokerDriver/Enums.swift
@@ -45,6 +45,8 @@
    case InYardByEmpty = 11
        /// 取消订单
    case Cancel = 16
        /// 运回码头
    case BackYard = 18
        /// 转换
    var transStr:String{
@@ -66,6 +68,7 @@
            case .PendingPickupInCheckPoint:return "Checked(Pending pickup)"
            case .InWarehouse:return "In Warehouse"
            case .Cancel:return "Cancel"
            case .BackYard: return "Back yard"
            case .None:return "Invalid Staute"
        }
    }
@@ -105,6 +108,8 @@
                return UIImage(named: "E")
            case .InYardByEmpty:
                return UIImage(named: "E")
            case .BackYard:
                return UIImage(named: "E")
            case .Complete,.Cancel,.None,.Pending:
                return UIImage(named: "icon_id")
        }
BrokerDriver/Exception/UIButton+Exception.swift
New file
@@ -0,0 +1,33 @@
//
//  UIButton+Exception.swift
//  BrokerDriver
//
//  Created by 无故事王国 on 2023/5/6.
//
import Foundation
extension UIButton{
    public func openCountDown(_ t:Int = 59,defultTitle:String = "Obtain code"){
        var time = t //倒计时时间
        let queue = DispatchQueue.global()
        let timer = DispatchSource.makeTimerSource(flags: [], queue: queue)
        timer.schedule(wallDeadline: DispatchWallTime.now(), repeating: .seconds(1));
        timer.setEventHandler(handler: {
            if time <= 0 {
                timer.cancel()
                DispatchQueue.main.async(execute: {
                    self.setTitle(defultTitle, for: .normal)
                    self.isUserInteractionEnabled = true
                });
            }else {
                DispatchQueue.main.async(execute: {
                    self.setTitle("\(time)s", for: .normal)
                    self.isUserInteractionEnabled = false
                });
            }
            time -= 1
        });
        timer.resume()
    }
}
BrokerDriver/Home/TCell/HomeDetailContentTCell.swift
@@ -18,7 +18,7 @@
    var dicts = Dictionary<String,Any>(){
        didSet{
            view_VStack.removeArrangedSubviews()
            view_VStack.qmui_removeAllSubviews()
            let results = dicts.keys.sorted().filter({$0 != "1_title" && $0 != "2_address" && $0 != "7_danger" && $0 != "8_weight"})
            if let title = dicts["1_title"] as? String{
@@ -31,7 +31,7 @@
            for key in results {
                let v1 = createContentLabel(.left, text: key.components(separatedBy: "_").last!)
                let v2 = createContentLabel(.right, text: dicts[key] as! String)
                let v2 = createContentLabel(.right, text: "\(dicts[key] ?? "")")
                let hStackView = UIStackView(arrangedSubviews: [v1,v2], axis: .horizontal)
                view_VStack.addArrangedSubview(hStackView)
            }
BrokerDriver/Home/VC/HomeDetailAttachVC.swift
@@ -26,7 +26,7 @@
        var orderId = ""
        var file = ""
        var name = ""
        var categroy:RecordEnum = .none
        var category:RecordEnum = .none
    }
    
    required init(orderId:String) {
BrokerDriver/Home/VC/HomeDetailContentVC.swift
@@ -20,6 +20,7 @@
    @IBOutlet weak var contentTableHeiCons: NSLayoutConstraint!
    @IBOutlet weak var label_BLN: UILabel!
    @IBOutlet weak var label_status: UILabel!
    @IBOutlet weak var view_btn: UIView!
    var adapterViewController:FFAdapterViewController!
@@ -35,7 +36,22 @@
                label_status.text = m.nextStatus.transStr
                contentTableView.reloadData()
                cargoTableview.reloadData()
                view_btn.isHidden = m.status == .Complete
                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)
            }
        }
    }
@@ -65,13 +81,7 @@
//        footviewHeiCons.constant = UIDevice.jq_safeEdges.bottom + 44.0
        Services.orderInfo(id: orderId, type:style).subscribe(onNext: { [weak self] data in
            if let model = data.data{
                self?.model = model
            }
        }) { error in
        }.disposed(by: disposeBag)
        getData()
    }
    required init(orderId:String,style:HomePageVC.PageStyle) {
@@ -82,6 +92,16 @@
    override func setRx() {
    }
    private func getData(){
        Services.orderInfo(id: orderId, type:style).subscribe(onNext: { [weak self] data in
            if let model = data.data{
                self?.model = model
            }
        }) { error in
        }.disposed(by: disposeBag)
    }
@@ -96,10 +116,43 @@
        //到达码头:提示上传
        //运输中:上传POD
        //运回码头:提示上传
        print("---->")
        guard let m = model 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) {
                    self?.changeStatus(orderId: m.orderId)
                }
            }
        } else if m.nextStatus == .Transiting{
            CommonAlertView.show(title: "Prompt!", content: "You need to upload POD", bt1: "Not upload yet", bt2: "To upload") { [weak self] in
                AttachTypeView.show(orderId: m.orderId) {
                    self?.changeStatus(orderId: m.orderId)
                }
            }
        }else if m.nextStatus == .BackYard{
            CommonAlertView.show(title: "Prompt!", content: "You need to upload gate in ticket", bt1: "Not upload yet", bt2: "To upload") { [weak self] in
                AttachTypeView.show(orderId: m.orderId) {
                    self?.changeStatus(orderId: m.orderId)
                }
            }
        }else{
            changeStatus(orderId: orderId)
        }
    }
    private func changeStatus(orderId:String){
        Services.nextStatus(id: orderId).subscribe(onNext: { data in
            if  data.code == 200{
                self.getData()
                    //Update Home data status.
                NotificationCenter.default.post(name: RefreshHomePage_Noti, object: true)
            }else{
                alert(msg: data.msg)
            }
        }) { error in
            alert(msg: error.localizedDescription)
        }.disposed(by: disposeBag)
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
BrokerDriver/Home/VC/HomeDetailContentVC.xib
@@ -22,6 +22,7 @@
                <outlet property="label_type" destination="5Xf-g6-HxA" id="pwC-nh-cre"/>
                <outlet property="scrollView" destination="RZZ-lC-T7W" id="Arq-58-WYM"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_btn" destination="ZL1-Nv-BlK" id="BuF-BT-Uh3"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -187,7 +188,7 @@
                        <constraint firstItem="aoZ-mE-xqn" firstAttribute="top" secondItem="Sh7-2N-mvt" secondAttribute="bottom" id="wDA-wF-QYZ"/>
                    </constraints>
                </scrollView>
                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZL1-Nv-BlK" customClass="TapButton" customModule="BrokerDriver" customModuleProvider="target">
                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZL1-Nv-BlK">
                    <rect key="frame" x="0.0" y="774" width="393" height="44"/>
                    <subviews>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="42Z-5A-7T8">
BrokerDriver/Home/VC/HomeDetailMapVC.swift
@@ -8,6 +8,9 @@
import UIKit
import GoogleMaps
let UpdateMap_Noti = Notification.Name.init("UpdateMap_Noti")
class HomeDetailMapVC: BaseViewController {
    private var troubleBtn:UIButton!
@@ -51,6 +54,14 @@
    }
    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)
            }
        }).disposed(by: disposeBag)
    }
    required init(orderId:String) {
        super.init(nibName: nil, bundle: nil)
        self.orderId = orderId
@@ -63,7 +74,6 @@
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        view.addSubview(mapView)
        updateBounds(carCoordinate: CLLocationCoordinate2D(latitude: 30.572961, longitude: 104.166301), terminalCoordinate: CLLocationCoordinate2D(latitude: 30.572995, longitude: 104.066315))
    }
@@ -89,17 +99,30 @@
        }
    }
    func updateBounds(carCoordinate:CLLocationCoordinate2D,terminalCoordinate:CLLocationCoordinate2D){
        destionMarker.position = terminalCoordinate
        carMarker.position = carCoordinate
        destionMarker.map = mapView
        carMarker.map = mapView
    func updateBounds(carCoordinate:CLLocationCoordinate2D?,terminalCoordinate:CLLocationCoordinate2D?){
        let bounds = GMSCoordinateBounds(coordinate: carCoordinate, coordinate: terminalCoordinate)
        var centerCoordiante:CLLocationCoordinate2D?
        if carCoordinate != nil{
            carMarker.position = carCoordinate!
            carMarker.map = mapView
            centerCoordiante = carCoordinate
        }
        if terminalCoordinate != nil{
            destionMarker.position = terminalCoordinate!
            destionMarker.map = mapView
            centerCoordiante = terminalCoordinate
        }
        if carCoordinate != nil && terminalCoordinate != nil{
            let bounds = GMSCoordinateBounds(coordinate: carCoordinate!, coordinate: terminalCoordinate!)
        let update = GMSCameraUpdate.fit(bounds, with: UIEdgeInsets(top: 30, left: 30, bottom: 30, right: 30))
        mapView.moveCamera(update)
        updatePath(start: carCoordinate, terminal: terminalCoordinate)
            updatePath(start: carCoordinate!, terminal: terminalCoordinate!)
        }else if centerCoordiante != nil{
            mapView.animate(toLocation: centerCoordiante!)
        }
    }
    private func updatePath(start:CLLocationCoordinate2D,terminal:CLLocationCoordinate2D){
@@ -110,18 +133,6 @@
        polyline.path = path
        polyline.map = mapView
//        let span = GMSStyleSpan(style: .gradient(from: UIColor(hexStr: "#FED703"), to: .red))
//        polyline.spans = [span]
//        GoogleServices.directionsLine(origin: GoogleServices.DirectionType.byCoordinates(start), destination: GoogleServices.DirectionType.byCoordinates(terminal)).subscribe(onNext: {data in
//
//
//        }) { error in
//
//        }.disposed(by: disposeBag)
    }
    @objc func troubleAction(){
BrokerDriver/Home/VC/HomePageVC.swift
@@ -10,6 +10,8 @@
import RxRelay
import FFPage
let RefreshHomePage_Noti = Notification.Name(rawValue: "RefreshHomePage_Noti")
class HomePageVC: BaseViewController,Refreshable {
    enum PageStyle:Int{
@@ -26,6 +28,7 @@
    private var containerNo:String?
    private var date:String?
    var adapterViewController:FFAdapterViewController!
    private var needRefresh:Bool = false // Refresh data when didLoad
    lazy private var tableView:BaseTableView = {
        let tableView = BaseTableView(frame: .zero, style: .plain)
@@ -44,6 +47,13 @@
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        if needRefresh{
            self.refreshStatus.onNext(.beingHeaderRefresh)
        }
    }
    override func viewDidLoad() {
@@ -66,6 +76,14 @@
        }
    }
    override func setRx() {
        NotificationCenter.default.rx.notification(RefreshHomePage_Noti).take(until: self.rx.deallocated).subscribe(onNext: { noti in
            if let status = noti.object as? Bool{
                self.needRefresh = status
            }
        }).disposed(by: disposeBag)
    }
    private func getData(_ isHeader:Bool = true){
        if isHeader{
@@ -73,7 +91,7 @@
        }else{
            page += 1
        }
        needRefresh = false
        Services.getList(type: style, pageNumber: page,containerNo: containerNo,date: date).subscribe(onNext: { data in
            if let models = data.data{
                if isHeader{
BrokerDriver/Login/VC/ForgotPwdVC.swift
@@ -6,23 +6,78 @@
//
import UIKit
import QMUIKit
class ForgotPwdVC: BaseViewController {
    @IBOutlet weak var tf_email: QMUITextField!
    @IBOutlet weak var tf_code: QMUITextField!
    @IBOutlet weak var tf_pwd: QMUITextField!
    @IBOutlet weak var tf_apwd: QMUITextField!
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    /*
    // MARK: - Navigation
    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    private func check(getCode:Bool = false)->Bool{
        guard !tf_email.isEmpty else {
            alert(msg: "Please input email");return false
    }
    */
        guard tf_email.text!.jq_isEmail else {
            alert(msg: "Invaild email");return false
        }
        if getCode{return true}
        guard !tf_code.isEmpty else {
            alert(msg: "Please input code");return false
        }
        guard !tf_pwd.isEmpty else {
            alert(msg: "Please input password");return false
        }
        guard !tf_apwd.isEmpty else {
            alert(msg: "Please input password again");return false
        }
        guard tf_apwd.text != tf_pwd.text else {
            alert(msg: "Entered passwords differ");return false
        }
        return true
    }
    @IBAction func getCodeAction(_ sender: UIButton) {
        if check(getCode:true){
            Services.sendCode(email: tf_email.text!).subscribe(onNext: { data in
                if data.code == 200{
                    sender.openCountDown()
                }else{
                    alert(msg: data.msg)
                }
            }) { error in
                alert(msg: error.localizedDescription)
            }.disposed(by: disposeBag)
        }
    }
    @IBAction func submitAction(_ sender: UIButton) {
        if check(){
            Services.forget(code: tf_code.text!, password: tf_pwd.text!, username: tf_email.text!).subscribe(onNext: {data in
                if data.code == 200{
                    alert(msg: "Update successed!")
                    DispatchQueue.main.asyncAfter(deadline: .now()+1) {
                        self.navigationController?.popViewController()
                    }
                }else{
                    alert(msg: data.msg)
                }
            }) { error in
                alert(msg: error.localizedDescription)
            }.disposed(by: disposeBag)
        }
    }
}
BrokerDriver/Login/VC/ForgotPwdVC.xib
@@ -12,6 +12,10 @@
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ForgotPwdVC" customModule="BrokerDriver" customModuleProvider="target">
            <connections>
                <outlet property="tf_apwd" destination="bgL-fq-zvQ" id="QpV-EH-khd"/>
                <outlet property="tf_code" destination="fg6-Qi-snT" id="Tt5-Sc-WcW"/>
                <outlet property="tf_email" destination="IEb-4W-7L7" id="y3o-zO-5N6"/>
                <outlet property="tf_pwd" destination="0q9-av-whH" id="NrY-FS-cYy"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
            </connections>
        </placeholder>
@@ -84,6 +88,9 @@
                                    <state key="normal" title="Obtain code">
                                        <color key="titleColor" red="0.98431372549019602" green="0.73725490196078436" blue="0.047058823529411764" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                    </state>
                                    <connections>
                                        <action selector="getCodeAction:" destination="-1" eventType="touchUpInside" id="65K-BO-eZ6"/>
                                    </connections>
                                </button>
                            </subviews>
                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
@@ -177,6 +184,9 @@
                            <real key="value" value="22"/>
                        </userDefinedRuntimeAttribute>
                    </userDefinedRuntimeAttributes>
                    <connections>
                        <action selector="submitAction:" destination="-1" eventType="touchUpInside" id="ZRE-2c-esp"/>
                    </connections>
                </button>
            </subviews>
            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
@@ -196,7 +206,7 @@
    </objects>
    <resources>
        <namedColor name="ThemeColor">
            <color red="0.99215686274509807" green="0.82745098039215681" blue="0.015686274509803921" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
            <color red="0.99199998378753662" green="0.82700002193450928" blue="0.016000000759959221" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
BrokerDriver/Network/Services.swift
@@ -147,13 +147,29 @@
        return NetworkRequest.request(params: params, method: .get, progress: false)
    }
    class func nextStatus(id:Int)->Observable<BaseResponse<SimpleModel>>{
    class func nextStatus(id:String)->Observable<BaseResponse<SimpleModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/api/index/nextStatus")
            .append(key: "id", value: id)
        return NetworkRequest.request(params: params, method: .get, progress: true)
    }
    class func sendCode(email:String)->Observable<BaseResponse<SimpleModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/gunsApi/sendCode")
            .append(key: "email", value: email)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
    class func forget(code:String,password:String,username:String)->Observable<BaseResponse<SimpleModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/gunsApi/forget")
            .append(key: "code", value: code)
            .append(key: "password", value: password)
            .append(key: "username", value: username)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
}
class GoogleServices:NSObject{
BrokerDriver/Profile/VC/PersonalCenterVC.swift
@@ -42,12 +42,10 @@
    }
    @IBAction func logOutAction(_ sender: UIButton) {
        showAlert(title: "Would you like to log out?", message: nil, buttonTitles: ["YES","NO"], highlightedButtonIndex: 0) { index in
            if index == 0{
        CommonAlertView.show(title: "Prompt!", content: "Would you like to log out?", bt1: "No just yet", bt2: "Logout") {
                let nav = BaseNavigationController(rootViewController: LoginVC())
                UserViewModel.clearUserInfo()
                screnDelegate?.window?.rootViewController = nav
            }
        }
    }
}
BrokerDriver/Tools/AttachTypeView.swift
@@ -58,7 +58,7 @@
    @IBAction func submitAction(_ sender: UIButton) {
        guard uploadModel != nil else {alert(msg: "Please upload image");return}
        let model = HomeDetailAttachVC.AttachmentType(orderId: orderId, file: uploadModel!.url, name: uploadModel!.deleteUrl, categroy: recordEnum)
        let model = HomeDetailAttachVC.AttachmentType(orderId: orderId, file: uploadModel!.url, name: uploadModel!.deleteUrl, category: recordEnum)
        Services.addOrderAttachment(model: model).subscribe(onNext: { data in
            if data.code == 200{
                alert(msg: "Upload successed")
BrokerDriver/Tools/CommonAlertView.xib
@@ -36,8 +36,8 @@
                            <nil key="textColor"/>
                            <nil key="highlightedColor"/>
                        </label>
                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hMJ-QZ-T7l">
                            <rect key="frame" x="33" y="89" width="250" height="19.333333333333329"/>
                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hMJ-QZ-T7l">
                            <rect key="frame" x="15" y="89" width="287" height="19.333333333333329"/>
                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="0.55000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
                            <nil key="highlightedColor"/>
@@ -99,9 +99,9 @@
                        <constraint firstItem="RKt-Eh-MbE" firstAttribute="centerX" secondItem="nQ4-TJ-E8O" secondAttribute="centerX" id="76j-8q-Jm6"/>
                        <constraint firstAttribute="trailing" secondItem="ui3-nY-QhB" secondAttribute="trailing" constant="10" id="CyU-gA-1lv"/>
                        <constraint firstItem="ZrZ-uP-15H" firstAttribute="top" secondItem="hMJ-QZ-T7l" secondAttribute="bottom" constant="40" id="FT3-od-qfo"/>
                        <constraint firstItem="hMJ-QZ-T7l" firstAttribute="leading" secondItem="nQ4-TJ-E8O" secondAttribute="leading" constant="33" id="Ivj-vx-dlx"/>
                        <constraint firstItem="hMJ-QZ-T7l" firstAttribute="leading" secondItem="nQ4-TJ-E8O" secondAttribute="leading" constant="15" id="Ivj-vx-dlx"/>
                        <constraint firstItem="RKt-Eh-MbE" firstAttribute="top" secondItem="nQ4-TJ-E8O" secondAttribute="top" constant="39" id="LRl-DK-Fpa"/>
                        <constraint firstAttribute="trailing" secondItem="hMJ-QZ-T7l" secondAttribute="trailing" constant="34" id="SH6-jE-kji"/>
                        <constraint firstAttribute="trailing" secondItem="hMJ-QZ-T7l" secondAttribute="trailing" constant="15" id="SH6-jE-kji"/>
                        <constraint firstItem="hMJ-QZ-T7l" firstAttribute="top" secondItem="RKt-Eh-MbE" secondAttribute="bottom" constant="25" id="mV3-XK-aBH"/>
                        <constraint firstItem="ZrZ-uP-15H" firstAttribute="centerX" secondItem="nQ4-TJ-E8O" secondAttribute="centerX" id="nvP-Qg-oVU"/>
                        <constraint firstAttribute="bottom" secondItem="ZrZ-uP-15H" secondAttribute="bottom" constant="21" id="wuB-hC-BYA"/>
@@ -131,7 +131,7 @@
        </view>
    </objects>
    <resources>
        <image name="btn_close" width="14" height="14"/>
        <image name="btn_close" width="21.333333969116211" height="21.333333969116211"/>
        <namedColor name="ThemeColor">
            <color red="0.99199998378753662" green="0.82700002193450928" blue="0.016000000759959221" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
BrokerDriver/ViewModels/OrderViewModel.swift
@@ -22,11 +22,11 @@
struct OrderDetailModel:HandyJSON {
    var containerNumber: String?
    var eLat: String = ""
    var eLon: String = ""
    var lat: String = ""
    var eLat: CLLocationDistance = 0
    var eLon: CLLocationDistance = 0
    var lat: CLLocationDistance = 0
    var list = [Dictionary<String,Any>]()
    var lon: String = ""
    var lon: CLLocationDistance = 0
    var orderId: String = ""
    var orderType: String = ""
    var status: OrderType = .None