Commit 36a35c6c authored by David黄金龙's avatar David黄金龙

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

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 我的证件
  // 我的证件
  //  证书过滤UI
parents 39268e49 afdf6a25
......@@ -208,6 +208,8 @@
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; };
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; };
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; };
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; };
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; };
......@@ -573,6 +575,8 @@
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateResourceUploadVC.swift; sourceTree = "<group>"; };
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; };
0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; };
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; };
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; };
04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; };
......@@ -1411,6 +1415,7 @@
A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */,
A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */,
A5EF213A2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift */,
0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -1420,6 +1425,7 @@
children = (
04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */,
0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */,
0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */,
0477E17B2BA4238400436346 /* YHMaterialListViewController.swift */,
A58A8C8E2BA6978100632765 /* YHMineCertificateEntryViewController.swift */,
A5EF21302BA6DF94005027E6 /* YHMineSchemeViewController.swift */,
......@@ -2255,6 +2261,7 @@
A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */,
045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */,
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */,
045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */,
......@@ -2364,6 +2371,7 @@
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */,
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */,
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
045EEE822B9F171A0022A143 /* YHPersonInfoIdentityCardModel.swift in Sources */,
045EEE952B9F171A0022A143 /* YHPreviewInfoCertificateInformationItemsView.swift in Sources */,
045EEEBB2B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift in Sources */,
......
......@@ -176,6 +176,7 @@ extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewD
navigationController?.pushViewController(vc)
} else if model.type == 2 {
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
} else if model.type == 3 {
......
......@@ -13,7 +13,9 @@ import IQKeyboardManagerSwift
class YHCertificateResourceUploadVC: YHBaseViewController {
var orderId : Int?
var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"]
var viewModel: YHCertificateViewModel = YHCertificateViewModel()
lazy var tableView: UITableView = {
......@@ -122,3 +124,31 @@ extension YHCertificateResourceUploadVC: JXSegmentedListContainerViewListDelegat
return view
}
}
extension YHCertificateResourceUploadVC {
func requestList() {
let params = [
"order_id" : orderId ?? 0,
"node": "1",
"state": "",
"category_id": "",
"status_all": "",
"keywork": "",
"template_cate_id": "",
"supplement_ids": []] as [String: Any]
viewModel.getCertificateList(params: params) {
listInfo, error in
if let listInfo = listInfo {
let arr = listInfo.supplementList
}
if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
YHHUD.flash(message: errorMsg, duration:3)
}
}
}
}
//
// YHCertificateSearchViewController.swift
// galaxy
//
// Created by edy on 2024/3/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateSearchViewController: YHBaseViewController {
var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"]
var viewModel: YHCertificateViewModel = YHCertificateViewModel()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.estimatedSectionHeaderHeight = 14.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHCertificateInfoCell.self, forCellReuseIdentifier: YHCertificateInfoCell.cellReuseIdentifier)
return tableView
}()
lazy var searchView:UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(searchBar)
searchBar.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.size.equalTo(CGSize(width: KScreenWidth-32.0, height:YHCertificateSearchBar.height))
}
return view
}()
lazy var searchBar: YHCertificateSearchBar = {
let bar = YHCertificateSearchBar(frame:CGRect(x: 0, y: 0, width:KScreenWidth-32, height:YHCertificateSearchBar.height))
return bar
}()
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = .white
self.gk_navTitle = "资料搜索".local
createUI()
}
func createUI() {
view.addSubview(searchView)
view.addSubview(tableView)
searchView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(32+YHCertificateSearchBar.height)
}
tableView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(searchView.snp.bottom)
}
}
}
extension YHCertificateSearchViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let item = items[indexPath.section]
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateInfoCell.cellReuseIdentifier, for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 14.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
......@@ -19,15 +19,22 @@ class YHMaterialListViewController: YHBaseViewController {
static let segmentHeight = 53.0
var orderId : Int?
lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar()
bar.title = "资料上传".local
bar.showLeftSecondButtonType(.search)
bar.backBlock = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popViewController(animated: true)
}
bar.leftSecondBtnClick = {
print("点击搜索")
[weak self] in
guard let self = self else { return }
let vc = YHCertificateSearchViewController()
self.navigationController?.pushViewController(vc)
}
return bar
}()
......@@ -68,21 +75,20 @@ class YHMaterialListViewController: YHBaseViewController {
return JXSegmentedListContainerView(dataSource: self, type: .collectionView)
}()
lazy var searchView:UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(searchBar)
searchBar.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.size.equalTo(CGSize(width: KScreenWidth-32.0, height:YHCertificateSearchBar.height))
lazy var filterBtn: YHCertificateFilterButton = {
let btn = YHCertificateFilterButton.filterBtn()
btn.clickBlock = {
[weak self] select in
guard let self = self else { return }
filterSheetView.show()
}
return view
return btn
}()
lazy var searchBar: YHCertificateSearchBar = {
let bar = YHCertificateSearchBar(frame:CGRect(x: 0, y: 0, width:KScreenWidth-32, height:YHCertificateSearchBar.height))
return bar
lazy var filterSheetView: YHCertificateFilterView = {
let view = YHCertificateFilterView.sheetView
// view.
return view
}()
override func viewDidLoad() {
......@@ -95,6 +101,7 @@ class YHMaterialListViewController: YHBaseViewController {
}
view.addSubview(navBar)
view.addSubview(segmentedView)
view.addSubview(filterBtn)
view.addSubview(listContainerView)
navBar.snp.makeConstraints { make in
......@@ -103,10 +110,17 @@ class YHMaterialListViewController: YHBaseViewController {
make.height.equalTo(k_Height_NavContentBar)
}
segmentedView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.left.equalToSuperview()
make.right.equalToSuperview().offset(-21-18)
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(Self.segmentHeight)
}
filterBtn.snp.makeConstraints { make in
make.width.height.equalTo(YHCertificateFilterButton.width)
make.centerY.equalTo(segmentedView.snp.centerY)
make.right.equalToSuperview().offset(-18)
}
listContainerView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(segmentedView.snp.bottom)
......
......@@ -13,6 +13,7 @@ import UIKit
class YHMineCertificateEntryViewController: YHBaseViewController {
var orderId : Int?
private let certificateReqVM : YHCertificateViewModel = YHCertificateViewModel()
private lazy var topBkg : UIView = {
......@@ -162,6 +163,10 @@ extension YHMineCertificateEntryViewController : UITableViewDelegate,UITableView
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.section)")
let vc = YHMaterialListViewController()
vc.orderId = orderId
self.navigationController?.pushViewController(vc)
// //获取订单号
// let orderId = serviceCenterMainReqVM.arrContactList[indexPath.section].id
......
//
// YHCertificateFilterButton.swift
// galaxy
//
// Created by edy on 2024/3/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateFilterButton: UIView {
static let width = 37.0
static let translucentWidth = 16.0
var translucentImgView: UIImageView!
var filterImgView: UIImageView!
var filterButton: UIButton!
var isSelect: Bool = false {
didSet {
let imgName = isSelect ? "my_cer_filter_select" : "my_cer_filter_unselect"
filterImgView.image = UIImage(named: imgName)
}
}
var clickBlock:((Bool)->())?
static func filterBtn()-> YHCertificateFilterButton {
let btn = YHCertificateFilterButton(frame: CGRect(x: 0, y: 0, width: Self.width, height: Self.width))
return btn
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
translucentImgView = UIImageView(image: UIImage(named: "my_cer_translucent"))
filterImgView = UIImageView(image: UIImage(named: "my_cer_filter_unselect"))
filterButton = UIButton()
filterButton.addTarget(self, action: #selector(didFilterBtnClicked), for: .touchUpInside)
self.addSubviews([translucentImgView, filterImgView, filterButton])
translucentImgView.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: Self.translucentWidth, height: 20))
make.left.equalToSuperview()
make.centerY.equalToSuperview()
}
filterImgView.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 21, height: 21))
make.left.equalTo(translucentImgView.snp.right)
make.centerY.equalToSuperview()
}
filterButton.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
}
@objc func didFilterBtnClicked() {
isSelect = !isSelect
if let clickBlock = clickBlock {
clickBlock(isSelect)
}
}
}
......@@ -78,15 +78,14 @@ class YHCertificateViewModel: YHBaseViewModel {
}
}
func getUploadCertificateList(isSilient:Bool = false, callBack:@escaping (_ listInfo: YHUploadCertificateInfo?, _ error:YHErrorModel?)->()) {
func getCertificateList(params:[String: Any], isSilient:Bool = false, callBack:@escaping (_ listInfo: YHUploadCertificateInfo?, _ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyInfoApi
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Certificate.certificateListApi
if !isSilient {
YHHUD.show(.progress(message: "数据加载中..."))
}
let params = ["id": 0]
let _ = YHNetRequest.getRequest(url: strUrl, params:params) { json, code in
if !isSilient {
......@@ -112,4 +111,32 @@ class YHCertificateViewModel: YHBaseViewModel {
callBack(nil, err)
}
}
func uploadCertificates(params:[String : Any], isSilient:Bool = false, callBack:@escaping ((Bool)->())) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Certificate.certificateUploadApi
if !isSilient {
YHHUD.show(.progress(message: "数据加载中..."))
}
let _ = YHNetRequest.getRequest(url: strUrl, params:params) { json, code in
if !isSilient {
YHHUD.hide()
}
if code == NetWorkCode.success.rawValue {
callBack(true)
} else {
callBack(false)
}
} failBlock: { err in
if !isSilient {
YHHUD.hide()
}
callBack(false)
}
}
}
......@@ -197,6 +197,12 @@ class YHAllApiName {
// 我的证件-状态数量统计
static let statisticApi = "infoflow/certificate/statistic"
// 证件列表
static let certificateListApi = "infoflow/needUploadItems"
// 证件上传
static let certificateUploadApi = "infoflow/certificate/upload"
//获取问答列表
static let questionAndAnswerApi = "infoflow/answer-question/getAnswerQuestion"
}
......
......@@ -90,6 +90,9 @@ class YHNetRequest: NSObject {
requestHeader.add(name:"sign",value:sign)
requestHeader.add(name: "token", value: YHLoginManager.shared.userModel?.token ?? "-")
// requestHeader.add(name: "token", value: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTI0NjA1NzQsImkiOjk4OTcwNDI5NjA3NzI0OSwidSI6IumTtuays-mbhuWboiIsInIiOiJzdXBlcl9hcHAifQ.jyBpXSii6nlRIITdOya3GQa5eb5G42Jh9nj39Cncwl8")
headers = requestHeader
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 3394@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 3394@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 3394@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 3394@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2855@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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