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

// lint

parent 3878f029
......@@ -816,7 +816,7 @@ extension YHCertificateAppointViewController {
return $0.isSelected == true
}
let users = selectUsers.map {
let dict:[String: Any] = ["id": $0.id,
let dict: [String: Any] = ["id": $0.id,
"type": $0.type,
"name": $0.name]
return dict
......
......@@ -376,7 +376,9 @@ extension YHQualificationDetailVC: UITableViewDelegate, UITableViewDataSource {
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
guard let detailItem = item as? YHFormDetailItem else {
return .defaultType
}
if detailItem.type == .conferCity {
if detailInfo.isCollegeInAboard() {
......
......@@ -371,13 +371,15 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
let cellType = getCellType(item)
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())
return 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.clickBlock = {
[weak self] in
......@@ -390,10 +392,14 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
guard let detailItem = item as? YHFormDetailItem else {
return UITableViewCell()
}
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.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
......@@ -484,7 +490,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
}
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.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
......@@ -496,7 +504,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
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.title = item.getTitle()
......@@ -550,7 +560,9 @@ extension YHSpouseBasicInfoVC: UITableViewDelegate, UITableViewDataSource {
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 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