Commit 39cc4635 authored by lujunye's avatar lujunye

返回当前定位

parent 875117e4
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
......@@ -26,14 +26,14 @@
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="delS" translatesAutoresizingMaskIntoConstraints="NO" id="pmc-vU-Uf4">
<rect key="frame" x="318" y="70.5" width="0.0" height="15"/>
<rect key="frame" x="318" y="71" width="0.0" height="15"/>
<constraints>
<constraint firstAttribute="width" id="HMa-Pi-Faw"/>
<constraint firstAttribute="height" constant="15" id="veV-Pg-H0Y"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zee-Po-sID">
<rect key="frame" x="90" y="15" width="213" height="126"/>
<rect key="frame" x="57" y="61.5" width="246" height="34.5"/>
<attributedString key="attributedText">
<fragment content="View.tishiLbl.text = &quot;&quot;View.tishiLbl.text = &quot;&quot;View.tishiLbl.text = &quot;&quot;">
<attributes>
......@@ -46,28 +46,23 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="标题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yit-1Y-dYH">
<rect key="frame" x="15" y="15" width="60" height="16"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="0Aj-nY-BpH"/>
</constraints>
<rect key="frame" x="15" y="70.5" width="27" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="pmc-vU-Uf4" firstAttribute="centerY" secondItem="zee-Po-sID" secondAttribute="centerY" id="0lk-di-OEG"/>
<constraint firstItem="zee-Po-sID" firstAttribute="leading" secondItem="yit-1Y-dYH" secondAttribute="trailing" constant="15" id="7BH-7f-jsc"/>
<constraint firstItem="yit-1Y-dYH" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="GFJ-Cd-oJ8"/>
<constraint firstAttribute="trailing" secondItem="FhC-zl-Pqx" secondAttribute="trailing" id="If6-Gs-gZd"/>
<constraint firstItem="pmc-vU-Uf4" firstAttribute="leading" secondItem="zee-Po-sID" secondAttribute="trailing" constant="15" id="JnM-Iz-OpH"/>
<constraint firstAttribute="bottom" secondItem="FhC-zl-Pqx" secondAttribute="bottom" id="LYe-vI-oas"/>
<constraint firstItem="yit-1Y-dYH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="PWu-Se-f3g"/>
<constraint firstItem="yit-1Y-dYH" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="OJc-GC-Jrq"/>
<constraint firstAttribute="trailing" secondItem="pmc-vU-Uf4" secondAttribute="trailing" constant="15" id="Qok-R2-hO0"/>
<constraint firstItem="zee-Po-sID" firstAttribute="top" secondItem="yit-1Y-dYH" secondAttribute="top" id="XtI-x2-NDG"/>
<constraint firstItem="pmc-vU-Uf4" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="VxE-7o-zqj"/>
<constraint firstItem="yit-1Y-dYH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="YOe-m8-0fd"/>
<constraint firstItem="pmc-vU-Uf4" firstAttribute="leading" secondItem="zee-Po-sID" secondAttribute="trailing" constant="15" id="ioZ-OU-UDz"/>
<constraint firstItem="zee-Po-sID" firstAttribute="centerY" secondItem="yit-1Y-dYH" secondAttribute="centerY" id="f9d-5w-jXw"/>
<constraint firstItem="FhC-zl-Pqx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="jug-3M-ccD"/>
<constraint firstItem="FhC-zl-Pqx" firstAttribute="top" secondItem="zee-Po-sID" secondAttribute="bottom" constant="15" id="lG2-t0-yF3"/>
<constraint firstItem="zee-Po-sID" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="yit-1Y-dYH" secondAttribute="trailing" constant="15" id="pbP-fH-zAa"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
......@@ -75,7 +70,6 @@
<outlet property="btmLine" destination="FhC-zl-Pqx" id="q0E-2a-h3I"/>
<outlet property="btmW" destination="HMa-Pi-Faw" id="htd-Lp-MF8"/>
<outlet property="contentLbl" destination="zee-Po-sID" id="GmM-kp-g5c"/>
<outlet property="contentRight" destination="ioZ-OU-UDz" id="Hsc-5Q-4ue"/>
<outlet property="imgRight" destination="Qok-R2-hO0" id="aeV-7Q-HFP"/>
<outlet property="nameLbl" destination="yit-1Y-dYH" id="S4K-8f-ncw"/>
</connections>
......
......@@ -62,7 +62,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
fileprivate func extractedFunc() {
HUD.flash(.progress)
cityCart(["user_token":UserToken as Any,"nonce_str":String.randomStr(len: 30) as Any,"city_id":city_id as Any], success: { (data) in
HUD.hide()
let model = data as! cityCartModel
self.carTypesArr.removeAll()
for item in model.data!.vehicle_arr! {
......@@ -75,6 +77,11 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
}
@IBAction func toDetailpage(_ sender: Any) {
print("明细跳转")
let vc = LogisticsCostDetailViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
func ToAndFormSelectViewControllerSelectAdr(dict: Dictionary<String, Any>, idx: Int) {
let adrModel = dict["adr"] as! cityListDataModel
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
......@@ -286,6 +286,9 @@
<state key="normal" title="明细">
<color key="titleColor" name="#E37847"/>
</state>
<connections>
<action selector="toDetailpage:" destination="-1" eventType="touchUpInside" id="UfY-Pz-6BE"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qOG-da-TxK" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="304" y="759" width="110" height="49"/>
......
......@@ -19,6 +19,23 @@ protocol ToAndFormSelectViewControllerDelegate {
func ToAndFormSelectViewControllerSelectAdr(dict:Dictionary<String,Any>,idx:Int)
}
class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLocationManagerDelegate, AMapSearchDelegate, UISearchBarDelegate, SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource,CityListViewControllerDelegate,HuoLaLaDiZhiCellDelegate{
var tempLat:CLLocationDegrees = 0
var tempLng:CLLocationDegrees = 0
var tempCityName = ""
@objc func backToCurrentLoc(_ sender: Any) {
print("返回当前位置")
cityName = tempCityName as NSString
lat = tempLat
lng = tempLng
mapView.centerCoordinate = CLLocationCoordinate2D(latitude: lat, longitude: lng)
searchList.isHidden = true
closeBtn.isHidden = true
listViewBG.isHidden = true
IQKeyboardManager.shared.resignFirstResponder()
}
func HuoLaLaDiZhiCellBtnClick(model: citySearchDataPoiChildrenModel,cityStr:String) {
citySelectBtn.setTitle(cityStr, for: .normal)
......@@ -262,6 +279,10 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
let location = locations.last
lat = location?.coordinate.latitude as! CLLocationDegrees
lng = location?.coordinate.longitude as! CLLocationDegrees
tempLat = lat
tempLng = lng
mapView.centerCoordinate = CLLocationCoordinate2DMake((lat),(lng))
}
......@@ -394,6 +415,10 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
titleLbl!.text = response.pois.first?.name
cityName = response.pois.first?.city as! NSString
if tempCityName == ""{
tempCityName = cityName as String
}
locName = response.pois.first?.name as! String
if loc == nil {
citySelectBtn.setTitle(cityName as String, for: .normal)
......@@ -607,12 +632,25 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
}
}
@IBOutlet weak var targetLbl: UILabel!
var historyArr:Array<getSearchLogListDataModel> = []
var backToCenterBtn:UIButton!
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
closeBtn.isHidden = false
listViewBG.isHidden = false
if backToCenterBtn == nil {
backToCenterBtn = UIButton()
listViewBG.addSubview(backToCenterBtn)
backToCenterBtn.addTarget(self, action: #selector(backToCurrentLoc(_:)), for: .touchUpInside)
backToCenterBtn.snp.makeConstraints { (make) in
make.centerY.equalTo(targetLbl.snp.centerY)
make.left.right.equalTo(0)
make.height.equalTo(40)
}
}
var type = 1
if idx != 0 {
type = 2
......
......@@ -23,6 +23,7 @@
<outlet property="searchList" destination="WO7-AX-Flw" id="11Q-2y-4IB"/>
<outlet property="selectListV" destination="FkD-95-sVW" id="wNv-R5-d7Z"/>
<outlet property="sureSelectLbl" destination="nZK-ad-fmq" id="5gq-Yd-d6B"/>
<outlet property="targetLbl" destination="whf-6g-CGo" id="509-PK-Yqo"/>
<outlet property="toFormTitleLbl" destination="kjg-a9-QU1" id="8Fc-oo-P93"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
......
......@@ -30,8 +30,8 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aC7-Bu-5oE">
<rect key="frame" x="167.5" y="21.5" width="33" height="18.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="加载中..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aC7-Bu-5oE">
<rect key="frame" x="167.5" y="21.5" width="51.5" height="18.5"/>
<constraints>
<constraint firstAttribute="height" constant="18.5" id="VaA-Ma-ZMN"/>
</constraints>
......@@ -48,8 +48,8 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yit-BG-pxY">
<rect key="frame" x="267.5" y="23" width="33" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="加载中..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yit-BG-pxY">
<rect key="frame" x="267.5" y="23" width="51.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
......@@ -63,8 +63,8 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Ee-iC-Maa">
<rect key="frame" x="57.5" y="23" width="33" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="加载中..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Ee-iC-Maa">
<rect key="frame" x="57.5" y="23" width="51.5" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment