Commit f1f402f1 authored by Steven杜宇's avatar Steven杜宇

//

parent cfed9d0b
......@@ -139,7 +139,7 @@ class YHTravelDocsPreparationDetailVC: YHBaseViewController {
}
// 头部提示
let tipsArr = viewModel.getTipsWithType(self.type)
let tipsArr = viewModel.getTipsWithType(self.type, date: self.viewModel.travelDetailModel?.latest_validaty_date ?? "")
let item1 = YHTravelCerSectionItem(type: .tips, tipsArr: tipsArr)
sectionItems.append(item1)
......
......@@ -308,6 +308,15 @@ class YHTravelCertificateUploadCell: UITableViewCell {
// 证件正反面图片
certificateFrontView.state = !model.isCanEdit
certificateBackView.state = !model.isCanEdit
var frontDefaultImg = "credentials_default_front"
var backDefaultImg = "credentials_default_back"
if model.type == 2 { // 中国居留许可证
frontDefaultImg = "credentials_default_residence_front"
}
certificateFrontView.defaultImageName = frontDefaultImg
certificateBackView.defaultImageName = backDefaultImg
certificateFrontView.url = model.img_front
certificateBackView.url = model.img_back
......
......@@ -113,10 +113,10 @@ extension YHTravelDocsPreparationViewModel {
extension YHTravelDocsPreparationViewModel {
func getTextWithType(type: Int) -> ASAttributedString {
func getTextWithType(type: Int, date:String) -> ASAttributedString {
if type == 0 {
return .init("上传《港澳通行证》(需有效期≥dd-mm-yyyy)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
return .init("上传《港澳通行证》(需有效期≥\(date))", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 1 {
......@@ -131,7 +131,7 @@ extension YHTravelDocsPreparationViewModel {
}
if type == 3 {
return .init("上传《护照》(需有效期≥dd-mm-yyyy)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
return .init("上传《护照》(需有效期≥\(date))", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 4 {
......@@ -140,20 +140,20 @@ extension YHTravelDocsPreparationViewModel {
return .init("", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
func getTipsWithType(_ type: YHTravelDocsType) -> [ASAttributedString] {
func getTipsWithType(_ type: YHTravelDocsType, date: String) -> [ASAttributedString] {
if type == .HK {
return [self.getTextWithType(type: 0),
self.getTextWithType(type: 1)]
return [self.getTextWithType(type: 0, date: date),
self.getTextWithType(type: 1, date: date),]
}
if type == .chinesePassPort {
return [self.getTextWithType(type: 2)]
return [self.getTextWithType(type: 2, date: date),]
}
if type == .forignPassPort {
return [self.getTextWithType(type: 3),
self.getTextWithType(type: 4)]
return [self.getTextWithType(type: 3, date: date),
self.getTextWithType(type: 4, date: date),]
}
return []
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "港澳通行证背面@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "港澳通行证背面@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "港澳通行证正面@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "港澳通行证正面@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "中国居留许可签证@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "中国居留许可签证@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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