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

细节修改

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