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 ...@@ -95,7 +95,7 @@ func orderDetails(_ params:[String:Any],success:@escaping (_ res:Any)->(),failtu
user_token 验证token user_token 验证token
*/ */
func rechargeOperation(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) { 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) in
success(data) success(data)
}) { (error) in }) { (error) in
......
...@@ -73,7 +73,7 @@ class stateJudgeData_model: Mappable { ...@@ -73,7 +73,7 @@ class stateJudgeData_model: Mappable {
} }
} }
//MARK: - 充值操作界面信息查询 //MARK: - 充值操作界面信息查询
class orechargeOperation_model: Mappable { class rechargeOperation_model: Mappable {
var code:Int? var code:Int?
var message : String? var message : String?
var data :rechargeOperationData_model? var data :rechargeOperationData_model?
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<action selector="eidtAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="5St-2L-LDo"/> <action selector="eidtAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="5St-2L-LDo"/>
</connections> </connections>
</button> </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"/> <rect key="frame" x="58" y="0.0" width="197" height="43"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
......
...@@ -15,7 +15,53 @@ import SDWebImage ...@@ -15,7 +15,53 @@ import SDWebImage
import IQKeyboardManagerSwift 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) { func Suc_LOG_Cell_Add_Action(cell: Suc_LOG_Cell,isSend:Bool) {
let vc = P_P_H_Adr_VC() let vc = P_P_H_Adr_VC()
vc.isSend = isSend vc.isSend = isSend
...@@ -24,6 +70,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -24,6 +70,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self.navigationController?.pushViewController(vc, animated: true) 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) { func P_P_H_Adr_VC_Data(adrData: addPinPinOrder_adrInfo, isSend: Bool, idx: Int) {
if isSend { if isSend {
if pph_send_arr.count == 0 { if pph_send_arr.count == 0 {
...@@ -48,8 +97,48 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -48,8 +97,48 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
} }
} }
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() pph_listView.reloadData()
} }
}
var isPPH = false var isPPH = false
//MARK: - 拼拼货 //MARK: - 拼拼货
var pph_send_arr:Array<addPinPinOrder_adrInfo> = [] var pph_send_arr:Array<addPinPinOrder_adrInfo> = []
...@@ -57,6 +146,14 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -57,6 +146,14 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
var pph_time = "" var pph_time = ""
func P_P_H_Time_Select_View_Time_Select(time: String) { func P_P_H_Time_Select_View_Time_Select(time: String) {
pph_time = time 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() pph_listView.reloadData()
} }
@IBAction func check_contract_action(_ sender: Any) { @IBAction func check_contract_action(_ sender: Any) {
...@@ -402,7 +499,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -402,7 +499,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
func HLLTopCellBtnClick(idx: Int) { func HLLTopCellBtnClick(idx: Int) {
print("abc == ",idx)
if isPPH { if isPPH {
pph_selectCarType = idx pph_selectCarType = idx
pph_showScrollUI() pph_showScrollUI()
...@@ -1767,6 +1863,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -1767,6 +1863,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
self.navigationController?.pushViewController(vc, animated: true) 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 return
} }
...@@ -2277,7 +2380,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -2277,7 +2380,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.idx = pph_selectCarType cell.idx = pph_selectCarType
return cell return cell
} }
if indexPath.section == 1 { if indexPath.section == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "Suc_LOG_Cell") as! Suc_LOG_Cell let cell = tableView.dequeueReusableCell(withIdentifier: "Suc_LOG_Cell") as! Suc_LOG_Cell
cell.delegate = self cell.delegate = self
...@@ -2297,7 +2399,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -2297,7 +2399,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let model = pph_send_arr[indexPath.row] let model = pph_send_arr[indexPath.row]
cell.name_lbl.text = model.shopName cell.name_lbl.text = model.shopName
cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)" cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)"
cell.commend_lbl.text = "-"
if model.note?.count != 0 {
cell.commend_lbl.text = model.note cell.commend_lbl.text = model.note
}
if indexPath.row == pph_send_arr.count - 1 { if indexPath.row == pph_send_arr.count - 1 {
cell.add_btn.isHidden = false cell.add_btn.isHidden = false
}else{ }else{
...@@ -2325,7 +2430,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -2325,7 +2430,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let model = pph_receive_arr[indexPath.row] let model = pph_receive_arr[indexPath.row]
cell.name_lbl.text = model.shopName cell.name_lbl.text = model.shopName
cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)" cell.adr_lbl.text = "\(model.province_name!)\(model.city_name!)\(model.district_name!)\(model.street_name!)"
cell.commend_lbl.text = "-"
if model.note?.count != 0 {
cell.commend_lbl.text = model.note cell.commend_lbl.text = model.note
}
if indexPath.row == pph_receive_arr.count - 1 { if indexPath.row == pph_receive_arr.count - 1 {
cell.add_btn.isHidden = false cell.add_btn.isHidden = false
}else{ }else{
...@@ -2341,9 +2449,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -2341,9 +2449,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.btn.isUserInteractionEnabled = false cell.btn.isUserInteractionEnabled = false
return cell return cell
} }
if indexPath.section == 4 { if indexPath.section == 4 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFBtnCell") as! TitleAndTFBtnCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFBtnCell") as! TitleAndTFBtnCell
cell.contentTf.textAlignment = .right
cell.nameLbl.text = "关联平台:" cell.nameLbl.text = "关联平台:"
if indexPath.row == 1 { if indexPath.row == 1 {
cell.nameLbl.text = "关联订单号:" cell.nameLbl.text = "关联订单号:"
...@@ -2352,9 +2460,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -2352,9 +2460,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
return cell return cell
} }
let cell = tableView.dequeueReusableCell(withIdentifier: "GL_PAY_Cell") as! GL_PAY_Cell let cell = tableView.dequeueReusableCell(withIdentifier: "GL_PAY_Cell") as! GL_PAY_Cell
if res == 4 {
cell.isNonEnough = true
}
return cell return cell
} }
} }
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
<outlet property="p_p_view" destination="Vf0-aT-43t" id="BMv-xY-6z5"/> <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="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_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="pph_topCarBtnView" destination="dYD-zk-l4l" id="D3e-D2-pIT"/>
<outlet property="priceLbl" destination="TJP-xc-KTh" id="NH7-PB-8a7"/> <outlet property="priceLbl" destination="TJP-xc-KTh" id="NH7-PB-8a7"/>
<outlet property="rightBtn" destination="X6m-t6-gdl" id="yiF-bx-dJm"/> <outlet property="rightBtn" destination="X6m-t6-gdl" id="yiF-bx-dJm"/>
...@@ -395,6 +397,9 @@ ...@@ -395,6 +397,9 @@
<color key="value" name="green"/> <color key="value" name="green"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections>
<action selector="PPH_PayAction:" destination="-1" eventType="touchUpInside" id="X5U-AA-A0S"/>
</connections>
</view> </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"> <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"/> <rect key="frame" x="282" y="717" width="124" height="49"/>
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
import UIKit import UIKit
class SJMapCell: UITableViewCell { class SJMapCell: UITableViewCell {
var lat:CGFloat? var lat:Double?
var lng:CGFloat? var lng:Double?
var cityData = "" var cityData = ""
@IBOutlet weak var imgView: UIImageView! @IBOutlet weak var imgView: UIImageView!
@IBOutlet weak var contentLbl: UILabel! @IBOutlet weak var contentLbl: UILabel!
......
...@@ -40,17 +40,15 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -40,17 +40,15 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.enable = true
IQKeyboardManager.shared.shouldResignOnTouchOutside = true IQKeyboardManager.shared.shouldResignOnTouchOutside = true
} }
var isFirst = false var alreadySelect = false
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
manger.stopUpdatingLocation() manger.stopUpdatingLocation()
if isFirst { if alreadySelect {
isFirst = false alreadySelect = false
print("have data")
initMapView(lat: lat, lng: lng) initMapView(lat: lat, lng: lng)
initSearch() initSearch()
}else{ }else{
print("no data")
let location = locations.last let location = locations.last
lat = location?.coordinate.latitude as! CLLocationDegrees lat = location?.coordinate.latitude as! CLLocationDegrees
lng = location?.coordinate.longitude as! CLLocationDegrees lng = location?.coordinate.longitude as! CLLocationDegrees
...@@ -95,13 +93,10 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -95,13 +93,10 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
manger.startUpdatingLocation() manger.startUpdatingLocation()
manger.requestAlwaysAuthorization() manger.requestAlwaysAuthorization()
NotificationCenter.default.addObserver(self, selector: #selector(keyboardShow(note:)), name:UIResponder.keyboardWillShowNotification,object: nil) NotificationCenter.default.addObserver(self, selector: #selector(keyboardShow(note:)), name:UIResponder.keyboardWillShowNotification,object: nil)
// 监听键盘隐藏通知 // 监听键盘隐藏通知
NotificationCenter.default.addObserver(self,selector: #selector(keyboardHidden(note:)), NotificationCenter.default.addObserver(self,selector: #selector(keyboardHidden(note:)),
name: UIResponder.keyboardWillHideNotification, object: nil) name: UIResponder.keyboardWillHideNotification, object: nil)
} }
var isSearchMode = false var isSearchMode = false
...@@ -145,7 +140,7 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -145,7 +140,7 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
self.view.addSubview(btn) self.view.addSubview(btn)
btn.addTarget(self, action: #selector(searchClose(btn:)), for: .touchUpInside) btn.addTarget(self, action: #selector(searchClose(btn:)), for: .touchUpInside)
btn.snp.makeConstraints { (make) in btn.snp.makeConstraints { (make) in
make.top.equalTo(NavHeight) make.top.equalTo(NavHeight + 44)
make.left.right.equalTo(0) make.left.right.equalTo(0)
make.bottom.equalTo(btmView.snp_top) make.bottom.equalTo(btmView.snp_top)
} }
...@@ -308,8 +303,8 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -308,8 +303,8 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
let distance = MAMetersBetweenMapPoints(point1,point2); let distance = MAMetersBetweenMapPoints(point1,point2);
cell.contentLbl.text = "\(Int(distance))米 | \(poi.address!)" cell.contentLbl.text = "\(Int(distance))米 | \(poi.address!)"
cell.lat = poi.location.latitude cell.lat = Double(poi.location.latitude)
cell.lng = poi.location.longitude cell.lng = Double(poi.location.longitude)
cell.imgView.isHidden = true cell.imgView.isHidden = true
if indexPath == idx { if indexPath == idx {
...@@ -328,6 +323,13 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -328,6 +323,13 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath.row) print(indexPath.row)
if idx == indexPath { 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 return
}else{ }else{
idx = indexPath idx = indexPath
...@@ -336,7 +338,7 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -336,7 +338,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: cityData!, loc: "\(cell.lat!)-\(cell.lng!)")
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
} }
...@@ -366,8 +368,13 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag ...@@ -366,8 +368,13 @@ class SJMapViewController: UIViewController,NavBarViewDelegate,AMapLocationManag
let submit_btn = LGButton() let submit_btn = LGButton()
view.addSubview(submit_btn) view.addSubview(submit_btn)
btmBtn = submit_btn btmBtn = submit_btn
if isPPH {
submit_btn.gradientStartColor = UIColor(named: "green")
submit_btn.gradientEndColor = UIColor(named: "green")
}else{
submit_btn.gradientStartColor = UIColor(named: "按钮渐变色上") submit_btn.gradientStartColor = UIColor(named: "按钮渐变色上")
submit_btn.gradientEndColor = UIColor(named: "按钮渐变色下,字体颜色") submit_btn.gradientEndColor = UIColor(named: "按钮渐变色下,字体颜色")
}
submit_btn.gradientHorizontal = true submit_btn.gradientHorizontal = true
if isPPH { if isPPH {
submit_btn.gradientStartColor = UIColor(named: "green") submit_btn.gradientStartColor = UIColor(named: "green")
......
...@@ -10,34 +10,41 @@ import UIKit ...@@ -10,34 +10,41 @@ import UIKit
class CZ_Vc: BaseViewController { class CZ_Vc: BaseViewController {
@IBOutlet weak var top_view: UIView!
@IBOutlet weak var bank_number: UILabel! @IBOutlet weak var bank_number: UILabel!
@IBOutlet weak var bank_account_number: UILabel! @IBOutlet weak var bank_account_number: UILabel!
@IBOutlet weak var bank_adr: UILabel! @IBOutlet weak var bank_adr: UILabel!
@IBOutlet weak var bank_name: UILabel! @IBOutlet weak var bank_name: UILabel!
@IBOutlet weak var user_account: UILabel! @IBOutlet weak var user_account: UILabel!
var userToken = ""
@IBAction func copy_action(_ sender: UIButton) { @IBAction func copy_action(_ sender: UIButton) {
let pastboard = UIPasteboard.general let pastboard = UIPasteboard.general
pastboard.string = bank_account_number.text pastboard.string = bank_account_number.text
HUD.flash(.success, delay: 0.5) 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() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
navbar.title = "充值"
// Do any additional setup after loading the view. 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
/*
// 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 @@ ...@@ -16,6 +16,7 @@
<outlet property="bank_adr" destination="66d-qF-hBN" id="ljb-Fz-hdV"/> <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_name" destination="6et-W7-Hrm" id="U6u-gB-YSB"/>
<outlet property="bank_number" destination="ca5-Rn-cI6" id="mPX-pF-3fd"/> <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="user_account" destination="0D8-Sc-1E0" id="8he-Fl-IBs"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
......
...@@ -9,7 +9,16 @@ ...@@ -9,7 +9,16 @@
import UIKit import UIKit
class GL_PAY_Cell: UITableViewCell { 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() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
......
...@@ -43,24 +43,61 @@ ...@@ -43,24 +43,61 @@
<constraint firstAttribute="width" constant="19" id="kap-SG-Qyd"/> <constraint firstAttribute="width" constant="19" id="kap-SG-Qyd"/>
</constraints> </constraints>
</imageView> </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> </subviews>
<constraints> <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="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="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="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="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="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 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="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"/> <constraint firstItem="wo6-pR-Upt" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="17" id="xMT-v1-bxu"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <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> </tableViewCell>
</objects> </objects>
<resources> <resources>
<image name="ttt" width="19" height="19"/> <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="提示语字体颜色"> <namedColor name="提示语字体颜色">
<color red="0.70588235294117652" green="0.70588235294117652" blue="0.70588235294117652" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.70588235294117652" green="0.70588235294117652" blue="0.70588235294117652" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
......
...@@ -39,8 +39,11 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView ...@@ -39,8 +39,11 @@ 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: "-")
self.lng = (ar.last as! NSString).doubleValue print("pass_loc = ",loc)
self.lat = (ar.first as! NSString).doubleValue 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: "-") 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>
...@@ -101,8 +104,9 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView ...@@ -101,8 +104,9 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
adrTf.resignFirstResponder() adrTf.resignFirstResponder()
let vc = SJMapViewController() let vc = SJMapViewController()
vc.delegate = self vc.delegate = self
if lat != 0 { vc.isPPH = true
vc.isFirst = true if city_lbl.text != "请选择城市" {
vc.alreadySelect = true
vc.lat = lat vc.lat = lat
vc.lng = lng vc.lng = lng
} }
......
...@@ -22,12 +22,20 @@ class P_P_H_Time_Select_View: UIView,UIPickerViewDelegate,UIPickerViewDataSource ...@@ -22,12 +22,20 @@ class P_P_H_Time_Select_View: UIView,UIPickerViewDelegate,UIPickerViewDataSource
} }
@IBAction func submitAction(_ sender: Any) { @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] == "今天" { 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] == "明天" { }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{ }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) delegate?.P_P_H_Time_Select_View_Time_Select(time: time_str)
......
...@@ -12,10 +12,7 @@ class WXTS_View: UIView { ...@@ -12,10 +12,7 @@ class WXTS_View: UIView {
var contentView:UIView! var contentView:UIView!
@IBAction func close_action(_ sender: UIButton) { @IBAction func close_action(_ sender: UIButton) {
self.removeFromSuperview() self.removeFromSuperview()
} }
//初始化时将xib中的view添加进来 //初始化时将xib中的view添加进来
override init(frame: CGRect) { 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