Commit 1af9ea33 authored by lujunye's avatar lujunye

sad健腹轮;阿斯加德了;讲法;晾水

parent fef0a621
......@@ -95,7 +95,7 @@ func orderDetails(_ params:[String:Any],success:@escaping (_ res:Any)->(),failtu
user_token 验证token
*/
func rechargeOperation(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("充值操作界面信息查询", params, { (rep:DataResponse<rechargeOperationData_model>) in
NetworkRequest.sharedInstance.postRequest("充值操作界面信息查询", params, { (rep:DataResponse<rechargeOperation_model>) in
}, success: { (data) in
success(data)
}) { (error) in
......
......@@ -73,7 +73,7 @@ class stateJudgeData_model: Mappable {
}
}
//MARK: - 充值操作界面信息查询
class orechargeOperation_model: Mappable {
class rechargeOperation_model: Mappable {
var code:Int?
var message : String?
var data :rechargeOperationData_model?
......
......@@ -44,7 +44,7 @@
<action selector="eidtAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="5St-2L-LDo"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bnV-l5-VU7">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="bnV-l5-VU7">
<rect key="frame" x="58" y="0.0" width="197" height="43"/>
<color key="textColor" name="标题字颜色"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
......
......@@ -15,7 +15,53 @@ import SDWebImage
import IQKeyboardManagerSwift
class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,JiTuoWuXinXiViewDelegate,JiPaiFangShiViewControllerDelegate,ZengZhiServicesViewControllerDelegate,AdressSelectCellDelegate,DZGLViewControllerDelegate,XinZengDiZhiViewControllerDelegate,TitleAndTFBtnCellDelegate,WenDuCellDelegate,LogisticalSelectViewDelegate, UIPickerViewDataSource, UIPickerViewDelegate, GLAlertSelectViewDelegate,CLLocationManagerDelegate, CityListViewControllerDelegate,ToAndFormSelectViewControllerDelegate,WayBillAddressCanDelItemCellDelegate,HLLTopCellDelegate,OtherDemandViewControllerDelegate,OnlyViewCellDelegate, XiaDanUserInfoViewControllerDelegate, P_P_H_Time_Select_View_Delegate,P_P_H_Adr_VC_Delegate, Suc_LOG_Cell_Delegate{
class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,JiTuoWuXinXiViewDelegate,JiPaiFangShiViewControllerDelegate,ZengZhiServicesViewControllerDelegate,AdressSelectCellDelegate,DZGLViewControllerDelegate,XinZengDiZhiViewControllerDelegate,TitleAndTFBtnCellDelegate,WenDuCellDelegate,LogisticalSelectViewDelegate, UIPickerViewDataSource, UIPickerViewDelegate, GLAlertSelectViewDelegate,CLLocationManagerDelegate, CityListViewControllerDelegate,ToAndFormSelectViewControllerDelegate,WayBillAddressCanDelItemCellDelegate,HLLTopCellDelegate,OtherDemandViewControllerDelegate,OnlyViewCellDelegate, XiaDanUserInfoViewControllerDelegate, P_P_H_Time_Select_View_Delegate,P_P_H_Adr_VC_Delegate, Suc_LOG_Cell_Delegate,PaymentViewDelegate{
func PaymentViewClose() {
paymentView?.removeFromSuperview()
paymentView = nil
}
func PaymentViewPassInputFinish(fullpass: String) {
HUD.flash(.progress)
pphPayment(["user_token":UserToken as Any,"wb_no":0 as Any,"pwd":fullpass as Any]) { (data) in
HUD.hide()
self.navigationController?.popToRootViewController(animated: false)
// self.navigationController?.pushViewController(<#T##viewController: UIViewController##UIViewController#>, animated: <#T##Bool#>)
} failture: { (err) in
}
paymentView?.removeFromSuperview()
paymentView = nil
}
var paymentView:PaymentView?
var res = -1
@IBAction func PPH_PayAction(_ sender: Any) {
if totalPrice.count > 0 {
switch res {
case 1://未开通格利支付
break
case 2://未设置支付密码
break
case 3://资金不足额
let view = WXTS_View(frame: self.view.bounds)
self.view.addSubview(view)
break
case 4://资金足额
if paymentView == nil{
paymentView = PaymentView(frame: view.bounds)
paymentView?.delegate = self
paymentView?.price = (totalPrice as NSString).floatValue
view.addSubview(paymentView!)
}
break
default:
break
}
}
}
func Suc_LOG_Cell_Add_Action(cell: Suc_LOG_Cell,isSend:Bool) {
let vc = P_P_H_Adr_VC()
vc.isSend = isSend
......@@ -24,6 +70,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self.navigationController?.pushViewController(vc, animated: true)
}
@IBOutlet weak var pph_milelbl: UILabel!
@IBOutlet weak var pph_priceLbl: UILabel!
var totalPrice = ""
func P_P_H_Adr_VC_Data(adrData: addPinPinOrder_adrInfo, isSend: Bool, idx: Int) {
if isSend {
if pph_send_arr.count == 0 {
......@@ -48,7 +97,47 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
}
}
pph_listView.reloadData()
if pph_send_arr.count > 0 && pph_receive_arr.count > 0 {
var tempArr:Array<addPinPinOrder_adrInfo> = []
pph_send_arr.forEach { (item) in
tempArr.append(item)
}
pph_receive_arr.forEach { (item) in
tempArr.append(item)
}
tempArr.first?.type = "1"
tempArr.last?.type = "2"
var infos:Array<Any> = []
tempArr.forEach { (item) in
let info = [
"type":item.type as Any,
"lng":item.lng as Any,
"lat":item.lat as Any
]
infos.append(info)
}
let infosData = dataChangeString(sender: infos)
let dict = ["user_token":UserToken as Any,"type":pphCarTypesArr[pph_selectCarType].type as Any,"tailplate":0 as Any,"infos":infosData as Any]
countPrice(dict) { (data) in
let model = data as! countPrice_model
self.pph_priceLbl.text = \(model.data!.totalPrice!)"
self.pph_milelbl.text = "(\(model.data!.mileage!)KM)"
self.totalPrice = (model.data?.totalPrice)!
stateJudge(["user_token":self.UserToken as Any,"price":self.totalPrice]) { [self] (data) in
let model = data as! stateJudge_model
self.res = (model.data?.res)!
self.pph_listView.reloadData()
} failture: { (err) in
}
} failture: { (err) in
}
}else{
pph_listView.reloadData()
}
}
var isPPH = false
//MARK: - 拼拼货
......@@ -57,6 +146,14 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
var pph_time = ""
func P_P_H_Time_Select_View_Time_Select(time: String) {
pph_time = time
print("time == ",pph_time)
let dfmatter = DateFormatter()
dfmatter.dateFormat="yyyy-MM-dd hh:mm:ss"
let date = dfmatter.date(from: pph_time + ":00")
let dateStamp:TimeInterval = date!.timeIntervalSince1970
let dateSt = CLongLong(round(dateStamp*1000))
print("时间戳",dateSt)
pph_listView.reloadData()
}
@IBAction func check_contract_action(_ sender: Any) {
......@@ -402,7 +499,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
func HLLTopCellBtnClick(idx: Int) {
print("abc == ",idx)
if isPPH {
pph_selectCarType = idx
pph_showScrollUI()
......@@ -1767,6 +1863,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
self.navigationController?.pushViewController(vc, animated: true)
}
if indexPath.section == 5 {
if res == 3 {
let vc = CZ_Vc()
vc.userToken = UserToken as! String
self.navigationController?.pushViewController(vc, animated: true)
}
}
return
}
......@@ -2277,7 +2380,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.idx = pph_selectCarType
return cell
}
if indexPath.section == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "Suc_LOG_Cell") as! Suc_LOG_Cell
cell.delegate = self
......@@ -2297,7 +2399,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let model = pph_send_arr[indexPath.row]
cell.name_lbl.text = model.shopName
cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)"
cell.commend_lbl.text = model.note
cell.commend_lbl.text = "-"
if model.note?.count != 0 {
cell.commend_lbl.text = model.note
}
if indexPath.row == pph_send_arr.count - 1 {
cell.add_btn.isHidden = false
}else{
......@@ -2325,7 +2430,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let model = pph_receive_arr[indexPath.row]
cell.name_lbl.text = model.shopName
cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)"
cell.commend_lbl.text = model.note
cell.commend_lbl.text = "-"
if model.note?.count != 0 {
cell.commend_lbl.text = model.note
}
if indexPath.row == pph_receive_arr.count - 1 {
cell.add_btn.isHidden = false
}else{
......@@ -2341,9 +2449,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.btn.isUserInteractionEnabled = false
return cell
}
if indexPath.section == 4 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFBtnCell") as! TitleAndTFBtnCell
cell.contentTf.textAlignment = .right
cell.nameLbl.text = "关联平台:"
if indexPath.row == 1 {
cell.nameLbl.text = "关联订单号:"
......@@ -2352,9 +2460,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "GL_PAY_Cell") as! GL_PAY_Cell
if res == 4 {
cell.isNonEnough = true
}
return cell
}
}
......
......@@ -24,6 +24,8 @@
<outlet property="p_p_view" destination="Vf0-aT-43t" id="BMv-xY-6z5"/>
<outlet property="pin_pin_huo" destination="hwI-gN-CwU" id="xHH-Jp-k0u"/>
<outlet property="pph_listView" destination="lrw-DF-qzM" id="QG0-fE-TaJ"/>
<outlet property="pph_milelbl" destination="zny-S9-xc7" id="Bs1-uc-anD"/>
<outlet property="pph_priceLbl" destination="Ns2-Yz-QQW" id="UJl-9o-Xgl"/>
<outlet property="pph_topCarBtnView" destination="dYD-zk-l4l" id="D3e-D2-pIT"/>
<outlet property="priceLbl" destination="TJP-xc-KTh" id="NH7-PB-8a7"/>
<outlet property="rightBtn" destination="X6m-t6-gdl" id="yiF-bx-dJm"/>
......@@ -395,6 +397,9 @@
<color key="value" name="green"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="PPH_PayAction:" destination="-1" eventType="touchUpInside" id="X5U-AA-A0S"/>
</connections>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="立即下单" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o3g-iC-T2M">
<rect key="frame" x="282" y="717" width="124" height="49"/>
......
......@@ -9,8 +9,8 @@
import UIKit
class SJMapCell: UITableViewCell {
var lat:CGFloat?
var lng:CGFloat?
var lat:Double?
var lng:Double?
var cityData = ""
@IBOutlet weak var imgView: UIImageView!
@IBOutlet weak var contentLbl: UILabel!
......
......@@ -40,23 +40,21 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
IQKeyboardManager.shared.enable = true
IQKeyboardManager.shared.shouldResignOnTouchOutside = true
}
var isFirst = false
var alreadySelect = false
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
manger.stopUpdatingLocation()
if isFirst {
isFirst = false
print("have data")
if alreadySelect {
alreadySelect = false
initMapView(lat: lat, lng: lng)
initSearch()
}else{
print("no data")
let location = locations.last
lat = location?.coordinate.latitude as! CLLocationDegrees
lng = location?.coordinate.longitude as! CLLocationDegrees
let coo = JZLocationConverter.wgs84(toGcj02: CLLocationCoordinate2D(latitude: lat, longitude: lng))
initMapView(lat: coo.latitude, lng: coo.longitude)
initSearch()
let location = locations.last
lat = location?.coordinate.latitude as! CLLocationDegrees
lng = location?.coordinate.longitude as! CLLocationDegrees
let coo = JZLocationConverter.wgs84(toGcj02: CLLocationCoordinate2D(latitude: lat, longitude: lng))
initMapView(lat: coo.latitude, lng: coo.longitude)
initSearch()
}
}
func backAction() {
......@@ -95,13 +93,10 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
manger.startUpdatingLocation()
manger.requestAlwaysAuthorization()
NotificationCenter.default.addObserver(self, selector: #selector(keyboardShow(note:)), name:UIResponder.keyboardWillShowNotification,object: nil)
// 监听键盘隐藏通知
NotificationCenter.default.addObserver(self,selector: #selector(keyboardHidden(note:)),
name: UIResponder.keyboardWillHideNotification, object: nil)
}
var isSearchMode = false
......@@ -145,7 +140,7 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
self.view.addSubview(btn)
btn.addTarget(self, action: #selector(searchClose(btn:)), for: .touchUpInside)
btn.snp.makeConstraints { (make) in
make.top.equalTo(NavHeight)
make.top.equalTo(NavHeight + 44)
make.left.right.equalTo(0)
make.bottom.equalTo(btmView.snp_top)
}
......@@ -308,8 +303,8 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
let distance = MAMetersBetweenMapPoints(point1,point2);
cell.contentLbl.text = "\(Int(distance))米 | \(poi.address!)"
cell.lat = poi.location.latitude
cell.lng = poi.location.longitude
cell.lat = Double(poi.location.latitude)
cell.lng = Double(poi.location.longitude)
cell.imgView.isHidden = true
if indexPath == idx {
......@@ -328,6 +323,13 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath.row)
if idx == indexPath {
if isSearchMode {
let cell = tableView.cellForRow(at: idx!) as! SJMapCell
mapView.setCenter(CLLocationCoordinate2D(latitude:CLLocationDegrees(cell.lat!), longitude: CLLocationDegrees(cell.lng!)), animated: false)
adrStr = cell.nameLbl.text
delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cityData!, loc: "\(cell.lat!)-\(cell.lng!)")
self.navigationController?.popViewController(animated: true)
}
return
}else{
idx = indexPath
......@@ -336,7 +338,7 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
listView?.reloadData()
adrStr = cell.nameLbl.text
if isSearchMode {
delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cityData!, loc: "\(cell.lat)-\(cell.lng)")
delegate?.SJMapViewControllerSelectArd(adr: cell.nameLbl.text!, cityData: cityData!, loc: "\(cell.lat!)-\(cell.lng!)")
self.navigationController?.popViewController(animated: true)
}
}
......@@ -366,8 +368,13 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
let submit_btn = LGButton()
view.addSubview(submit_btn)
btmBtn = submit_btn
submit_btn.gradientStartColor = UIColor(named: "按钮渐变色上")
submit_btn.gradientEndColor = UIColor(named: "按钮渐变色下,字体颜色")
if isPPH {
submit_btn.gradientStartColor = UIColor(named: "green")
submit_btn.gradientEndColor = UIColor(named: "green")
}else{
submit_btn.gradientStartColor = UIColor(named: "按钮渐变色上")
submit_btn.gradientEndColor = UIColor(named: "按钮渐变色下,字体颜色")
}
submit_btn.gradientHorizontal = true
if isPPH {
submit_btn.gradientStartColor = UIColor(named: "green")
......
......@@ -10,34 +10,41 @@ import UIKit
class CZ_Vc: BaseViewController {
@IBOutlet weak var top_view: UIView!
@IBOutlet weak var bank_number: UILabel!
@IBOutlet weak var bank_account_number: UILabel!
@IBOutlet weak var bank_adr: UILabel!
@IBOutlet weak var bank_name: UILabel!
@IBOutlet weak var user_account: UILabel!
var userToken = ""
@IBAction func copy_action(_ sender: UIButton) {
let pastboard = UIPasteboard.general
pastboard.string = bank_account_number.text
HUD.flash(.success, delay: 0.5)
// let view = P_P_H_Time_Select_View(frame: self.view.bounds)
// self.view.addSubview(view)
}
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "充值"
self.view.addSubview(navbar)
top_view.snp.makeConstraints { (make) in
make.top.equalTo(NavHeight + 12)
make.left.equalTo(15)
make.right.equalTo(-15)
make.height.equalTo(238.5)
}
rechargeOperation(["user_token":userToken as Any]) {[self] (data) in
let model = data as! rechargeOperation_model
user_account.text = model.data?.clt_nm
bank_name.text = model.data?.bank_name
bank_adr.text = model.data?.bank_branch
bank_number.text = model.data?.bank_branch_num
bank_account_number.text = model.data?.bnk_eid
} failture: { (err) in
}
// Do any additional setup after loading the view.
}
/*
// 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.
}
*/
}
......@@ -16,6 +16,7 @@
<outlet property="bank_adr" destination="66d-qF-hBN" id="ljb-Fz-hdV"/>
<outlet property="bank_name" destination="6et-W7-Hrm" id="U6u-gB-YSB"/>
<outlet property="bank_number" destination="ca5-Rn-cI6" id="mPX-pF-3fd"/>
<outlet property="top_view" destination="wwM-jn-pAL" id="xfc-qq-kkj"/>
<outlet property="user_account" destination="0D8-Sc-1E0" id="8he-Fl-IBs"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
......
......@@ -9,16 +9,25 @@
import UIKit
class GL_PAY_Cell: UITableViewCell {
var isNonEnough = false {
didSet{
titleLbl.isHidden = !isNonEnough
pricelbl.isHidden = !isNonEnough
lineView.isHidden = !isNonEnough
}
}
@IBOutlet weak var titleLbl: UILabel!
@IBOutlet weak var pricelbl: UILabel!
@IBOutlet weak var lineView: UIView!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
......
......@@ -43,24 +43,61 @@
<constraint firstAttribute="width" constant="19" id="kap-SG-Qyd"/>
</constraints>
</imageView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="立即充值" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nC2-k4-qUD">
<rect key="frame" x="257" y="54.5" width="44" height="16"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="11"/>
<color key="textColor" name="#F57575"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="余额不足:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V4u-G7-Yzj">
<rect key="frame" x="210" y="54.5" width="47" height="15.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="11"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j76-ns-QIL">
<rect key="frame" x="257" y="68" width="44" height="1"/>
<color key="backgroundColor" name="#F57575"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Sbi-gR-4kM"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="j76-ns-QIL" firstAttribute="top" secondItem="V4u-G7-Yzj" secondAttribute="bottom" constant="-2" id="2RL-gw-Qw9"/>
<constraint firstItem="sDw-v3-gaH" firstAttribute="top" secondItem="wo6-pR-Upt" secondAttribute="bottom" constant="15" id="3EU-jC-u97"/>
<constraint firstItem="clX-YE-xGa" firstAttribute="centerY" secondItem="sDw-v3-gaH" secondAttribute="centerY" id="7I4-bs-O7q"/>
<constraint firstItem="sDw-v3-gaH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="DRV-ai-QWY"/>
<constraint firstItem="j76-ns-QIL" firstAttribute="centerX" secondItem="nC2-k4-qUD" secondAttribute="centerX" id="K2L-B2-bew"/>
<constraint firstItem="V4u-G7-Yzj" firstAttribute="centerY" secondItem="nC2-k4-qUD" secondAttribute="centerY" id="OEs-wP-C6c"/>
<constraint firstItem="clX-YE-xGa" firstAttribute="leading" secondItem="nC2-k4-qUD" secondAttribute="trailing" constant="40" id="YId-Vv-9My"/>
<constraint firstItem="gwz-Xi-Eeu" firstAttribute="bottom" secondItem="wo6-pR-Upt" secondAttribute="bottom" id="aoY-WG-twZ"/>
<constraint firstItem="wo6-pR-Upt" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="dDJ-TW-knr"/>
<constraint firstItem="j76-ns-QIL" firstAttribute="width" secondItem="nC2-k4-qUD" secondAttribute="width" id="fKB-jZ-EQI"/>
<constraint firstAttribute="trailing" secondItem="clX-YE-xGa" secondAttribute="trailing" constant="15" id="hpb-3k-CQK"/>
<constraint firstItem="nC2-k4-qUD" firstAttribute="centerY" secondItem="sDw-v3-gaH" secondAttribute="centerY" id="o17-B5-D2R"/>
<constraint firstItem="nC2-k4-qUD" firstAttribute="leading" secondItem="V4u-G7-Yzj" secondAttribute="trailing" id="pOg-7v-ezx"/>
<constraint firstItem="gwz-Xi-Eeu" firstAttribute="leading" secondItem="wo6-pR-Upt" secondAttribute="trailing" constant="5" id="sXf-EA-RMv"/>
<constraint firstItem="wo6-pR-Upt" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="17" id="xMT-v1-bxu"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<point key="canvasLocation" x="141" y="80"/>
<connections>
<outlet property="lineView" destination="j76-ns-QIL" id="Wbn-V9-aoE"/>
<outlet property="pricelbl" destination="V4u-G7-Yzj" id="fL1-C5-9KD"/>
<outlet property="titleLbl" destination="nC2-k4-qUD" id="iFq-7d-hse"/>
</connections>
<point key="canvasLocation" x="139.85507246376812" y="79.352678571428569"/>
</tableViewCell>
</objects>
<resources>
<image name="ttt" width="19" height="19"/>
<namedColor name="#F57575">
<color red="0.96100002527236938" green="0.45899999141693115" blue="0.45899999141693115" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="个人中心灰色字体">
<color red="0.38823529411764707" green="0.38823529411764707" blue="0.38823529411764707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="提示语字体颜色">
<color red="0.70588235294117652" green="0.70588235294117652" blue="0.70588235294117652" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
......
......@@ -39,8 +39,11 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
func SJMapViewControllerSelectArd(adr:String,cityData:String,loc:String) {
city_lbl.text = cityData
let ar = loc.components(separatedBy: "-")
self.lng = (ar.last as! NSString).doubleValue
self.lat = (ar.first as! NSString).doubleValue
print("pass_loc = ",loc)
self.lng = (ar.last! as NSString).doubleValue
self.lat = (ar.first! as NSString).doubleValue
print("location == ",self.lng,self.lat)
let arr = cityData.components(separatedBy: "-")
for i in 0 ..< addressArray.count {
let provinceData = addressArray[i] as! Dictionary<String,Any>
......@@ -101,8 +104,9 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
adrTf.resignFirstResponder()
let vc = SJMapViewController()
vc.delegate = self
if lat != 0 {
vc.isFirst = true
vc.isPPH = true
if city_lbl.text != "请选择城市" {
vc.alreadySelect = true
vc.lat = lat
vc.lng = lng
}
......
......@@ -22,12 +22,20 @@ class P_P_H_Time_Select_View: UIView,UIPickerViewDelegate,UIPickerViewDataSource
}
@IBAction func submitAction(_ sender: Any) {
var hour = hourArr[hourSelect]
if hour.count < 2 {
hour = "0" + hour
}
var min = minArr[minSelect]
if min.count < 2 {
min = "0" + min
}
if dayArr[daySelect] == "今天" {
time_str = dateConvertString(date: DateInRegion().dateAt(.startOfDay).date) + " " + hourArr[hourSelect] + ":" + minArr[minSelect]
time_str = dateConvertString(date: DateInRegion().dateAt(.startOfDay).date) + " " + hour + ":" + min
}else if dayArr[daySelect] == "明天" {
time_str = dateConvertString(date: DateInRegion().dateAt(.startOfDay).date + 1.days) + " " + hourArr[hourSelect] + ":" + minArr[minSelect]
time_str = dateConvertString(date: DateInRegion().dateAt(.startOfDay).date + 1.days) + " " + hour + ":" + min
}else{
time_str = dateConvertString(date: DateInRegion().dateAt(.startOfDay).date + daySelect.days + 1.days) + " " + hourArr[hourSelect] + ":" + minArr[minSelect]
time_str = dateConvertString(date: DateInRegion().dateAt(.startOfDay).date + daySelect.days + 1.days) + " " + hour + ":" + min
}
delegate?.P_P_H_Time_Select_View_Time_Select(time: time_str)
......
......@@ -12,10 +12,7 @@ class WXTS_View: UIView {
var contentView:UIView!
@IBAction func close_action(_ sender: UIButton) {
self.removeFromSuperview()
}
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
......
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