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