Commit 0b0bfa35 authored by lujunye's avatar lujunye

阿斯顿发送到发斯蒂芬

parent d0a801d1
...@@ -61,12 +61,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -61,12 +61,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
case 2://未设置支付密码 case 2://未设置支付密码
HUD.flash(.label("请设置支付密码"), delay: 1.2) HUD.flash(.label("请设置支付密码"), delay: 1.2)
break break
// case 3://资金不足额 case 3://资金不足额
// HUD.flash(.label("资金余额不足"), delay: 1.2) HUD.flash(.label("资金余额不足"), delay: 1.2)
// break break
case 3,4://资金足额 case 4://资金足额
var tempArr:Array<addPinPinOrder_adrInfo> = [] var tempArr:Array<addPinPinOrder_adrInfo> = []
pph_send_arr.forEach { (item) in pph_send_arr.forEach { (item) in
tempArr.append(item) tempArr.append(item)
...@@ -95,16 +93,16 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -95,16 +93,16 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
infos.append(info) infos.append(info)
} }
let infosData = dataChangeString(sender: infos) let infosData = dataChangeString(sender: infos)
// if pph_time.count == 0 { if timeStamp == -1 {
// HUD.flash(.label("请选择用车时间"), delay: 1.2) HUD.flash(.label("请选择用车时间"), delay: 1.2)
// return return
// } }
let dict = ["user_token":UserToken as Any, let dict = ["user_token":UserToken as Any,
"uid":pphCarTypesArr[pph_selectCarType].id as Any, "uid":pphCarTypesArr[pph_selectCarType].id as Any,
"price":totalPrice as Any, "price":totalPrice as Any,
"orderType":1 as Any, "orderType":1 as Any,
"startDate":"" as Any, "startDate":timeStamp as Any,
"demo":"" as Any, "demo":"" as Any,
"typeid":pphCarTypesArr[pph_selectCarType].type as Any, "typeid":pphCarTypesArr[pph_selectCarType].type as Any,
"tailplate":0 as Any, "tailplate":0 as Any,
......
...@@ -213,8 +213,11 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -213,8 +213,11 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
// } // }
@objc func submitAction(){ @objc func submitAction(){
if adrStr != nil { if idx != nil {
delegate?.SJMapViewControllerSelectArd(adr: adrStr!,cityData: cityData!,loc: "\(lat)-\(lng)")
let cell = listView?.cellForRow(at: idx!) as! SJMapCell
delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cell.cityData, loc: "\(cell.lat!)-\(cell.lng!)")
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
}else{ }else{
HUD.flash(.label("请选择地址"), delay: 1.2) HUD.flash(.label("请选择地址"), delay: 1.2)
...@@ -327,9 +330,8 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -327,9 +330,8 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
let cell = tableView.cellForRow(at: idx!) as! SJMapCell let cell = tableView.cellForRow(at: idx!) as! SJMapCell
mapView.setCenter(CLLocationCoordinate2D(latitude:CLLocationDegrees(cell.lat!), longitude: CLLocationDegrees(cell.lng!)), animated: false) mapView.setCenter(CLLocationCoordinate2D(latitude:CLLocationDegrees(cell.lat!), longitude: CLLocationDegrees(cell.lng!)), animated: false)
adrStr = cell.nameLbl.text adrStr = cell.nameLbl.text
print("abc == ",cell.lat,cell.lng) delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cell.cityData, loc: "\(cell.lat!)-\(cell.lng!)")
delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cityData!, loc: "\(cell.lat!)-\(cell.lng!)")
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
return return
...@@ -340,7 +342,7 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -340,7 +342,7 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
listView?.reloadData() listView?.reloadData()
adrStr = cell.nameLbl.text adrStr = cell.nameLbl.text
if isSearchMode { if isSearchMode {
delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cityData!, loc: "\(cell.lat!)-\(cell.lng!)") delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cell.cityData, loc: "\(cell.lat!)-\(cell.lng!)")
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
} }
......
...@@ -39,11 +39,10 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView ...@@ -39,11 +39,10 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
func SJMapViewControllerSelectArd(adr:String,cityData:String,loc:String) { func SJMapViewControllerSelectArd(adr:String,cityData:String,loc:String) {
city_lbl.text = cityData city_lbl.text = cityData
let ar = loc.components(separatedBy: "-") let ar = loc.components(separatedBy: "-")
print("pass_loc = ",loc) print("pass_loc = ",loc,cityData)
self.lng = (ar.last! as NSString).doubleValue self.lng = (ar.last! as NSString).doubleValue
self.lat = (ar.first! as NSString).doubleValue self.lat = (ar.first! as NSString).doubleValue
print("location == ",self.lng,self.lat)
let arr = cityData.components(separatedBy: "-") let arr = cityData.components(separatedBy: "-")
for i in 0 ..< addressArray.count { for i in 0 ..< addressArray.count {
let provinceData = addressArray[i] as! Dictionary<String,Any> let provinceData = addressArray[i] as! Dictionary<String,Any>
......
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