Commit 06e5e458 authored by Steven杜宇's avatar Steven杜宇

// 旅行

parent 34d3d2d7
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
import UIKit import UIKit
enum YHAdopterCardType { enum YHAdopterCardType {
case travel case travel // 港澳通行证
case china case china
case resident case resident
case birth case birth
case id case id
case other case other
case marry case marry
case chinaTravel case chinaTravel // 护照
case chinaLife case chinaLife // 中国居留许可签证
} }
struct YHAdopterCardModel { struct YHAdopterCardModel {
......
...@@ -103,6 +103,14 @@ class YHAdopterCardExampleView: UIView { ...@@ -103,6 +103,14 @@ class YHAdopterCardExampleView: UIView {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
static func exampleView(type: YHAdopterCardType?) -> YHAdopterCardExampleView {
let view = YHAdopterCardExampleView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.type = type
return view
}
func setView() { func setView() {
backgroundColor = UIColor(hex: 0x000000, alpha: 0.5) backgroundColor = UIColor(hex: 0x000000, alpha: 0.5)
centerView = { centerView = {
...@@ -205,6 +213,10 @@ class YHAdopterCardExampleView: UIView { ...@@ -205,6 +213,10 @@ class YHAdopterCardExampleView: UIView {
dismiss() dismiss()
} }
@objc func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() { @objc func dismiss() {
removeFromSuperview() removeFromSuperview()
} }
......
...@@ -387,7 +387,17 @@ extension YHTravelDocsPreparationDetailVC: UITableViewDelegate, UITableViewDataS ...@@ -387,7 +387,17 @@ extension YHTravelDocsPreparationDetailVC: UITableViewDelegate, UITableViewDataS
// 证件类型 1-护照 2-中国旅行证 3-港澳通行证 4-存款证明 5-其他 // 证件类型 1-护照 2-中国旅行证 3-港澳通行证 4-存款证明 5-其他
[weak self] type in [weak self] type in
guard let self = self else { return } guard let self = self else { return }
var templateType: YHAdopterCardType? = nil
if type == 1 { // 护照
templateType = .chinaTravel
} else if type == 2 { // 中国旅行证
templateType = .chinaLife
} else if type == 3 { // 港澳通行证
templateType = .travel
}
YHAdopterCardExampleView.exampleView(type: templateType).show()
} }
} }
return cell return cell
......
...@@ -292,6 +292,8 @@ class YHTravelCertificateUploadCell: UITableViewCell { ...@@ -292,6 +292,8 @@ class YHTravelCertificateUploadCell: UITableViewCell {
certificateFrontView.frontLabel.text = frontTitle certificateFrontView.frontLabel.text = frontTitle
certificateBackView.frontLabel.text = backTitle certificateBackView.frontLabel.text = backTitle
// 证件正反面图片 // 证件正反面图片
certificateFrontView.state = !model.isCanEdit
certificateBackView.state = !model.isCanEdit
certificateFrontView.url = model.img_front certificateFrontView.url = model.img_front
certificateBackView.url = model.img_back certificateBackView.url = model.img_back
......
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