Commit ab5efc62 authored by lujunye's avatar lujunye

优化显示

parent 13457957
......@@ -24,11 +24,11 @@ class WebViewController: BaseViewController {
}
var urlStr:String? = ""
var isAddObserver = false
func initInterface() -> () {
let url = URL(string: urlStr!)
let request = URLRequest.init(url: url!, cachePolicy: .reloadRevalidatingCacheData, timeoutInterval: 10)
isAddObserver = true
wkWebView.navigationDelegate = self
wkWebView.load(request)
self.view.addSubview(self.wkWebView)
......@@ -50,7 +50,9 @@ class WebViewController: BaseViewController {
}
deinit {
print("con is deinit")
wkWebView.removeObserver(self, forKeyPath: "estimatedProgress")
if isAddObserver {
wkWebView.removeObserver(self, forKeyPath: "estimatedProgress")
}
}
}
extension WebViewController: WKNavigationDelegate
......
......@@ -430,7 +430,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
make.right.equalTo(-15)
make.bottom.equalTo(self.navbar.snp_bottom).offset(-7)
make.height.equalTo(30)
make.width.equalTo(self.locBtn.bounds.size.width)
make.width.equalTo(locBtn.bounds.size.width)
})
if adrArr.count == 0 {
......@@ -731,7 +731,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc.urlStr = logPayPriceModel!.kjxy_jd
}else if index == 1 {
print("顺丰快件服务协议")
if logPayPriceModel!.kjxy_sf?.count == 0 {
if logPayPriceModel!.kjxy_sf?.count == 0 || logPayPriceModel!.kjxy_sf == nil{
HUD.flash(.label("暂无相关链接"), delay: 1.2)
return
}
......@@ -913,7 +913,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self.selectLoc = (firstPL?.postalAddress?.city)!
self.locBtn.sizeToFit()
self.locBtn.snp_makeConstraints({ (make) in
self.locBtn.snp_updateConstraints({ (make) in
make.right.equalTo(-15)
make.bottom.equalTo(self.navbar.snp_bottom).offset(-7)
make.height.equalTo(30)
......
<?xml version="1.0" encoding="UTF-8"?>
<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">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
......
......@@ -463,7 +463,6 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
if component == 0 {
return self.addressArray.count
} else if component == 1 {
print("alkjdflkasd == ",provinceIndex)
let province = self.addressArray[provinceIndex] as! Dictionary<String,Any>
return (province["city_list"]! as AnyObject).count
} else {
......
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