|
@@ -17,6 +17,7 @@ class KXSFSubmitOrderViewController: KXBaseViewController ,UITableViewDataSource
|
17
|
17
|
var isSelectAddress = false
|
18
|
18
|
var goodDetailData : NSMutableArray = NSMutableArray.init()
|
19
|
19
|
var addressId = ""
|
|
20
|
+ let kSFSaveAreaDataPath = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)[0] + "/SFSaveAreaData.plst"
|
20
|
21
|
|
21
|
22
|
override func viewDidLoad() {
|
22
|
23
|
super.viewDidLoad()
|
|
@@ -42,13 +43,27 @@ class KXSFSubmitOrderViewController: KXBaseViewController ,UITableViewDataSource
|
42
|
43
|
}
|
43
|
44
|
|
44
|
45
|
lazy var tableView : UITableView = {
|
45
|
|
- var table : UITableView = UITableView.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: SCREEN_HEIGHT - NavHeight - 50), style: .grouped)
|
|
46
|
+ var table : UITableView = UITableView.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: SCREEN_HEIGHT - NavHeight - 50 - safeBottomHeight), style: .grouped)
|
46
|
47
|
table.delegate = self
|
47
|
48
|
table.dataSource = self
|
48
|
49
|
table.separatorColor = .none
|
49
|
50
|
table.register(KXSFSubmitTableVIewCell.classForCoder(), forCellReuseIdentifier: otherCellID)
|
50
|
51
|
table.register(KXSFBuySubmitOrderTableCell.classForCoder(), forCellReuseIdentifier: goodCellID)
|
51
|
52
|
var headerView : KXSFSubmitTableViewHeader = KXSFSubmitTableViewHeader.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: 100))
|
|
53
|
+ let data : NSMutableArray = NSKeyedUnarchiver.unarchiveObject(withFile: kSFSaveAreaDataPath) as? NSMutableArray ?? NSMutableArray.init()
|
|
54
|
+ for model : KXSFMineAreaModel in data as! [KXSFMineAreaModel] {
|
|
55
|
+ if model.isNormal == true{
|
|
56
|
+ headerView.addBtn.removeFromSuperview()
|
|
57
|
+ addressId = model.id!
|
|
58
|
+ isSelectAddress = true
|
|
59
|
+ headerView.nameLabel.isHidden = false
|
|
60
|
+ headerView.addressLabel.isHidden = false
|
|
61
|
+ headerView.arrImage.isHidden = false
|
|
62
|
+ headerView.nameLabel.text = "收货人:" + model.consignee!
|
|
63
|
+ headerView.addressLabel.text = model.address!
|
|
64
|
+ footView.button.backgroundColor = UIColor.base()
|
|
65
|
+ }
|
|
66
|
+ }
|
52
|
67
|
weak var weakSelf = self
|
53
|
68
|
headerView.bk_(whenTapped: {
|
54
|
69
|
let vc : KXSFAreaViewController = KXSFAreaViewController()
|
|
@@ -73,7 +88,7 @@ class KXSFSubmitOrderViewController: KXBaseViewController ,UITableViewDataSource
|
73
|
88
|
}()
|
74
|
89
|
|
75
|
90
|
lazy var footView : KXSFSubmitOrderFootView = {
|
76
|
|
- var footVIew = KXSFSubmitOrderFootView.init(frame: CGRect(x: 0, y: SCREEN_HEIGHT-50-TabbarHeight-safeBottomHeight, width: SCREEN_WIDTH, height: 50))
|
|
91
|
+ var footVIew = KXSFSubmitOrderFootView.init(frame: CGRect(x: 0, y: SCREEN_HEIGHT-50-NavHeight-safeBottomHeight, width: SCREEN_WIDTH, height: 50))
|
77
|
92
|
footVIew.backgroundColor = UIColor.white
|
78
|
93
|
footVIew.delegate = self
|
79
|
94
|
return footVIew
|