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

// 旅行

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