Commit 114ffb05 authored by lujunye's avatar lujunye

修复顺丰京东显示问题。修复地址显示问题

parent 29c56020
......@@ -12,6 +12,7 @@ import LGButton
protocol LogisticalSelectViewDelegate {
func LogisticalSelectViewSure(index:Int)
func LogisticalSelectViewWebBy(index:Int)
func LogisticalSelectViewBtnclick(idx:Int)
}
class LogisticalSelectView: UIView {
......@@ -27,9 +28,16 @@ class LogisticalSelectView: UIView {
@IBOutlet weak var sfPriceLbl: UILabel!
@IBOutlet weak var jdPriceLbl: UILabel!
var tempArr:Array<UILabel> = []
var fuTitleArr:Array<String> = [] {
didSet {
if fuTitleArr.count == 0 {
tempArr.forEach { (item) in
item.removeFromSuperview()
}
selectBgHeight.constant = CGFloat(265)
return
}
for i in 0..<fuTitleArr.count {
let lbl = UILabel()
lbl.text = fuTitleArr[i]
......@@ -40,17 +48,19 @@ class LogisticalSelectView: UIView {
make.left.equalTo(sfAgreeLbl)
make.top.equalTo(sfAgreeLbl.snp_bottom).offset((5 + 15) * i + 5)
}
tempArr.append(lbl)
}
selectBgHeight.constant = CGFloat(265 + fuTitleArr.count * 19)
}
}
@IBAction func xiadanAction(_ sender: Any) {
if jdSelectBtn.isSelected || sfSelectBtn.isSelected {
if jdSelectBtn.isSelected {
delegate?.LogisticalSelectViewSure(index: 1)
}else if sfSelectBtn.isSelected {
delegate?.LogisticalSelectViewSure(index: 2)
}
self.removeFromSuperview()
......@@ -75,9 +85,14 @@ class LogisticalSelectView: UIView {
if sender == jdSelectBtn {
jdSelectBtn.isSelected = !jdSelectBtn.isSelected
sfSelectBtn.isSelected = false
delegate?.LogisticalSelectViewBtnclick(idx: 0)
}else if sender == sfSelectBtn {
sfSelectBtn.isSelected = !sfSelectBtn.isSelected
jdSelectBtn.isSelected = false
delegate?.LogisticalSelectViewBtnclick(idx: 1)
// selectBgView.isHidden = false
// selectBgHeight.constant = CGFloat(265 + fuTitleArr.count * 19)
}
}
var contentView:UIView!
......
<?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"/>
......@@ -35,7 +35,7 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rW2-Ka-gAx">
<rect key="frame" x="0.0" y="495" width="414" height="318"/>
<rect key="frame" x="0.0" y="533" width="414" height="280"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ufe-WI-qAR">
<rect key="frame" x="0.0" y="0.0" width="414" height="51"/>
......@@ -416,14 +416,14 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Trf-1A-2UZ">
<rect key="frame" x="0.0" y="275" width="414" height="43"/>
<rect key="frame" x="0.0" y="275" width="414" height="0.0"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="n6W-Cn-03r">
<rect key="frame" x="350" y="6" width="51" height="31"/>
<switch hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="n6W-Cn-03r">
<rect key="frame" x="350" y="-15.5" width="51" height="31"/>
<color key="onTintColor" name="按钮渐变色下,字体颜色"/>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="动物检疫证:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="K1L-ek-eBf">
<rect key="frame" x="15" y="14.5" width="74" height="14.5"/>
<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="K1L-ek-eBf">
<rect key="frame" x="15" y="-7" width="74" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
......@@ -433,7 +433,7 @@
<constraints>
<constraint firstItem="K1L-ek-eBf" firstAttribute="centerY" secondItem="Trf-1A-2UZ" secondAttribute="centerY" id="WyV-QL-bCZ"/>
<constraint firstItem="K1L-ek-eBf" firstAttribute="leading" secondItem="Trf-1A-2UZ" secondAttribute="leading" constant="15" id="X27-na-xmD"/>
<constraint firstAttribute="height" constant="43" id="yI9-mB-aeO"/>
<constraint firstAttribute="height" id="yI9-mB-aeO"/>
<constraint firstItem="n6W-Cn-03r" firstAttribute="centerY" secondItem="Trf-1A-2UZ" secondAttribute="centerY" id="yzO-Po-Hso"/>
<constraint firstAttribute="trailing" secondItem="n6W-Cn-03r" secondAttribute="trailing" constant="15" id="zxA-c4-De6"/>
</constraints>
......@@ -455,7 +455,7 @@
<constraint firstAttribute="trailing" secondItem="3m5-vv-wjM" secondAttribute="trailing" id="aED-IL-b0O"/>
<constraint firstItem="Trf-1A-2UZ" firstAttribute="leading" secondItem="rW2-Ka-gAx" secondAttribute="leading" id="bQ1-nz-kvy"/>
<constraint firstAttribute="trailing" secondItem="HOF-TP-XRe" secondAttribute="trailing" id="diI-HO-EFh"/>
<constraint firstAttribute="height" constant="318" id="eAp-Aj-L92"/>
<constraint firstAttribute="height" constant="280" id="eAp-Aj-L92"/>
<constraint firstItem="9xb-ef-BR6" firstAttribute="top" secondItem="3m5-vv-wjM" secondAttribute="bottom" id="eTx-WO-ZrZ"/>
<constraint firstItem="Ufe-WI-qAR" firstAttribute="leading" secondItem="rW2-Ka-gAx" secondAttribute="leading" id="gTo-oN-cLg"/>
<constraint firstAttribute="trailing" secondItem="Ufe-WI-qAR" secondAttribute="trailing" id="hV8-R6-19E"/>
......
......@@ -519,7 +519,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
if isSend {
sender = data.consignee
sendPhone = data.mobile
sendAdr = data.address
print("")
sendAdr = data.addr_name
isSelectSendAddressModel = true
sendAddressSelectModel = data
s_province_name = data.province_cn
......@@ -531,7 +532,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}else{
receiver = data.consignee
receivePhone = data.mobile
receiveAdr = data.address
receiveAdr = data.addr_name
receiveAddressSelectModel = data
isSelectReceiveAddressModel = true
r_province_name = data.province_cn
......@@ -670,10 +671,27 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let str = model.cn! + ":¥" + (model.number)!
futitleArr.append(str)
})
if alertView.sfSelectBtn.isSelected {
alertView.fuTitleArr = futitleArr
}
weak_alertView = alertView
}
func LogisticalSelectViewBtnclick(idx:Int){
if idx == 0 {
weak_alertView?.fuTitleArr = []
}else{
var futitleArr:Array<String> = []
logPayPriceModel?.sf_data?.forEach({ (model) in
let str = model.cn! + ":¥" + (model.number)!
futitleArr.append(str)
})
weak_alertView?.fuTitleArr = futitleArr
}
}
override func viewWillAppear(_ animated: Bool) {
//MARK:--viewWillAppear 因重写出现问题,需要补写
self.navigationController?.navigationBar.isHidden = true
......@@ -727,14 +745,11 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
if rightBtn == sender {
hBtnViewH.constant = CGFloat(TabHeight)
print("loc === ",locationIsOpen)
if locationIsOpen == false {
checkLocation()
return
}
}else{
if adrDatas.count == 0{
print("city_id = ",city_id)
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
......@@ -760,7 +775,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
locBtn.isUserInteractionEnabled = true
}
}
}
}else{
//abc
locBtn.isUserInteractionEnabled = false
rightBtn.isSelected = false
leftBtn.isSelected = true
......@@ -887,10 +905,12 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
var locationIsOpen = false
func checkLocation(){
if(CLLocationManager.authorizationStatus() != .denied) {
print("应用拥有定位权限")
if CLLocationManager.locationServicesEnabled(){
locationIsOpen = true
}else {
}else if CLLocationManager.authorizationStatus() == .denied {
let aleat = UIAlertController(title: "打开定位开关", message:"定位服务未开启,请进入系统设置>隐私>定位服务中打开开关,并允许商户端使用定位服务", preferredStyle: .alert)
let tempAction = UIAlertAction(title: "取消", style: .cancel) { (action) in
}
......@@ -1072,8 +1092,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
//MARK: - 改变地址顺序
@objc func huoLLAdrAction(sender:UIButton){
if sender.tag == 0 {
print("调位置")
tempadrArr = adrArr
var h = CGFloat(adrArr.count + 2)*49
if h > CGFloat(fullScreenHeight) * 0.65 {
......@@ -1569,6 +1587,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
let dict = adrArr[indexPath.row+1] as! NSDictionary
cell.titleLbl.text = dict["locName"] as! String
return cell
}
......@@ -1595,6 +1614,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.contentV.isHidden = false
cell.nameLbl.text = sender!
cell.phoneLbl.text = sendPhone!
print("SENDER == ",sendAdr)
cell.adrLbl.text = sendAdr!
}
}
......@@ -1726,6 +1746,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let shouHuoRen = (dict["shouHuoRen"]! as! String)
let phoneNum = (dict["phoneNum"]! as! String)
cell.addressDetailLbl.text = menPai
cell.namePhoneLbl.text = shouHuoRen + " " + phoneNum
......
......@@ -93,7 +93,7 @@
<color key="textColor" name="白色背景色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="预估:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b7y-XE-wYd">
<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="b7y-XE-wYd">
<rect key="frame" x="30" y="10" width="28" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="28" id="3DN-et-PRI"/>
......@@ -103,7 +103,7 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="费用以实际揽收为准" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i3n-wg-dGW">
<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="i3n-wg-dGW">
<rect key="frame" x="30" y="28" width="102" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="5nT-iF-Lzt"/>
......@@ -113,7 +113,7 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TJP-xc-KTh">
<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="TJP-xc-KTh">
<rect key="frame" x="58" y="6.6666666666666288" width="7" height="18.333333333333332"/>
<constraints>
<constraint firstAttribute="height" constant="18.5" id="eTp-WI-Bwg"/>
......@@ -122,7 +122,7 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="寄付现结" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dlt-Q6-zeB">
<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="Dlt-Q6-zeB">
<rect key="frame" x="172" y="11" width="45" height="13.333333333333336"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="标题字颜色"/>
......@@ -136,7 +136,7 @@
<constraint firstAttribute="height" constant="15" id="VAl-q3-Uiu"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jinru" translatesAutoresizingMaskIntoConstraints="NO" id="Jke-gH-KJE">
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jinru" translatesAutoresizingMaskIntoConstraints="NO" id="Jke-gH-KJE">
<rect key="frame" x="222" y="14" width="7" height="7"/>
<constraints>
<constraint firstAttribute="width" constant="7" id="6fC-ZL-Jyk"/>
......
......@@ -388,11 +388,12 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
return
}
var dict:Dictionary<String,Any> = Dictionary()
dict["menPai"] = addressDetailTF.text
dict["menPai"] = "\(city)\(districet)\(ad)\(addressDetailTF.text!)"
dict["shouHuoRen"] = nameTF.text
dict["phoneNum"] = phoneTF.text
dict["detailAdr"] = detailAdrStr
print("det = ,",detailAdrStr)
dict["lat_lon"] = "\(lat)_\(lng)"
if locName.count > 0 {
dict["locName"] = titleLbl!.text
......
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