Commit 1be88d79 authored by David黄金龙's avatar David黄金龙

细节修改

parent 1aee84a5
......@@ -69,6 +69,9 @@ class YHUploadCertificateVC: YHBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
orderId = 150661 //for test hjl
loadData()
}
}
......@@ -137,9 +140,9 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if let model = viewModel.uploadCertificateDataListModel {
if section == 0 {
return model.small_whites.count
return model.small_whites.count + 1
} else if section == 1 {
return model.id_cards.count
return model.id_cards.count + 1
}
}
return 0
......@@ -148,7 +151,15 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if 0 <= indexPath.section && indexPath.section < items.count {
if indexPath.row == 0 {
let warningCell = tableView.dequeueReusableCell(withIdentifier: YHUploadCertificateTitleCell.cellReuseIdentifier, for: indexPath)
let warningCell = tableView.dequeueReusableCell(withIdentifier: YHUploadCertificateTitleCell.cellReuseIdentifier, for: indexPath) as! YHUploadCertificateTitleCell
var title = ""
if indexPath.section == 0 {
title = "小白条"
} else {
title = "香港身份证"
}
warningCell.updateTitle(title)
return warningCell
} else {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHUploadCertificateDetailCell.cellReuseIdentifier, for: indexPath) as! YHUploadCertificateDetailCell
......
......@@ -95,16 +95,16 @@ private extension YHUploadCertificateDetailCell {
func updateCell() {
if isLastCell {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(8, 8));
let layer = CAShapeLayer();
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(8, 8))
let layer = CAShapeLayer()
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
whiteContentView.layer.mask = layer
whiteContentView.clipsToBounds = true
lineView.isHidden = true
} else {
whiteContentView.layer.mask = nil;
whiteContentView.layer.mask = nil
lineView.isHidden = false
}
}
......
......@@ -90,4 +90,11 @@ class YHUploadCertificateTitleCell: UITableViewCell {
self.whiteContentView.clipsToBounds = true
}
}
func updateTitle(_ title : String) {
titleLable.text = title
}
}
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