Commit 20da7d33 authored by pete谢兆麟's avatar pete谢兆麟

Merge commit '4d7a4c8d' into xiezhaolin

parents fe4a1861 4d7a4c8d
......@@ -171,7 +171,6 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
guard let self = self else { return }
if let targetStep = getStepForArrayIndex(index) {
currentStep = targetStep
child.step = targetStep
}
print("index:\(index)")
}
......@@ -196,10 +195,10 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
if let cur = getArrayIndexOfCurrentStep(), let item = stepVCs[safe:cur+1] {
currentStep = item.step
child?.step = item.step
if cur+1 > stepView.maxIndex {
stepView.maxIndex = cur+1
} }
}
}
print("currentIndex:\(currentStep)")
}
}
......@@ -247,7 +246,7 @@ extension YHChildInfoContainerVC {
let dict:[String: Any] = ["order_id":child.orderId,
"relation":child.relation,
"step":child.step,
"step":isSubmit ? currentStep : 0,
"next":isSubmit,
"info":info]
......
......@@ -189,7 +189,6 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
guard let self = self else { return }
if let targetStep = getStepForArrayIndex(index) {
currentStep = targetStep
spouse.step = targetStep
}
print("index:\(index)")
}
......@@ -210,7 +209,7 @@ extension YHSpouseInfoContainerVC {
let dict:[String: Any] = ["order_id":spouse.orderId,
"relation":spouse.relation,
"step":spouse.step,
"step":isSubmit ? currentStep : 0,
"next":isSubmit,
"info":info]
......@@ -245,7 +244,6 @@ extension YHSpouseInfoContainerVC {
if let cur = getArrayIndexOfCurrentStep(), let item = stepVCs[safe:cur+1] {
currentStep = item.step
spouse?.step = item.step
if cur+1 > stepView.maxIndex {
stepView.maxIndex = cur+1
}
......
......@@ -127,7 +127,7 @@ extension YHOtherResidenceFillView {
self.layoutIfNeeded()
}
self.parentViewController?.navigationController?.pushViewController(vc)
UIViewController.current?.navigationController?.pushViewController(vc)
}
......
......@@ -37,16 +37,6 @@ class YHPreviewBaseViewController: YHBaseViewController {
make.left.equalTo(16)
make.right.equalTo(-16)
}
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
// homeTableView.snp.makeConstraints { make in
// make.top.bottom.equalToSuperview()
// make.left.equalTo(16)
// make.right.equalTo(-16)
// }
}
}
......
......@@ -129,9 +129,6 @@ class YHPreviewControllerHoldViewController: UIViewController {
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 55)
listContainerView.frame = CGRect(x: 0, y: 55, width: view.bounds.size.width, height: view.bounds.size.height - 55)
segmentedView.backgroundColor = .white
view.backgroundColor = .yellow//for test hjl
}
}
......
......@@ -48,7 +48,7 @@ extension YHPreviewInfoCell {
holdView.snp.makeConstraints { make in
make.top.equalTo(14)
make.left.equalToSuperview()
make.bottom.equalToSuperview().offset(-40)
make.bottom.equalToSuperview()
make.width.equalTo(contentView.snp.width)
}
......
......@@ -21,12 +21,16 @@ class YHPreviewInfoWorkSummaryView: UIView {
updateUI()
}
}
var arrFiles : [WorkExpFilePreviewModel] = []
}
extension YHPreviewInfoWorkSummaryView {
func updateUI() {
guard let model = dataModel else { return }
removeSubviews()
arrFiles.removeAll()
if model.data.isEmpty == false {
......@@ -45,7 +49,7 @@ extension YHPreviewInfoWorkSummaryView {
var lastTagView : UIView = sessionView
let arr = model.data as? [WorkExpFilePreviewModel] ?? []
for(_,item) in arr.enumerated() {
for(index,item) in arr.enumerated() {
let label : UILabel = UILabel()
label.text = model.title
......@@ -53,6 +57,7 @@ extension YHPreviewInfoWorkSummaryView {
label.font = UIFont.PFSC_R(ofSize: 14)
label.numberOfLines = 0
label.text = item.fileName
label.tag = index
addSubview(label)
label.snp.makeConstraints { make in
make.top.equalTo(lastTagView.snp.bottom).offset(8)
......@@ -60,8 +65,13 @@ extension YHPreviewInfoWorkSummaryView {
make.left.equalToSuperview().offset(kMargin)
make.height.greaterThanOrEqualTo(20) // >=20
}
addSubview(label)
lastTagView = label
arrFiles.append(item)
label.isUserInteractionEnabled = true
let tap = UITapGestureRecognizer(target: self, action:#selector(handleTap))
label.addGestureRecognizer(tap)
}
let tagView : UIView = UIView()
......@@ -76,4 +86,17 @@ extension YHPreviewInfoWorkSummaryView {
}
}
}
@objc func handleTap(_ gestureRecognizer: UITapGestureRecognizer) {
guard let label = gestureRecognizer.view else { return }
if label.tag < arrFiles.count {
let vc = YHImageViewController()
vc.imgString = arrFiles[label.tag].fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
} else {
printLog("error: 数组越界")
}
}
}
......@@ -66,19 +66,8 @@ class YHImageViewController: YHBaseViewController {
func getData() {
self.viewModel.getPublicImageUrl(imgString) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
guard success != nil else { return }
self.resultView.kf.setImage(with: URL(string: success))
}
}
/*
// 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.
}
*/
}
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