| | |
| | | let vc = TravelVC(orderType: .special) |
| | | vc.showCar = showCar |
| | | return vc |
| | | case "跨城出行","机场专线","景区直通车": |
| | | case "公务出行": |
| | | let vc = TravelVC.init(orderType: .business) |
| | | vc.showCar = showCar |
| | | vc.officialCharterClouse = { [weak self] in |
| | | let officialCharterVC = OfficialCharterVC() |
| | | officialCharterVC.view.frame = CGRect(x: 0, y: ScreenHeight, width: ScreenWidth, height: self?.view.height ?? 0) |
| | | self?.view.addSubview(officialCharterVC.view) |
| | | self?.addChild(officialCharterVC) |
| | | |
| | | UIView.animate(withDuration: 0.6) { |
| | | officialCharterVC.view.frame = CGRect(x: 0, y: 0, width: ScreenWidth, height: self?.view.height ?? 0) |
| | | } |
| | | } |
| | | return vc |
| | | case "机场专线","景区直通车": |
| | | var vc: TravelCityHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? TravelCityHomeVC |
| | | if vc == nil { |
| | | vc = TravelCityHomeVC() |
| | |
| | | } |
| | | vc.showCar = showCar |
| | | return vc |
| | | // case "同城小件物流": |
| | | // var vc: SmallLogisticsHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? SmallLogisticsHomeVC |
| | | // if vc == nil { |
| | | // vc = SmallLogisticsHomeVC() |
| | | // } |
| | | // vc.showCar = showCar |
| | | // vc.orderType.accept(.cityLogistics) |
| | | // return vc |
| | | // case "跨城小件物流": |
| | | // var vc: SmallLogisticsHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? SmallLogisticsHomeVC |
| | | // if vc == nil { |
| | | // vc = SmallLogisticsHomeVC() |
| | | // } |
| | | // vc.showCar = showCar |
| | | // vc.orderType.accept(.acrossLogistics) |
| | | // return vc |
| | | // case "包车": |
| | | // var vc: CharterHomeVC! = magicView.dequeueReusablePage(withIdentifier: String(describing: name)) as? CharterHomeVC |
| | | // if vc == nil { |
| | | // vc = CharterHomeVC() |
| | | // } |
| | | // return vc |
| | | // case "助老模式": |
| | | // var vc:CallByCarVC! = magicView.dequeueReusablePage(withIdentifier: String(name)) as? CallByCarVC |
| | | // if vc == nil{ |
| | | // vc = CallByCarVC() |
| | | // } |
| | | // return vc |
| | | default: |
| | | return UIViewController() |
| | | } |