Commit 43e428b9 authored by pete谢兆麟's avatar pete谢兆麟

地址选择器逻辑修改

parent df00f10b
......@@ -161,6 +161,7 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
return cell
} else {
let cell = tableView.dequeueReusableCell(withClass: YHMainInformationTableViewCell.self)
cell.country = self.viewModel.mainModel.address.country
cell.dataSource = dataSource?[indexPath.row]
cell.informationBlock = {[weak self] model in
guard let self = self else { return }
......
......@@ -19,6 +19,7 @@ class YHItemView: UIView {
var rightButton: UIButton!
var showPromptLabel: UILabel!
var longTimeButton:UIButton!
var country: String = ""
var dataSource: YHItemModel? {
didSet {
updateAllViews()
......@@ -412,7 +413,17 @@ class YHItemView: UIView {
case .normal:
printLog("不需要跳转")
case .address:
let addressPicker = YHAddressViewController(selectProvince: "台湾省")
var provice = ""
if country.contains("台湾") {
provice = "台湾省"
}
if country.contains("香港") {
provice = "香港特别行政区"
}
if country.contains("澳门") {
provice = "澳门特别行政区"
}
let addressPicker = YHAddressViewController(selectProvince: provice)
addressPicker.backLocationStringController = { (address,province,city,area) in
self.dataSource?.message = address
self.dataSource?.value = [province, city]
......
......@@ -14,6 +14,7 @@ class YHMainInformationTableViewCell: UITableViewCell {
var centerView: UIView!
var titleLabel: UILabel!
var mainItemView: UIView!
var country: String = ""
var dataSource: YHSectionItemModel?{
didSet {
updateAllViews()
......@@ -122,6 +123,7 @@ class YHMainInformationTableViewCell: UITableViewCell {
let itemView = YHItemView()
itemView.dataSource = data
itemView.country = country
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.informationBlock {
......
......@@ -459,6 +459,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
} else {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceTableViewCell.self)
cell.country = self.viewModel.mainModel.location.country
cell.dataSource = baseDataSource?[indexPath.row]
cell.workExperienceBlock = {[weak self] model in
guard let self = self else { return }
......
......@@ -21,7 +21,7 @@ class YHWorkExperienceItemView: UIView {
var rightButton: UIButton!
var showPromptLabel: UILabel!
var longTimeButton:UIButton!
var country: String = ""
var dataSource: YHWorkExperienceModel? {
didSet {
updateAllViews()
......@@ -381,7 +381,17 @@ class YHWorkExperienceItemView: UIView {
case .normal:
printLog("不需要跳转")
case .address:
let addressPicker = YHAddressViewController()
var provice = ""
if country.contains("台湾") {
provice = "台湾省"
}
if country.contains("香港") {
provice = "香港特别行政区"
}
if country.contains("澳门") {
provice = "澳门特别行政区"
}
let addressPicker = YHAddressViewController(selectProvince: provice)
addressPicker.backLocationStringController = { (address,province,city,area) in
self.dataSource?.message = address
self.dataSource?.value = [province, city]
......
......@@ -16,6 +16,7 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
var centerView: UIView!
var titleLabel: UILabel!
var mainItemView: UIView!
var country: String = ""
var dataSource: YHSectionWorkExperienceModel?{
didSet {
updateAllViews()
......@@ -134,6 +135,7 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
}
let itemView = YHWorkExperienceItemView()
itemView.dataSource = data
itemView.country = country
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.workExperienceBlock {
......
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