Commit e91a4282 authored by lujunye's avatar lujunye

加载补转圈

parent b192caa5
......@@ -33,7 +33,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}else{
serviceSelect.remove(at: num!)
}
print(serviceSelect)
hListView.reloadData()
}
......@@ -73,14 +72,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
adrDs.append(dict)
}
let lat_lon_arr = dataChangeString(sender: adrDs)
// var std_tag_arr = ""
// if isSpecCar {
// std_tag_arr = "带尾板"
// }
let fD = adrArr.first!
let cityData = fD["adr"] as! cityListDataModel
let params = ["user_token":UserToken as Any,
......@@ -92,6 +84,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
"spec_req_arr":spec_select_arr as Any,
"lat_lon_arr":lat_lon_arr as Any
]
orderPriceCalculate(params, success: { (data) in
let model = data as! orderPriceCalculateModel
self.YuGuPriceLbl.text = "\(model.data!.total_price_fen!/100)"
......@@ -100,7 +93,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
view?.layoutIfNeeded()
self.hListView.reloadData()
return
}) { (err) in
......@@ -130,23 +122,16 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
if adrArr.count > 1 && dict!["locName"] as! String != "空" {
let firstDict = adrArr.first
let firstCity = firstDict!["adr"] as! cityListDataModel
let firstArr = (firstDict!["detailAdr"] as! NSString).components(separatedBy: "_")
let lastDict = adrArr.last
let lastArr = (firstDict!["detailAdr"] as! NSString).components(separatedBy: "_")
var addr_info_arr:Array<Any> = []
//
addr_info_arr.removeAll()
for i in 0 ..< adrArr.count {
let item = adrArr[i]
let itemModel = item["adr"] as! cityListDataModel
print("itemModel",itemModel.lat_lon?.lat,itemModel.lat_lon?.lon)
let itemData = (item["detailAdr"] as! NSString).components(separatedBy: "_")
let dict = ["name":(itemData.last)! as Any,
"addr":itemData[2] as Any,
"city_name":itemData.first as Any,
......@@ -160,23 +145,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
addr_info_arr.append(dict)
}
var s_consignee = ""
if (firstDict!["shouHuoRen"] as! String).count > 0 {
s_consignee = firstDict!["shouHuoRen"] as! String
}
var s_mobile = ""
if (firstDict!["phoneNum"] as! String).count > 0 {
s_mobile = firstDict!["shouHuoRen"] as! String
}
var r_mobile = ""
if (lastDict!["phoneNum"] as! String).count > 0 {
r_mobile = lastDict!["phoneNum"] as! String
}
var r_consignee = ""
if (lastDict!["shouHuoRen"] as! String).count > 0 {
r_consignee = lastDict!["shouHuoRen"] as! String
}
let total = YuGuPriceLbl.text! as NSString
var spec_select_arr_str = ""
if spec_select_arr.count > 0 {
......@@ -202,9 +170,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
"addr_info":dataChangeString(sender: addr_info_arr) as Any
]
return
shopsAuthList(dict1, success: { (data) in
let model = data as! shopsAuthListModel
HUD.flash(.success)
......@@ -318,20 +283,25 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
var carModel:cityCartDataModel?
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.carModel = model.data
self.carTypesArr.removeAll()
for item in model.data!.vehicle_arr! {
self.carTypesArr.append(item)
}
if self.carTypesArr.count == 0 {
HUD.flash(.label("暂无车型可供选择"), delay: 1.2)
return
}
let view = self.hListView.footerView(forSection: 0)
view?.layoutIfNeeded()
self.setBtnUI(carTypesArr: self.carTypesArr,view: self.topCarBtnSelectView)
self.hListView.reloadData()
HUD.hide()
}) { (err) in
}
......@@ -752,6 +722,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
if isAlready {
for item in adrDatas {
if item.name == selectLoc {
city_id = item.city_id!
......@@ -791,7 +762,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
HUD.flash(.progress)
cityList(["user_token":UserToken as Any,"nonce_str":String.randomStr(len: 30) as Any], success: { (data) in
let model = data as! cityListModel
HUD.hide()
self.adrDatas.removeAll()
for item in model.data! {
if item.name_en == self.selectLoc.localizedLowercase || item.name == self.selectLoc {
......@@ -804,7 +775,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc.locatStr = self.selectLoc
vc.delegate = self
self.navigationController?.pushViewController(vc, animated: true)
HUD.hide()
}) { (err) in
}
......@@ -818,9 +789,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
var manger:CLLocationManager = CLLocationManager()
var selectLoc = ""
lazy var geoCoder: CLGeocoder = {
......@@ -847,8 +815,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self.locBtn.sizeToFit()
self.view.addSubview(self.locBtn)
self.locBtn.snp_makeConstraints({ (make) in
make.right.equalTo(-15)
make.bottom.equalTo(self.navbar.snp_bottom).offset(-7)
......@@ -892,9 +858,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
override func viewDidLoad() {
super.viewDidLoad()
// locSelect()
checkLocation()
needsLocation()
......@@ -933,7 +897,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
appointmentTime(["user_token":UserToken as Any], success: { (data) in
let dataModel = data as! appointmentTimeModel
self.timeData = dataModel.data
HUD.hide()
if dataModel.data?.today == nil {
......@@ -959,6 +923,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self.pickup_time = rightText!
self.day = 0
}
HUD.hide()
}) { (error) in
HUD.flash(.label("获取期望上门时间失败"),delay: 1.2)
......@@ -1190,7 +1155,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
HUD.flash(.progress)
cityList(["user_token":UserToken as Any,"nonce_str":String.randomStr(len: 30) as Any], success: { (data) in
let model = data as! cityListModel
HUD.hide()
self.adrDatas.removeAll()
for item in model.data! {
if item.name_en == self.selectLoc.localizedLowercase || item.name == self.selectLoc {
......@@ -1202,10 +1167,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc.idx = 10086
vc.adrDatasArr = self.adrDatas
vc.delegate = self
// if self.loc != nil{
// vc.loc = self.loc
self.navigationController?.pushViewController(vc, animated: true)
// }
HUD.hide()
}) { (err) in
}
......@@ -1215,7 +1178,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc.adrDatasArr = adrDatas
vc.delegate = self
if adrDatas.count > 0 {
// vc.loc = loc
self.navigationController?.pushViewController(vc, animated: true)
}
}
......@@ -1356,7 +1318,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
HUD.flash(.progress)
cityList(["user_token":UserToken as Any,"nonce_str":String.randomStr(len: 30) as Any], success: { (data) in
let model = data as! cityListModel
HUD.hide()
self.adrDatas.removeAll()
for item in model.data! {
if item.name_en == self.selectLoc.localizedLowercase || item.name == self.selectLoc {
......@@ -1383,7 +1345,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
self.navigationController?.pushViewController(vc, animated: true)
HUD.hide()
}) { (err) in
}
......@@ -1445,6 +1407,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
//时间
if indexPath.row == 0 {
HUD.flash(.progress)
getHllTime(["user_token":UserToken as Any], success: { (data) in
let model = data as! getHllTimeModel
if self.bgBtn == nil {
......@@ -1476,8 +1439,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
for item in model.data! {
self.dayArr.append(item)
}
print(model.data?.count)
self.showTimeSelect(view: self.btmView!)
HUD.hide()
}) { (err) in
}
......@@ -1786,7 +1749,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
for item in view.subviews {
item.removeFromSuperview()
}
print("carCount = ",carTypesArr.count)
let scv = UIScrollView(frame: view.bounds)
view.addSubview(scv)
topBtnScv = scv
......@@ -1858,6 +1820,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let line = lineArr.first
line!.isHidden = false
}
}
//MARK: - 选择所有车型
......
......@@ -25,7 +25,7 @@ class LogisticsCostDetailViewController: BaseViewController {
self.view.addSubview(navbar)
priceLbl.text = "\(model!.data!.total_price_fen!/100)"
roadKM.text = "(总里程\(model!.data!.distance_total!)公里)"
roadKM.text = "(总里程\(Double(model!.data!.distance_total!)/1000.0)公里)"
SetTopFrameView(view: contentV, btmView: self.view)
......
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