Commit 5affcb65 authored by Steven杜宇's avatar Steven杜宇

Merge branch 'develop' into duyu

parents 2b7e40d1 ec5ee6d3
......@@ -118,6 +118,10 @@
04E86E612B85CAEA00A35F4B /* YHWorkExampleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E602B85CAEA00A35F4B /* YHWorkExampleModel.swift */; };
04E86E632B85EE9A00A35F4B /* YHWorkIntroductionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E622B85EE9A00A35F4B /* YHWorkIntroductionViewModel.swift */; };
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */; };
04E86E682B87175E00A35F4B /* YHWorkExperienceDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E672B87175E00A35F4B /* YHWorkExperienceDetailModel.swift */; };
04E86E6A2B87352700A35F4B /* YHCompanySelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E692B87352600A35F4B /* YHCompanySelectViewController.swift */; };
04E86E6C2B87374600A35F4B /* YHCompanyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E6B2B87374600A35F4B /* YHCompanyModel.swift */; };
04E86E6E2B87388100A35F4B /* YHCompanyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E6D2B87388100A35F4B /* YHCompanyViewModel.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A50AB89B2B81E96E00C227DE /* YHOtherInfoFillModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50AB89A2B81E96E00C227DE /* YHOtherInfoFillModel.swift */; };
A50AB89D2B81F1FB00C227DE /* YHOtherInfoFillViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50AB89C2B81F1FB00C227DE /* YHOtherInfoFillViewModel.swift */; };
......@@ -398,6 +402,10 @@
04E86E602B85CAEA00A35F4B /* YHWorkExampleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExampleModel.swift; sourceTree = "<group>"; };
04E86E622B85EE9A00A35F4B /* YHWorkIntroductionViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkIntroductionViewModel.swift; sourceTree = "<group>"; };
04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginManager.swift; sourceTree = "<group>"; };
04E86E672B87175E00A35F4B /* YHWorkExperienceDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceDetailModel.swift; sourceTree = "<group>"; };
04E86E692B87352600A35F4B /* YHCompanySelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCompanySelectViewController.swift; sourceTree = "<group>"; };
04E86E6B2B87374600A35F4B /* YHCompanyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCompanyModel.swift; sourceTree = "<group>"; };
04E86E6D2B87388100A35F4B /* YHCompanyViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCompanyViewModel.swift; sourceTree = "<group>"; };
58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; };
987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A50AB89A2B81E96E00C227DE /* YHOtherInfoFillModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherInfoFillModel.swift; sourceTree = "<group>"; };
......@@ -847,6 +855,7 @@
04E86E242B81EA1000A35F4B /* YHWorkItemListViewModel.swift */,
04E86E372B83306800A35F4B /* YHWorkExperienceViewModel.swift */,
04E86E622B85EE9A00A35F4B /* YHWorkIntroductionViewModel.swift */,
04E86E6D2B87388100A35F4B /* YHCompanyViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
......@@ -855,8 +864,10 @@
isa = PBXGroup;
children = (
04E86E262B81EA1000A35F4B /* YHWorkItemListModel.swift */,
04E86E672B87175E00A35F4B /* YHWorkExperienceDetailModel.swift */,
04E86E392B83321600A35F4B /* YHWorkExperienceModel.swift */,
04E86E602B85CAEA00A35F4B /* YHWorkExampleModel.swift */,
04E86E6B2B87374600A35F4B /* YHCompanyModel.swift */,
);
path = Model;
sourceTree = "<group>";
......@@ -868,6 +879,7 @@
04E86E332B83268F00A35F4B /* YHWorkExperienceViewController.swift */,
04E86E562B848D5A00A35F4B /* YHWorkIntroductionViewController.swift */,
04E86E582B84AD6200A35F4B /* YHWorkExampleViewController.swift */,
04E86E692B87352600A35F4B /* YHCompanySelectViewController.swift */,
);
path = C;
sourceTree = "<group>";
......@@ -1858,6 +1870,7 @@
A5D6AB1D2B46AAFB001C10A5 /* YHHomePageViewModel.swift in Sources */,
A596C3A32B84D9100067BBB8 /* YHOtherSelecteItemView.swift in Sources */,
A5ACE9552B4564F7002C94D2 /* YHTabBarViewController.swift in Sources */,
04E86E6C2B87374600A35F4B /* YHCompanyModel.swift in Sources */,
A5167B332B6A3A2D0084C08F /* YHPersonInfoBaseViewController.swift in Sources */,
A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */,
A5FD63FA2B68D95700D1D9DA /* YHPersonInfoIdentityCardModel.swift in Sources */,
......@@ -1872,6 +1885,7 @@
A5FD63C72B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift in Sources */,
04E86E572B848D5A00A35F4B /* YHWorkIntroductionViewController.swift in Sources */,
04E86E5F2B84D07000A35F4B /* YHWorkExampleMessageTableViewCell.swift in Sources */,
04E86E682B87175E00A35F4B /* YHWorkExperienceDetailModel.swift in Sources */,
041B528F2B5E620E007EBCEB /* YHFormItemInputTextCell.swift in Sources */,
A5ACE9402B4564F7002C94D2 /* String+Extension.swift in Sources */,
A5ACE9482B4564F7002C94D2 /* YHHUDWariningView.swift in Sources */,
......@@ -1921,6 +1935,7 @@
0468D4792B68A08600CFB916 /* YHAddressViewController.swift in Sources */,
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */,
042FBBCB2B65058000F9DE23 /* YHChildBasicInfoVC.swift in Sources */,
04E86E6A2B87352700A35F4B /* YHCompanySelectViewController.swift in Sources */,
04E86E452B8357EC00A35F4B /* YHItemModel.swift in Sources */,
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
......@@ -1935,6 +1950,7 @@
A5FD63DA2B66060800D1D9DA /* YHScoreOptionsView.swift in Sources */,
A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */,
A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */,
04E86E6E2B87388100A35F4B /* YHCompanyViewModel.swift in Sources */,
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
04C693712B735C6F004C1758 /* YHQualificationDetailVC.swift in Sources */,
04E86E492B8445F400A35F4B /* YHWorkActionView.swift in Sources */,
......
......@@ -397,10 +397,6 @@ class YHFormPickerView: UIView {
return "职业"
case .professionCertificate:
return "选择证书名称"
case .language:
return "选择语言能力"
case .professionalSkill:
return "选择专业技能行业"
case .degreeCategory:
return "选择学位类型"
}
......@@ -676,11 +672,6 @@ extension YHFormPickerView {
} else if title == "其他" {
return .degreeCategory(.others)
}
case .language:
return .none
case .professionalSkill:
return .none
}
return .none
}
......
......@@ -33,10 +33,6 @@ enum YHFormPickerViewType: Int {
case degreeLocation
// 专业证书
case professionCertificate
// 语言能力
case language
// 专业技能行业
case professionalSkill
// 学位类型
case degreeCategory
}
......
......@@ -9,43 +9,15 @@
import UIKit
import AttributedString
//
// YHFormPickerView.swift
// galaxy
//
// Created by edy on 2024/1/29.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
// 【 用法 Usage】
/*
// (1) 直接传type
YHFormPickerView.show(type: .certificate, selectType: .certificate(.otherStatelessTravelPassport)) { selectType in
// 选择类型的标题
print(selectType.title)
}
// (2) 直接传字符串值
YHFormPickerView.show(type: .certificate, selectTitle: "公务通行证") { selectType in
// 选择类型的标题
print(selectType.title)
}
*/
enum YHOtherPickerViewType: Int {
// 按自然顺序递增
case none = 0
// 语言能力
case language
// 专业技能行业
case professionalSkill
}
//class YHOtherPickerView {
//
// let type: YHFormPickerViewSubType
// lazy var title = {
// return type.title
// }()
//
// init(type: YHFormPickerViewSubType) {
// self.type = type
// }
//}
struct YHOtherPickerViewItemData {
let title : String
......@@ -54,7 +26,7 @@ struct YHOtherPickerViewItemData {
}
class YHOtherPickerView: UIView {
private var type : YHFormPickerViewType = .none
private var type : YHOtherPickerViewType = .none
var arrData : [YHOtherPickerViewItemData] = []
private var selectType:YHFormPickerViewSubType?
......@@ -141,7 +113,7 @@ class YHOtherPickerView: UIView {
}()
init(type: YHFormPickerViewType) {
init(type: YHOtherPickerViewType) {
super.init(frame: UIScreen.main.bounds)
self.createUI()
self.type = type
......@@ -157,7 +129,7 @@ class YHOtherPickerView: UIView {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
static func show(type:YHFormPickerViewType, selectType:YHFormPickerViewSubType? = nil, callBack: @escaping ((YHOtherPickerViewItemData)->Void)) {
static func show(type:YHOtherPickerViewType, selectType:YHFormPickerViewSubType? = nil, callBack: @escaping ((YHOtherPickerViewItemData)->Void)) {
let picker = YHOtherPickerView(type: type)
// picker.selectType = selectType
......@@ -246,8 +218,7 @@ class YHOtherPickerView: UIView {
// }
}
func getTitle(type: YHFormPickerViewType)-> String {
func getTitle(type: YHOtherPickerViewType)-> String {
switch type {
case .language:
return "选择语言能力"
......
//
// YHCompanySelectViewController.swift
// galaxy
//
// Created by EDY on 2024/2/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCompanySelectViewController: YHBaseViewController {
public var backLocationStringController: ((String) -> Void)?
var searchView: UITextField!
var sureButton: UIButton!
var tableView: UITableView!
var searchDataSource: [YHCompanyModelListModel]?
var viewModel: YHCompanyViewModel?
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "用人单位"
viewModel = YHCompanyViewModel()
setView()
getData()
}
func getData() {
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
searchView = {
let searchBar = UITextField()
searchBar.placeholder = "请输入用人单位全称"
searchBar.backgroundColor = UIColor(hex: 0xf8f9fb)
searchBar.keyboardType = .default
searchBar.delegate = self
searchBar.layer.cornerRadius = 21
searchBar.leftView = UIView(frame: CGRect(x: 0, y: 0, width: 16, height: 42))
searchBar.leftViewMode = .always
return searchBar
}()
view.addSubview(searchView)
searchView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 16)
make.height.equalTo(42)
make.left.equalTo(16)
make.right.equalTo(-16)
}
sureButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x2274ee)
button.titleLabel?.font = kBoldFont(size: 16)
button.contentHorizontalAlignment = .center
button.setTitle("保存", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 18
button.addTarget(self, action: #selector(submit), for: .touchUpInside)
return button
}()
view.addSubview(sureButton)
sureButton.snp.makeConstraints { make in
make.centerY.equalTo(searchView.snp.centerY)
make.height.equalTo(36)
make.width.equalTo(80)
make.right.equalTo(-16)
}
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHCompanyTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 78)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.equalTo(view)
}
}
@objc func submit() {
if let backLocationStringController = backLocationStringController {
backLocationStringController(searchView.text ?? "")
self.navigationController?.popViewController()
}
}
}
extension YHCompanySelectViewController: UITextFieldDelegate {
func textFieldDidChangeSelection(_ textField: UITextField) {
if textField.text == "" {
tableView.isHidden = true
} else {
viewModel?.requestCompany(textField.text ?? "") { [weak self] success, error in
guard let self = self else { return }
self.searchDataSource = success
self.tableView.isHidden = false
self.tableView.reloadData()
}
}
}
}
extension YHCompanySelectViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return searchDataSource?.count ?? 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHCompanyTableViewCell.self)
cell.titleLabel.text = searchDataSource?[indexPath.row].name
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 44
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let text = searchDataSource?[indexPath.row].name ?? ""
if let backLocationStringController = backLocationStringController {
backLocationStringController(text)
self.navigationController?.popViewController()
}
}
}
class YHCompanyTableViewCell: UITableViewCell {
var titleLabel: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
titleLabel = {
let label = UILabel()
label.font = kFont(size: 13)
label.textColor = UIColor(hex:0x222222)
return label
}()
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.centerY.equalToSuperview()
make.height.equalTo(20)
}
}
}
......@@ -111,6 +111,7 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
cell.clickBlock = {[weak self] model in
guard let self = self else { return }
let vc = YHWorkExperienceViewController()
vc.workExperienceID = "\(model.id ?? 0)"
self.navigationController?.pushViewController(vc, animated: true)
}
cell.deleteBlock = {[weak self] model in
......@@ -124,6 +125,11 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
guard let self = self else { return }
self.isMore = isMore
}
cell.newWorkBlock = {[weak self] in
guard let self = self else { return }
let vc = YHWorkExperienceViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
return cell
}
......
......@@ -17,6 +17,8 @@ class YHWorkExperienceViewController: YHBaseViewController {
var baseDataSource: [YHSectionWorkExperienceModel]?
var introductionDataSource: [YHWorkItemListModel]?
var fileDataSource: [String]?
var workExperienceID: String?
override func viewDidLoad() {
super.viewDidLoad()
viewModel = YHWorkExperienceViewModel()
......@@ -29,6 +31,11 @@ class YHWorkExperienceViewController: YHBaseViewController {
func getData() {
viewModel.requestWorkExample { success, error in
}
viewModel.requestWorkDetail(workExperienceID ?? "") {[weak self] success, error in
guard let self = self else { return }
self.updateDataSource()
}
updateDataSource()
}
......@@ -161,7 +168,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
cell.dataSource = baseDataSource?[indexPath.row]
cell.workExperienceBlock = {[weak self] model in
guard let self = self else { return }
// self.viewModel.updateModel(model)
self.viewModel.updateModel(model)
self.updateDataSource()
}
return cell
......
//
// YHCompanyModel.swift
// galaxy
//
// Created by EDY on 2024/2/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHCompanyModel: SmartCodable {
var current_page: Int?
var first_page_url: String?
var from: Int?
var last_page: Int?
var last_page_url: String?
var next_page_url: String?
var path: String?
var prev_page_url: String?
var to: Int?
var total: Int?
var data: [YHCompanyModelListModel]?
}
struct YHCompanyModelListModel: SmartCodable {
var id: Int?
var name: String?
var customer_num: Int?
var is_del: Int?
var website_link: String?
var introduce: String?
}
//
// YHWorkExperienceDetailModel.swift
// galaxy
//
// Created by EDY on 2024/2/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
import SmartCodable
struct YHWorkExperienceDetailModel: SmartCodable {
var id: Int?
var order_id: Int?
var company_name: String?
var is_famous_enterprise: Int?
var duty: String?
var entry_time: String?
var departure_time: String?
var industry: String?
var location: YHAddressModel?
var location_aboard: Int?
var professional_level: Int?
var professional_other: String?
var position: String?
var remark: String?
var old_id: Int?
var created_at: String?
var updated_at: String?
var is_show: Int?
var deleted_at: String?
var operator_name: String?
var operator_english_name: String?
var operator_id: Int?
var work_certificate: String?
var executives_certificate: String?
var is_executives: Int?
var wduty: String?
var highlights: String?
var file: [String]?
var not_need_upload_file: Int?
var company_member_total: Int?
var administrative_level: Int?
var company_manage_total: Int?
var top_manager_start_at: String?
var top_manager_end_at: String?
var master_of_important_project: Int?
var match_listing: Int?
var is_synthetic: Int?
var step: Int?
var create_from_appid: Int?
var update_from_appid: Int?
var international_work_experience: Int?
var turnover: Int?
var business_nature: String?
var company_website: String?
var company_introduce: String?
var business_remark: String?
var is_project_introduction: Int?
var customer_center_id: Int?
var projects: [String]?
}
......@@ -17,7 +17,6 @@ struct YHWorkModel: SmartCodable {
struct YHWorkItemListModel: SmartCodable {
var id: Int?
var order_id: Int?
var company_name: String?
......@@ -25,5 +24,4 @@ struct YHWorkItemListModel: SmartCodable {
var entry_time: String?
var departure_time: Bool?
var vacant_num: Int?
}
......@@ -316,7 +316,15 @@ class YHWorkExperienceItemView: UIView {
// }
// }
case .unit:
break
let vc = YHCompanySelectViewController()
vc.backLocationStringController = { (country) in
self.dataSource?.message = country
self.updateAllViews()
if let block = self.block {
block(self.dataSource ?? YHWorkExperienceModel())
}
}
UIViewController.current?.navigationController?.pushViewController(vc)
case .nature:
break
case .certificate:
......
......@@ -11,9 +11,11 @@ import UIKit
class YHWorkExperienceListTableViewCell: UITableViewCell {
typealias ExperienceListBlock = (_ model: YHWorkItemListModel) -> ()
typealias IsMoreBlock = (_ isMore: Bool) -> ()
typealias NewWorkBlock = () -> ()
var clickBlock: ExperienceListBlock?
var deleteBlock: ExperienceListBlock?
var isMoreBlock: IsMoreBlock?
var newWorkBlock: NewWorkBlock?
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
......@@ -141,6 +143,12 @@ class YHWorkExperienceListTableViewCell: UITableViewCell {
bottomView = {
let view = YHWorkItemAddView()
view.clickBlock = {[weak self] in
guard let self = self else { return }
if let block = self.newWorkBlock {
block()
}
}
return view
}()
centerView.addSubview(bottomView)
......
......@@ -108,6 +108,11 @@ class YHWorkExperienceTextItemView: UIView {
}
promptsLabel.text = dataSource.prompts
messageTextField.text = dataSource.message
if dataSource.message?.count != 0 {
promptsLabel.isHidden = true
} else {
promptsLabel.isHidden = false
}
}
}
......@@ -117,5 +122,10 @@ extension YHWorkExperienceTextItemView: UITextViewDelegate {
if let block = block {
block(dataSource ?? YHWorkExperienceModel())
}
if textView.text.count != 0 {
promptsLabel.isHidden = true
} else {
promptsLabel.isHidden = false
}
}
}
......@@ -62,12 +62,10 @@ class YHWorkFileItemView: UIView {
make.width.equalTo(28)
make.centerY.equalTo(titleLabel.snp.centerY)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
// titleLabel.text = dataSource.title
}
......
//
// YHCompanyViewModel.swift
// galaxy
//
// Created by EDY on 2024/2/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCompanyViewModel: YHBaseViewModel {
override init() {
super.init()
}
func requestCompany(_ key: String, callBackBlock:@escaping (_ success: [YHCompanyModelListModel]?, _ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + "frontend/workInfo/company-search?company=\(key)&page_size=20"
YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
guard let model = NetBaseModel.deserialize(dict: json) else {
let error : YHErrorModel = YHErrorModel(errorCode:YHErrorCode.dictParseError.rawValue,errorMsg: YHErrorCode.dictParseError.description())
callBackBlock([],error)
return
}
let dic = model.data?.peel
guard let result = YHCompanyModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
callBackBlock([],nil)
return
}
callBackBlock(result.data, nil)
} failBlock: { err in
callBackBlock([],err)
}
}
}
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