Commit 8f612d8a authored by Steven杜宇's avatar Steven杜宇

// lint

parent 467450ed
...@@ -454,7 +454,7 @@ extension YHHomePageViewModel { ...@@ -454,7 +454,7 @@ extension YHHomePageViewModel {
self.arrHomeNewsData = result.data self.arrHomeNewsData = result.data
curPageIndex = 1 curPageIndex = 1
} else { } else {
curPageIndex = curPageIndex + 1 curPageIndex += 1
self.arrHomeNewsData?.append(contentsOf: result.data) self.arrHomeNewsData?.append(contentsOf: result.data)
} }
......
...@@ -433,7 +433,9 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa ...@@ -433,7 +433,9 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
if item.type == .confirmGoHKInfo { if item.type == .confirmGoHKInfo {
// 请您确认第X批赴港信息 // 请您确认第X批赴港信息
let cell = tableView.dequeueReusableCell(withIdentifier: YHSelectApplicantGroupCell.cellReuseIdentifier, for: indexPath) as! YHSelectApplicantGroupCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHSelectApplicantGroupCell.cellReuseIdentifier, for: indexPath) as? YHSelectApplicantGroupCell else {
return UITableViewCell()
}
cell.dataModel = arr[indexPath.row] cell.dataModel = arr[indexPath.row]
cell.refreshBlock = { cell.refreshBlock = {
[weak self] in [weak self] in
......
...@@ -145,7 +145,9 @@ extension YHPrincipleApprovedMailViewController: UITableViewDelegate, UITableVie ...@@ -145,7 +145,9 @@ extension YHPrincipleApprovedMailViewController: UITableViewDelegate, UITableVie
} }
} }
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleEnvelopeCell guard let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier, for: indexPath) as? YHPrincipleEnvelopeCell else {
return UITableViewCell()
}
if 0 <= indexPath.row && indexPath.row < items.count { if 0 <= indexPath.row && indexPath.row < items.count {
let m = items[indexPath.row] let m = items[indexPath.row]
if m is YHPrincipleEnvelopeModel { if m is YHPrincipleEnvelopeModel {
......
...@@ -452,10 +452,10 @@ private extension YHHKPlanItemView { ...@@ -452,10 +452,10 @@ private extension YHHKPlanItemView {
if index == stringLength - 1 { if index == stringLength - 1 {
if isPreDone == false { if isPreDone == false {
totalNumber = totalNumber + 1 totalNumber += 1
if totalNumber <= maxNumbler { if totalNumber <= maxNumbler {
returStrn = returStrn + String(scalar) returStrn += String(scalar)
} else { } else {
return returStrn return returStrn
} }
......
...@@ -231,7 +231,9 @@ extension YHLookResignResultViewController: UITableViewDelegate, UITableViewData ...@@ -231,7 +231,9 @@ extension YHLookResignResultViewController: UITableViewDelegate, UITableViewData
} else { } else {
if indexPath.section == 0 { if indexPath.section == 0 {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreePeopleTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateThreePeopleTableViewCell guard let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreePeopleTableViewCell.cellReuseIdentifier, for: indexPath) as? YHLookResignResultStateThreePeopleTableViewCell else {
return UITableViewCell()
}
approveCell.title = "第" + convertNumberToChineseText(self.viewModel.dataModel.data.data[indexPath.row].number) + "批" approveCell.title = "第" + convertNumberToChineseText(self.viewModel.dataModel.data.data[indexPath.row].number) + "批"
approveCell.dataSource = self.viewModel.dataModel.data.data[indexPath.row] approveCell.dataSource = self.viewModel.dataModel.data.data[indexPath.row]
if indexPath.row == self.viewModel.dataModel.data.data.count - 1 { if indexPath.row == self.viewModel.dataModel.data.data.count - 1 {
...@@ -241,7 +243,9 @@ extension YHLookResignResultViewController: UITableViewDelegate, UITableViewData ...@@ -241,7 +243,9 @@ extension YHLookResignResultViewController: UITableViewDelegate, UITableViewData
} }
return approveCell return approveCell
} else { } else {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreeTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateThreeTableViewCell guard let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreeTableViewCell.cellReuseIdentifier, for: indexPath) as? YHLookResignResultStateThreeTableViewCell else {
return UITableViewCell()
}
approveCell.state = state approveCell.state = state
approveCell.dataSource = self.viewModel.dataModel.data.letters approveCell.dataSource = self.viewModel.dataModel.data.letters
return approveCell return approveCell
......
...@@ -298,7 +298,7 @@ extension YHResignCertificateDetailPassPortViewController: UITableViewDelegate, ...@@ -298,7 +298,7 @@ extension YHResignCertificateDetailPassPortViewController: UITableViewDelegate,
let isNeed = item.isNeed ?? false let isNeed = item.isNeed ?? false
if isShow && message.count == 0 && isNeed { if isShow && message.count == 0 && isNeed {
tatol = tatol + 20 tatol += 20
} }
} }
return CGFloat(501 + tatol) return CGFloat(501 + tatol)
......
...@@ -168,7 +168,9 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV ...@@ -168,7 +168,9 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV
} }
if self.isTogether { // 选择是一起递交 if self.isTogether { // 选择是一起递交
let cell2 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointTimeSingleCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointTimeSingleCell guard let cell2 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointTimeSingleCell.cellReuseIdentifier, for: indexPath) as? YHResignAppointTimeSingleCell else {
return UITableViewCell()
}
cell2.updateModel(self.oneGroupTimeSetting) cell2.updateModel(self.oneGroupTimeSetting)
cell2.switchBlock = { cell2.switchBlock = {
[weak self] isOn in [weak self] isOn in
...@@ -187,13 +189,17 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV ...@@ -187,13 +189,17 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV
if 0 <= indexPath.row && indexPath.row < selectGroupArr.count { if 0 <= indexPath.row && indexPath.row < selectGroupArr.count {
let model = selectGroupArr[indexPath.row] let model = selectGroupArr[indexPath.row]
if model.isHaveAppointed { // 已确认在港 只展示信息 if model.isHaveAppointed { // 已确认在港 只展示信息
let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignHaveAppointedApplicantsInfoCell.cellReuseIdentifier, for: indexPath) as! YHResignHaveAppointedApplicantsInfoCell guard let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignHaveAppointedApplicantsInfoCell.cellReuseIdentifier, for: indexPath) as? YHResignHaveAppointedApplicantsInfoCell else {
return UITableViewCell()
}
cell1.updateModel(model) cell1.updateModel(model)
return cell1 return cell1
} }
// 分批次cell // 分批次cell
let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointTimeMultipleCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointTimeMultipleCell guard let cell1 = tableView.dequeueReusableCell(withIdentifier: YHResignAppointTimeMultipleCell.cellReuseIdentifier, for: indexPath) as? YHResignAppointTimeMultipleCell else {
return UITableViewCell()
}
cell1.updateModel(model) cell1.updateModel(model)
cell1.selectUserBlock = { cell1.selectUserBlock = {
[weak self] member, isSelect, groupIndex in [weak self] member, isSelect, groupIndex in
......
...@@ -318,9 +318,9 @@ class YHResignAppointTimeViewController: YHBaseViewController { ...@@ -318,9 +318,9 @@ class YHResignAppointTimeViewController: YHBaseViewController {
let dict = ["member_id": "\($0.id)"] let dict = ["member_id": "\($0.id)"]
return dict return dict
} }
let dict = ["ready_to_submit_at": group.getSubmitHKTime(), let dict:[String: Any] = ["ready_to_submit_at": group.getSubmitHKTime(),
"leave_hk_at": group.notleaveHK ? "" : group.getLeaveHKTime(), "leave_hk_at": group.notleaveHK ? "" : group.getLeaveHKTime(),
"users": allUserInfoArr] as! [String: Any] "users": allUserInfoArr]
batchs.append(dict) batchs.append(dict)
if allAppointUsers.count <= 0 { if allAppointUsers.count <= 0 {
......
...@@ -25,7 +25,7 @@ class YHBasicInfoFillModel: SmartCodable { ...@@ -25,7 +25,7 @@ class YHBasicInfoFillModel: SmartCodable {
class BackgroundModel: SmartCodable { class BackgroundModel: SmartCodable {
var subset: [SubsetModel] = [] var subset: [SubsetModel] = []
var background_member: Background_memberModel? var background_member: BackgroundMemberModel?
required init() { required init() {
...@@ -41,7 +41,7 @@ class SubsetModel: SmartCodable { ...@@ -41,7 +41,7 @@ class SubsetModel: SmartCodable {
} }
} }
class Background_memberModel: SmartCodable { class BackgroundMemberModel: SmartCodable {
var has: String = "" var has: String = ""
var info: String = "" var info: String = ""
...@@ -53,8 +53,8 @@ class Background_memberModel: SmartCodable { ...@@ -53,8 +53,8 @@ class Background_memberModel: SmartCodable {
class SpouseModel: SmartCodable { class SpouseModel: SmartCodable {
var id: Int = 0 var id: Int = 0
var subset_name: String = "" var subset_name: String = ""
var child_departure: Background_memberModel? var child_departure: BackgroundMemberModel?
var child_deny: Background_memberModel? var child_deny: BackgroundMemberModel?
required init() { required init() {
} }
...@@ -62,11 +62,11 @@ class SpouseModel: SmartCodable { ...@@ -62,11 +62,11 @@ class SpouseModel: SmartCodable {
class ApplicantModel: SmartCodable { class ApplicantModel: SmartCodable {
var id: Int = 0 var id: Int = 0
var has_conviction: Background_memberModel? var has_conviction: BackgroundMemberModel?
var has_departure: Background_memberModel? var has_departure: BackgroundMemberModel?
var has_deny: Background_memberModel? var has_deny: BackgroundMemberModel?
var has_breaking_law: Background_memberModel? var has_breaking_law: BackgroundMemberModel?
var has_other_id: Background_memberModel? var has_other_id: BackgroundMemberModel?
required init() { required init() {
......
...@@ -200,7 +200,7 @@ extension YHEducationDetailVC: UITableViewDelegate, UITableViewDataSource { ...@@ -200,7 +200,7 @@ extension YHEducationDetailVC: UITableViewDelegate, UITableViewDataSource {
if item is YHFormDetailItem { if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem guard let detailItem = item as? YHFormDetailItem else { return UITableViewCell() }
let cellType = getCellType(detailItem) let cellType = getCellType(detailItem)
if cellType == .inputText { if cellType == .inputText {
guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as? YHFormItemInputTextCell else { guard let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as? YHFormItemInputTextCell else {
......
...@@ -200,9 +200,11 @@ extension YHEducationInfoListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -200,9 +200,11 @@ extension YHEducationInfoListVC: UITableViewDelegate, UITableViewDataSource {
if item is YHFormTitleItem { // 是标题 if item is YHFormTitleItem { // 是标题
let formItem = item as! YHFormTitleItem guard let formItem = item as? YHFormTitleItem else { return UITableViewCell() }
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()
}
let isNeedWrap = (formItem.type == .mainApplicantProfessionalQualification) let isNeedWrap = (formItem.type == .mainApplicantProfessionalQualification)
// 决定右边按钮显示样式 // 决定右边按钮显示样式
......
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