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

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

# Conflicts:
#	galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
parents 5e89d82e 4d0b6a49
This diff is collapsed.
...@@ -12,7 +12,7 @@ import UIKit ...@@ -12,7 +12,7 @@ import UIKit
正式批 结果页 正式批 结果页
*/ */
class YHOfficialApprovalResultVC2: YHBaseViewController { class YHOfficialApprovalResultVC: YHBaseViewController {
var contentView: YHOffivialApprovalSuccessView! var contentView: YHOffivialApprovalSuccessView!
...@@ -25,7 +25,7 @@ class YHOfficialApprovalResultVC2: YHBaseViewController { ...@@ -25,7 +25,7 @@ class YHOfficialApprovalResultVC2: YHBaseViewController {
lazy var bkgImageV: UIImageView = { lazy var bkgImageV: UIImageView = {
let imageV = UIImageView() let imageV = UIImageView()
imageV.image = UIImage(named: "official_approval_result_bkg") imageV.image = UIImage(named: "official_approval_result_bkg")
imageV.contentMode = .scaleAspectFit imageV.contentMode = .scaleAspectFill
imageV.clipsToBounds = true imageV.clipsToBounds = true
return imageV return imageV
}() }()
...@@ -34,7 +34,7 @@ class YHOfficialApprovalResultVC2: YHBaseViewController { ...@@ -34,7 +34,7 @@ class YHOfficialApprovalResultVC2: YHBaseViewController {
lazy var paperImageV: UIImageView = { lazy var paperImageV: UIImageView = {
let imageV = UIImageView() let imageV = UIImageView()
imageV.image = UIImage(named: "official_approval_result_paper") imageV.image = UIImage(named: "official_approval_result_paper")
imageV.contentMode = .scaleAspectFit imageV.contentMode = .scaleAspectFill
imageV.clipsToBounds = true imageV.clipsToBounds = true
return imageV return imageV
}() }()
...@@ -43,14 +43,44 @@ class YHOfficialApprovalResultVC2: YHBaseViewController { ...@@ -43,14 +43,44 @@ class YHOfficialApprovalResultVC2: YHBaseViewController {
lazy var docImageV: UIImageView = { lazy var docImageV: UIImageView = {
let imageV = UIImageView() let imageV = UIImageView()
imageV.image = UIImage(named: "official_approval_result_doc") imageV.image = UIImage(named: "official_approval_result_doc")
imageV.contentMode = .scaleAspectFit imageV.contentMode = .scaleAspectFill
imageV.clipsToBounds = true
return imageV
}()
//pen
lazy var penImageV: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "official_approval_result_pen")
imageV.contentMode = .scaleAspectFill
imageV.clipsToBounds = true
return imageV
}()
//bottom
lazy var bottomImageV: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "official_approval_result_bottom_shadow")
imageV.contentMode = .scaleAspectFill
imageV.clipsToBounds = true
return imageV
}()
//光线
lazy var lightImageV: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "official_approval_result_top_shadow")
imageV.contentMode = .scaleAspectFill
imageV.clipsToBounds = true imageV.clipsToBounds = true
return imageV return imageV
}() }()
} }
private extension YHOfficialApprovalResultVC2 { private extension YHOfficialApprovalResultVC {
func setupUI() { func setupUI() {
gk_navBarAlpha = 0.0 gk_navBarAlpha = 0.0
...@@ -79,6 +109,7 @@ private extension YHOfficialApprovalResultVC2 { ...@@ -79,6 +109,7 @@ private extension YHOfficialApprovalResultVC2 {
make.width.equalTo(294) make.width.equalTo(294)
make.height.equalTo(530) make.height.equalTo(530)
} }
docImageV.layer.zPosition = 1
contentView = { contentView = {
let view = YHOffivialApprovalSuccessView() let view = YHOffivialApprovalSuccessView()
...@@ -92,8 +123,34 @@ private extension YHOfficialApprovalResultVC2 { ...@@ -92,8 +123,34 @@ private extension YHOfficialApprovalResultVC2 {
make.width.equalTo(294) make.width.equalTo(294)
make.height.equalTo(530) make.height.equalTo(530)
} }
// contentView.backgroundColor = .red
contentView.transform = rotatedTransform() contentView.transform = rotatedTransform()
docImageV.addSubview(penImageV)
penImageV.snp.makeConstraints { make in
make.top.equalToSuperview().offset(170)
make.right.equalToSuperview()
make.width.equalTo(67)
make.height.equalTo(141)
}
penImageV.layer.zPosition = 1
view.addSubview(bottomImageV)
bottomImageV.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(200)
}
bottomImageV.layer.zPosition = 2
view.addSubview(lightImageV)
lightImageV.snp.makeConstraints { make in
make.top.right.bottom.equalToSuperview()
make.height.equalTo(543)
}
lightImageV.layer.zPosition = 3
} }
private func rotatedTransform() -> CGAffineTransform { private func rotatedTransform() -> CGAffineTransform {
......
...@@ -125,8 +125,6 @@ private extension YHOffivialApprovalGuildLineCheckView { ...@@ -125,8 +125,6 @@ private extension YHOffivialApprovalGuildLineCheckView {
} else { } else {
rewardBtn.setTitle("请上滑看完指引后操作(\(maxCount)s)", for: .normal) rewardBtn.setTitle("请上滑看完指引后操作(\(maxCount)s)", for: .normal)
} }
} }
func startTimer() { func startTimer() {
......
...@@ -195,9 +195,7 @@ private extension YHOffivialApprovalSuccessCheckView { ...@@ -195,9 +195,7 @@ private extension YHOffivialApprovalSuccessCheckView {
Timer.scheduledTimer(withTimeInterval: 4, repeats: false) { timer in Timer.scheduledTimer(withTimeInterval: 4, repeats: false) { timer in
self.scrollBgImgV.stopAnimating() self.scrollBgImgV.stopAnimating()
timer.invalidate() timer.invalidate()
self.closeBtn.isHidden = false
self.scrollBgImgV.isHidden = true self.scrollBgImgV.isHidden = true
self.rewardBtn.isEnabled = true
} }
} }
} }
...@@ -282,6 +280,9 @@ private extension YHOffivialApprovalSuccessCheckView { ...@@ -282,6 +280,9 @@ private extension YHOffivialApprovalSuccessCheckView {
currentIndex += 1 currentIndex += 1
} else { } else {
displayLink.invalidate() displayLink.invalidate()
self.closeBtn.isHidden = false
self.rewardBtn.isEnabled = true
} }
} }
} }
...@@ -46,7 +46,7 @@ class YHOffivialApprovalSuccessView: UIView { ...@@ -46,7 +46,7 @@ class YHOffivialApprovalSuccessView: UIView {
item.removeFromSuperview() item.removeFromSuperview()
} }
var h = 80 var h = 60
var index = 0 var index = 0
for item in data { for item in data {
let label = UILabel() let label = UILabel()
......
...@@ -89,8 +89,8 @@ class YHPrincipleApprovedWaitSubmitVC: YHBaseViewController { ...@@ -89,8 +89,8 @@ class YHPrincipleApprovedWaitSubmitVC: YHBaseViewController {
} }
@objc func didUploadBtnClicked() { @objc func didUploadBtnClicked() {
let vc = YHPrincipleReviewListVC() let vc = YHPrincipleUploadListVC()
vc.orderId = 12345 vc.orderId = 150702
navigationController?.pushViewController(vc) navigationController?.pushViewController(vc)
} }
......
// //
// YHPrincipleReviewListVC.swift // YHPrincipleUploadListVC.swift
// galaxy // galaxy
// //
// Created by edy on 2024/4/29. // Created by edy on 2024/4/29.
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
import SmartCodable import SmartCodable
import AttributedString import AttributedString
class YHPrincipleReviewListVC: YHBaseViewController { class YHPrincipleUploadListVC: YHBaseViewController {
var orderId: Int = 0 var orderId: Int = 0
var items: [SmartCodable] = [] var items: [SmartCodable] = []
...@@ -165,14 +165,14 @@ class YHPrincipleReviewListVC: YHBaseViewController { ...@@ -165,14 +165,14 @@ class YHPrincipleReviewListVC: YHBaseViewController {
} }
} }
extension YHPrincipleReviewListVC { extension YHPrincipleUploadListVC {
@objc func didUploadBtnClicked() { @objc func didUploadBtnClicked() {
} }
} }
extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource { extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return items.count return items.count
...@@ -237,14 +237,7 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -237,14 +237,7 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < items.count { if 0 <= indexPath.section && indexPath.section < items.count {
#if DEBUG
if true {
let vc = YHPrincipleCongratulationVC()
self.navigationController?.pushViewController(vc)
return
}
#endif
} }
} }
......
...@@ -155,14 +155,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD ...@@ -155,14 +155,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < items.count { if 0 <= indexPath.section && indexPath.section < items.count {
#if DEBUG
if true {
let vc = YHPrincipleCongratulationVC()
self.navigationController?.pushViewController(vc)
return
}
#endif
} }
} }
...@@ -177,13 +170,13 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD ...@@ -177,13 +170,13 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView() let view = UIView()
var titleLabel = UILabel() let titleLabel = UILabel()
titleLabel.numberOfLines = 0 titleLabel.numberOfLines = 0
var name = self.viewModel.waitResultModel.applicant.userName var name = self.viewModel.waitResultModel.applicant.userName
if name.count > 5 { if name.count > 5 {
name = String(name.prefix(5)) + "..." name = String(name.prefix(5)) + "..."
} }
var callName = self.viewModel.waitResultModel.applicant.sex == 2 ? "女士" : "先生" let callName = self.viewModel.waitResultModel.applicant.sex == 2 ? "女士" : "先生"
let title: ASAttributedString = .init("您好,\(name)\(callName)!", .font(UIFont.PFSC_M(ofSize: 24)),.foreground(UIColor.mainTextColor)) let title: ASAttributedString = .init("您好,\(name)\(callName)!", .font(UIFont.PFSC_M(ofSize: 24)),.foreground(UIColor.mainTextColor))
titleLabel.attributed.text = title titleLabel.attributed.text = title
view.addSubview(titleLabel) view.addSubview(titleLabel)
......
...@@ -175,8 +175,6 @@ class YHPrincipleAgreementModel: SmartCodable { ...@@ -175,8 +175,6 @@ class YHPrincipleAgreementModel: SmartCodable {
var redTips: String = "" var redTips: String = ""
// 是否展开 // 是否展开
var isUnfold: Bool = false var isUnfold: Bool = false
//
var fileList:[String] = []
required init() { required init() {
......
...@@ -16,6 +16,7 @@ class YHPrincipleUploadFileCell: UITableViewCell { ...@@ -16,6 +16,7 @@ class YHPrincipleUploadFileCell: UITableViewCell {
var iconImgV: UIImageView! var iconImgV: UIImageView!
var titleLabel: UILabel! var titleLabel: UILabel!
var timeLabel: UILabel! var timeLabel: UILabel!
var editBtn: UIButton!
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
...@@ -26,9 +27,9 @@ class YHPrincipleUploadFileCell: UITableViewCell { ...@@ -26,9 +27,9 @@ class YHPrincipleUploadFileCell: UITableViewCell {
super.init(coder: coder) super.init(coder: coder)
} }
func updateModel(_ str: String) { func updateModel(_ model: YHPrincipleContentUrlModel) {
titleLabel.text = str titleLabel.text = model.name
timeLabel.text = "上传于2023.02.06" timeLabel.text = model.updated_at
} }
func setupUI() { func setupUI() {
...@@ -40,15 +41,19 @@ class YHPrincipleUploadFileCell: UITableViewCell { ...@@ -40,15 +41,19 @@ class YHPrincipleUploadFileCell: UITableViewCell {
titleLabel = UILabel() titleLabel = UILabel()
titleLabel.font = UIFont.PFSC_M(ofSize: 14) titleLabel.font = UIFont.PFSC_M(ofSize: 14)
titleLabel.textColor = UIColor.mainTextColor titleLabel.textColor = UIColor.mainTextColor
titleLabel.text = "新公司在职证明.pdf" titleLabel.text = "文件名称"
self.addSubview(titleLabel) self.addSubview(titleLabel)
timeLabel = UILabel() timeLabel = UILabel()
timeLabel.font = UIFont.PFSC_R(ofSize: 11) timeLabel.font = UIFont.PFSC_R(ofSize: 11)
timeLabel.textColor = UIColor.labelTextColor2 timeLabel.textColor = UIColor.labelTextColor2
timeLabel.text = "上传于2024.12.12" timeLabel.text = "上传于0000.00.00"
self.addSubview(timeLabel) self.addSubview(timeLabel)
editBtn = UIButton()
editBtn.setImage(UIImage(named: "my_cer_btn_edit"), for: .normal)
self.addSubview(editBtn)
iconImgV.snp.makeConstraints { make in iconImgV.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(16)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
...@@ -68,5 +73,11 @@ class YHPrincipleUploadFileCell: UITableViewCell { ...@@ -68,5 +73,11 @@ class YHPrincipleUploadFileCell: UITableViewCell {
make.height.equalTo(20) make.height.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-16)
} }
editBtn.snp.makeConstraints { make in
make.width.height.equalTo(16)
make.centerY.equalToSuperview()
make.right.equalTo(-20)
}
} }
} }
...@@ -27,7 +27,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -27,7 +27,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleUploadStatusCell" static let cellReuseIdentifier = "YHPrincipleUploadStatusCell"
var itemModel:YHPrincipleAgreementModel? var itemModel:YHPrincipleAgreementModel?
var items: [String] = [] var items: [YHPrincipleContentUrlModel] = []
var expandClick:((Bool)->())? var expandClick:((Bool)->())?
var status: YHPrincipleUploadStatus = .preUpload var status: YHPrincipleUploadStatus = .preUpload
...@@ -169,7 +169,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -169,7 +169,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
itemModel = model itemModel = model
items.removeAll() items.removeAll()
// items.append(contentsOf: model.fileList) items.append(contentsOf: model.content_url)
contentView.removeSubviews() contentView.removeSubviews()
self.dotLineLayer.removeFromSuperlayer() self.dotLineLayer.removeFromSuperlayer()
...@@ -269,15 +269,16 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -269,15 +269,16 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
} }
tableView.snp.remakeConstraints { make in tableView.snp.remakeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(model.fileList.count <= 0 ? 0 : 16) make.top.equalTo(detailLabel.snp.bottom).offset(model.content_url.count <= 0 ? 0 : 16)
make.left.equalTo(0) make.left.equalTo(0)
make.right.equalTo(0) make.right.equalTo(0)
var listHeight = 0.0 var listHeight = 0.0
if model.fileList.count > 0 { if model.content_url.count > 0 {
listHeight = Double(model.fileList.count) * 55.0 + Double(model.fileList.count-1) * 8.0 listHeight = Double(model.content_url.count) * 55.0 + Double(model.content_url.count-1) * 8.0
} }
make.height.equalTo(listHeight) make.height.equalTo(listHeight)
} }
tableView.reloadData()
uploadBtn.snp.remakeConstraints { make in uploadBtn.snp.remakeConstraints { make in
make.left.equalTo(16) make.left.equalTo(16)
...@@ -425,6 +426,10 @@ extension YHPrincipleUploadStatusCell: UITableViewDataSource, UITableViewDelegat ...@@ -425,6 +426,10 @@ extension YHPrincipleUploadStatusCell: UITableViewDataSource, UITableViewDelegat
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadFileCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadFileCell let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadFileCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadFileCell
if 0 <= indexPath.row, indexPath.row < items.count {
let model: YHPrincipleContentUrlModel = items[indexPath.row]
cell.updateModel(model)
}
return cell return cell
} }
......
...@@ -62,17 +62,17 @@ class YHPrincleViewModel: YHBaseViewModel { ...@@ -62,17 +62,17 @@ class YHPrincleViewModel: YHBaseViewModel {
return return
} }
self.envelopModel = resultModel self.envelopModel = resultModel
self.envelopModel = self.getEnvelopModel() // self.envelopModel = self.getEnvelopModel()
callback?(true, nil) callback?(true, nil)
} else { } else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg) let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
self.envelopModel = self.getEnvelopModel() // self.envelopModel = self.getEnvelopModel()
callback?(false, err) callback?(false, err)
} }
} failBlock: { err in } failBlock: { err in
self.envelopModel = self.getEnvelopModel() // self.envelopModel = self.getEnvelopModel()
callback?(false, err) callback?(false, err)
} }
} }
......
...@@ -103,6 +103,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -103,6 +103,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
// let vc = YHOfficialApprovalResultVC2() // let vc = YHOfficialApprovalResultVC2()
// self?.navigationController?.pushViewController(vc) //for test hjl // self?.navigationController?.pushViewController(vc) //for test hjl
} }
view.evaluateBlock = { view.evaluateBlock = {
[weak self] in [weak self] in
......
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