Commit c8bcd08b authored by pete谢兆麟's avatar pete谢兆麟

已知bug修复

parent 25b0487d
...@@ -175,7 +175,7 @@ extension YHServiceCenterViewController { ...@@ -175,7 +175,7 @@ extension YHServiceCenterViewController {
titleLabel = { titleLabel = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setTitle("我的服务", for: .normal) button.setTitle("我的我的服务", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 21) button.titleLabel?.font = UIFont.PFSC_M(ofSize: 21)
button.setTitleColor(UIColor.mainTextColor, for: .normal) button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setImage(UIImage(named: "service_center_select_step"), for: .normal) button.setImage(UIImage(named: "service_center_select_step"), for: .normal)
...@@ -229,7 +229,7 @@ extension YHServiceCenterViewController { ...@@ -229,7 +229,7 @@ extension YHServiceCenterViewController {
make.top.equalTo(53) make.top.equalTo(53)
make.left.equalTo(47) make.left.equalTo(47)
make.height.equalTo(29) make.height.equalTo(29)
make.width.equalTo(102) make.width.equalTo(18 + 126)
} }
} else { } else {
navBar.isHidden = true navBar.isHidden = true
...@@ -353,6 +353,7 @@ extension YHServiceCenterViewController { ...@@ -353,6 +353,7 @@ extension YHServiceCenterViewController {
func getStep() { func getStep() {
serviceCenterMainReqVM.getServiceMainData(orderId: orderId) {[weak self] success, error in serviceCenterMainReqVM.getServiceMainData(orderId: orderId) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.model.product_type = self.serviceCenterMainReqVM.mainModel.category_type
if self.serviceCenterMainReqVM.mainModel.stage == 3 { if self.serviceCenterMainReqVM.mainModel.stage == 3 {
self.isCanSelectStep = true self.isCanSelectStep = true
} }
......
...@@ -55,4 +55,5 @@ struct YHServiceCenterMainModel: SmartCodable { ...@@ -55,4 +55,5 @@ struct YHServiceCenterMainModel: SmartCodable {
var stage: Int = 0 // 1 申请阶段 2办证阶段 3续期阶段 var stage: Int = 0 // 1 申请阶段 2办证阶段 3续期阶段
var master_id: Int = 0 // 批次 var master_id: Int = 0 // 批次
var status: Int = 0 var status: Int = 0
var category_type: Int = 0 // 1.优才 2.高才
} }
...@@ -93,7 +93,7 @@ class YHServiceMoreAlertView: UIView { ...@@ -93,7 +93,7 @@ class YHServiceMoreAlertView: UIView {
guideButton = { guideButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setImage(UIImage(named: "service_more_guide"), for: .normal) button.setImage(UIImage(named: "service_more_guide"), for: .normal)
button.setTitle("获批操作指引", for: .normal) button.setTitle("申请操作指引", for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal) button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 16) button.titleLabel?.font = UIFont.PFSC_R(ofSize: 16)
button.addTarget(self, action: #selector(guideButtonClick), for: .touchUpInside) button.addTarget(self, action: #selector(guideButtonClick), for: .touchUpInside)
......
...@@ -14,7 +14,8 @@ class YHServiceOrderGuideTipsView: UIView { ...@@ -14,7 +14,8 @@ class YHServiceOrderGuideTipsView: UIView {
var block: Block? var block: Block?
var isShow: Bool = true var isShow: Bool = true
var type: Int = 0 var type: Int = 0
var tableView: UITableView!
var image: String = "service_order_guideline_one"
lazy var blackMaskView: UIView = { lazy var blackMaskView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5) view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
...@@ -95,15 +96,6 @@ class YHServiceOrderGuideTipsView: UIView { ...@@ -95,15 +96,6 @@ class YHServiceOrderGuideTipsView: UIView {
return button return button
}() }()
lazy var myScrollView: UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .clear
view.showsVerticalScrollIndicator = false
view.delegate = self
return view
}()
lazy var bkgImageV: UIImageView = { lazy var bkgImageV: UIImageView = {
let imageV = UIImageView() let imageV = UIImageView()
imageV.image = UIImage(named: "service_order_guideline_one") imageV.image = UIImage(named: "service_order_guideline_one")
...@@ -150,14 +142,14 @@ class YHServiceOrderGuideTipsView: UIView { ...@@ -150,14 +142,14 @@ class YHServiceOrderGuideTipsView: UIView {
func isShow(flag: Bool) { func isShow(flag: Bool) {
buttonContentView.isHidden = !flag buttonContentView.isHidden = !flag
if flag { if flag {
myScrollView.snp.remakeConstraints { make in tableView.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(120) make.top.equalToSuperview().offset(120)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.width.equalTo(KScreenWidth) make.width.equalTo(KScreenWidth)
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 120) make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 120)
} }
} else { } else {
myScrollView.snp.remakeConstraints { make in tableView.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(68) make.top.equalToSuperview().offset(68)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 68) make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - 98 - 68)
...@@ -201,37 +193,15 @@ extension YHServiceOrderGuideTipsView { ...@@ -201,37 +193,15 @@ extension YHServiceOrderGuideTipsView {
@objc func clickLeftBtn() { @objc func clickLeftBtn() {
leftBtn.isSelected = true leftBtn.isSelected = true
rightBtn.isSelected = false rightBtn.isSelected = false
if let tmpImage = UIImage(named:"service_order_guideline_one") { image = "service_order_guideline_one"
let scale = Double(tmpImage.size.height / tmpImage.size.width) tableView.reloadData()
let imageH = scale * (KScreenWidth - 40)
bkgImageV.snp.remakeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(imageH)
}
bkgImageV.image = tmpImage
myScrollView.contentSize = CGSize(width: KScreenWidth, height: imageH)
}
} }
@objc func clickRightBtn() { @objc func clickRightBtn() {
leftBtn.isSelected = false leftBtn.isSelected = false
rightBtn.isSelected = true rightBtn.isSelected = true
if let tmpImage = UIImage(named:"service_order_guideline_two") { image = "service_order_guideline_two"
let scale = Double(tmpImage.size.height / tmpImage.size.width) tableView.reloadData()
let imageH = scale * (KScreenWidth - 40)
bkgImageV.snp.remakeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(imageH)
}
bkgImageV.image = tmpImage
myScrollView.contentSize = CGSize(width: KScreenWidth, height: imageH)
}
} }
} }
...@@ -291,16 +261,13 @@ private extension YHServiceOrderGuideTipsView { ...@@ -291,16 +261,13 @@ private extension YHServiceOrderGuideTipsView {
} }
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
// whiteContentView.snp.makeConstraints { make in
// make.left.right.bottom.equalToSuperview()
// make.height.equalTo(whiteHeight)
// }
whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight) whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight)
whiteContentView.addSubview(bkgImageV2) whiteContentView.addSubview(bkgImageV2)
bkgImageV2.snp.makeConstraints { make in bkgImageV2.snp.makeConstraints { make in
make.top.left.right.equalToSuperview() make.top.left.right.equalToSuperview()
make.height.equalTo(68) make.height.equalTo(68.fix)
} }
whiteContentView.addSubview(bottomView) whiteContentView.addSubview(bottomView)
...@@ -333,46 +300,116 @@ private extension YHServiceOrderGuideTipsView { ...@@ -333,46 +300,116 @@ private extension YHServiceOrderGuideTipsView {
make.width.equalTo(108) make.width.equalTo(108)
} }
whiteContentView.addSubview(myScrollView) tableView = {
myScrollView.snp.makeConstraints { make in let tableView = UITableView(frame: .zero, style: .grouped)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.dataSource = self
tableView.delegate = self
tableView.register(cellWithClass: YHServiceOrderGuideTableViewCell.self)
return tableView
}()
whiteContentView.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(120) make.top.equalToSuperview().offset(120)
make.right.left.equalToSuperview() make.right.left.equalToSuperview()
make.height.equalTo(whiteHeight - 98 - 120) make.height.equalTo(whiteHeight - 98 - 120)
} }
if let tmpImage = UIImage(named:"service_order_guideline_one") {
let scale = Double(tmpImage.size.height / tmpImage.size.width)
let imageH = scale * (KScreenWidth - 40)
myScrollView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(imageH)
}
myScrollView.contentSize = CGSize(width: KScreenWidth, height: imageH)
}
} }
} }
extension YHServiceOrderGuideTipsView : UIScrollViewDelegate { extension YHServiceOrderGuideTipsView: UITableViewDelegate, UITableViewDataSource {
func scrollViewDidScroll(_ scrollView: UIScrollView) { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHServiceOrderGuideTableViewCell.self)
cell.dataSource = image
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 1024.fix
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 6
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
class YHServiceOrderGuideTableViewCell: UITableViewCell {
var centerImageView: UIImageView!
var dataSource: String? {
didSet {
centerImageView.image = UIImage(named: dataSource ?? "")
}
}
var imageUrl: String? {
didSet {
guard let url = URL(string: imageUrl) else { return }
centerImageView.kf.setImage(with: url)
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
if !ischeckBeforeFlag { // Configure the view for the selected state
let scrollViewContentHeight = scrollView.contentSize.height }
let scrollOffsetThreshold = scrollViewContentHeight - scrollView.bounds.size.height
required init?(coder: NSCoder) {
// 当前滚动位置 super.init(coder: coder)
let currentOffset = scrollView.contentOffset.y }
if currentOffset > scrollOffsetThreshold { // 接近底部
// 滚动到了底部 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
ischeckBeforeFlag = true super.init(style: style, reuseIdentifier: reuseIdentifier)
stopTimer() selectionStyle = .none
setButtonEnable(true) setupUI()
} else { }
// 没有滚动到底部
} func setupUI() {
self.backgroundColor = .white
centerImageView = {
let imageView = UIImageView()
imageView.isUserInteractionEnabled = true
imageView.image = UIImage(named: "invitation_with_gifts_first")
imageView.contentMode = .scaleAspectFill
return imageView
}()
contentView.addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in
make.top.equalTo(10)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-10)
} }
} }
} }
...@@ -80,10 +80,6 @@ class YHGCWorkExperienceListViewController: YHBaseViewController { ...@@ -80,10 +80,6 @@ class YHGCWorkExperienceListViewController: YHBaseViewController {
bottom.nextblock = { [weak self] in bottom.nextblock = { [weak self] in
guard let self = self else { return } guard let self = self else { return }
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
if dataSource.count == 0 {
YHHUD.flash(message: "至少需要有一条工作经验")
return
}
for item in dataSource { for item in dataSource {
if item.vacant_num ?? 0 > 0 { if item.vacant_num ?? 0 > 0 {
showPrompt = true showPrompt = true
......
...@@ -26,6 +26,10 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell { ...@@ -26,6 +26,10 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell {
} }
} }
var selectDataSource: [ASAttributedString]? var selectDataSource: [ASAttributedString]?
lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: UIViewController.current)
return tool
}()
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
// Initialization code // Initialization code
...@@ -93,6 +97,12 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell { ...@@ -93,6 +97,12 @@ class YHGCWorkListHasDocTableViewCell: UITableViewCell {
let a: ASAttributedString = .init("备注:赴港同意书为目前在职公司盖章提供,若目前未就职于任何公司,则由档案所在地人才中心盖章提供,", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x8893a2))) let a: ASAttributedString = .init("备注:赴港同意书为目前在职公司盖章提供,若目前未就职于任何公司,则由档案所在地人才中心盖章提供,", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x8893a2)))
let b: ASAttributedString = .init("查看示例模板", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor),.underline(.single),.action { let b: ASAttributedString = .init("查看示例模板", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor),.underline(.single),.action {
//跳转模版 //跳转模版
let viewModel = YHBaseViewModel()
viewModel.getPublicImageUrl(self.url) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:"")
}
}
}) })
label.attributed.text = a + b label.attributed.text = a + b
return label return label
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "service_center_In_section@2x.png", "filename" : "Group 2033196223@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "service_center_In_section@3x.png", "filename" : "Group 2033196223@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "service_order_guideline_one@2x.png", "filename" : "Frame 2033196309@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "service_order_guideline_one@3x.png", "filename" : "Frame 2033196309@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "3@2x.png", "filename" : "Frame 2033196309@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "3@3x.png", "filename" : "Frame 2033196309@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
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