Commit 53e9ee36 authored by Steven杜宇's avatar Steven杜宇

// lint

parent 3878f029
...@@ -816,7 +816,7 @@ extension YHCertificateAppointViewController { ...@@ -816,7 +816,7 @@ extension YHCertificateAppointViewController {
return $0.isSelected == true return $0.isSelected == true
} }
let users = selectUsers.map { let users = selectUsers.map {
let dict:[String: Any] = ["id": $0.id, let dict: [String: Any] = ["id": $0.id,
"type": $0.type, "type": $0.type,
"name": $0.name] "name": $0.name]
return dict return dict
......
...@@ -376,7 +376,9 @@ extension YHQualificationDetailVC: UITableViewDelegate, UITableViewDataSource { ...@@ -376,7 +376,9 @@ extension YHQualificationDetailVC: UITableViewDelegate, UITableViewDataSource {
} }
if item is YHFormDetailItem { if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem guard let detailItem = item as? YHFormDetailItem else {
return .defaultType
}
if detailItem.type == .conferCity { if detailItem.type == .conferCity {
if detailInfo.isCollegeInAboard() { if detailInfo.isCollegeInAboard() {
......
...@@ -371,13 +371,15 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource { ...@@ -371,13 +371,15 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
let cellType = getCellType(item) let cellType = getCellType(item)
if cellType == .title { // 标题 if cellType == .title { // 标题
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as? YHFormItemTitleCell else {
return UITableViewCell()
}
cell.setTitleAndSubTitle(title: item.getTitle()) cell.setTitleAndSubTitle(title: item.getTitle())
return cell return cell
} }
if cellType == .addItem { // 新增item cell if cellType == .addItem { // 新增item cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemAddCell.cellReuseIdentifier, for: indexPath) as! YHFormItemAddCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemAddCell.cellReuseIdentifier, for: indexPath) as? YHFormItemAddCell else { return UITableViewCell() }
cell.title = item.getTitle() cell.title = item.getTitle()
cell.clickBlock = { cell.clickBlock = {
[weak self] in [weak self] in
...@@ -390,10 +392,14 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource { ...@@ -390,10 +392,14 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
} }
if item is YHFormDetailItem { if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem guard let detailItem = item as? YHFormDetailItem else {
return UITableViewCell()
}
if cellType == .inputText { // 输入文字cell if cellType == .inputText { // 输入文字cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as! YHFormItemInputTextCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as? YHFormItemInputTextCell else {
return UITableViewCell()
}
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
...@@ -484,7 +490,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource { ...@@ -484,7 +490,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
} }
if cellType == .selectSheet { // 点击选择列表cell if cellType == .selectSheet { // 点击选择列表cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as? YHFormItemSelectSheetCell else {
return UITableViewCell()
}
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
...@@ -496,7 +504,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource { ...@@ -496,7 +504,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
if cellType == .twoChoice { // 双项选择cell if cellType == .twoChoice { // 双项选择cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as? YHFormItemDoubleChoiceCell else {
return UITableViewCell()
}
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = item.getTitle() cell.title = item.getTitle()
...@@ -550,7 +560,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource { ...@@ -550,7 +560,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
if cellType == .degreeDetailInfo { // 学位cell if cellType == .degreeDetailInfo { // 学位cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDegreeInfoCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDegreeInfoCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDegreeInfoCell.cellReuseIdentifier, for: indexPath) as? YHFormItemDegreeInfoCell else {
return UITableViewCell()
}
if let degreeArr = self.spouse?.hasDegreeJson { if let degreeArr = self.spouse?.hasDegreeJson {
if indexPath.row-2 < degreeArr.count { if indexPath.row-2 < degreeArr.count {
......
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