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

Merge commit '3714728a' into xiezhaolin

parents 9dafa395 3714728a
...@@ -208,6 +208,8 @@ ...@@ -208,6 +208,8 @@
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; }; 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */; }; 0480976D2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.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 */; }; 049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; };
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; }; 049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; };
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; }; 04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; };
...@@ -573,6 +575,8 @@ ...@@ -573,6 +575,8 @@
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; };
...@@ -1411,6 +1415,7 @@ ...@@ -1411,6 +1415,7 @@
A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */, A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */,
A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */, A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */,
A5EF213A2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift */, A5EF213A2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift */,
0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1420,6 +1425,7 @@ ...@@ -1420,6 +1425,7 @@
children = ( children = (
04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */, 04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */,
0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */, 0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */,
0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */,
0477E17B2BA4238400436346 /* YHMaterialListViewController.swift */, 0477E17B2BA4238400436346 /* YHMaterialListViewController.swift */,
A58A8C8E2BA6978100632765 /* YHMineCertificateEntryViewController.swift */, A58A8C8E2BA6978100632765 /* YHMineCertificateEntryViewController.swift */,
A5EF21302BA6DF94005027E6 /* YHMineSchemeViewController.swift */, A5EF21302BA6DF94005027E6 /* YHMineSchemeViewController.swift */,
...@@ -2255,6 +2261,7 @@ ...@@ -2255,6 +2261,7 @@
A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */, A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */,
045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */, 045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */,
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */, 045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */, A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */, 045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */,
045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */, 045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */,
...@@ -2364,6 +2371,7 @@ ...@@ -2364,6 +2371,7 @@
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */, 045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */, 045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */,
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */, 045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */,
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
045EEE822B9F171A0022A143 /* YHPersonInfoIdentityCardModel.swift in Sources */, 045EEE822B9F171A0022A143 /* YHPersonInfoIdentityCardModel.swift in Sources */,
045EEE952B9F171A0022A143 /* YHPreviewInfoCertificateInformationItemsView.swift in Sources */, 045EEE952B9F171A0022A143 /* YHPreviewInfoCertificateInformationItemsView.swift in Sources */,
045EEEBB2B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift in Sources */, 045EEEBB2B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift in Sources */,
...@@ -2571,7 +2579,7 @@ ...@@ -2571,7 +2579,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -2613,7 +2621,7 @@ ...@@ -2613,7 +2621,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
......
...@@ -118,10 +118,7 @@ extension YHInformationPerfectListVC { ...@@ -118,10 +118,7 @@ extension YHInformationPerfectListVC {
guard let orderId = orderId else { return} guard let orderId = orderId else { return}
self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in
if success == true { if success == true {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
}
if self.serviceCenterMainReqVM.myInfoFillStep > 6 { if self.serviceCenterMainReqVM.myInfoFillStep > 6 {
self.hasSubmitFlag = true self.hasSubmitFlag = true
} else { } else {
...@@ -403,12 +400,11 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource ...@@ -403,12 +400,11 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
} }
private func handleJumpLogicDebug(tapIndex : Int) { private func handleJumpLogicDebug(tapIndex : Int) {
// if self.serviceCenterMainReqVM.myInfoFillStep > 6 {
// goInfoListVCOp(index:tapIndex)
// return
// }
if tapIndex == 0 { if tapIndex == 0 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
return
}
//主申请人信息 //主申请人信息
let vc = YHMainApplicantInformationViewController() let vc = YHMainApplicantInformationViewController()
vc.orderId = orderId ?? 0 vc.orderId = orderId ?? 0
......
...@@ -176,6 +176,7 @@ extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewD ...@@ -176,6 +176,7 @@ extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewD
navigationController?.pushViewController(vc) navigationController?.pushViewController(vc)
} else if model.type == 2 { } else if model.type == 2 {
let vc = YHMineCertificateEntryViewController() let vc = YHMineCertificateEntryViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc) navigationController?.pushViewController(vc)
} else if model.type == 3 { } else if model.type == 3 {
......
...@@ -13,7 +13,9 @@ import IQKeyboardManagerSwift ...@@ -13,7 +13,9 @@ import IQKeyboardManagerSwift
class YHCertificateResourceUploadVC: YHBaseViewController { class YHCertificateResourceUploadVC: YHBaseViewController {
var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"] var orderId : Int?
var items:[YHSupplementInfo] = []
var viewModel: YHCertificateViewModel = YHCertificateViewModel()
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
...@@ -39,6 +41,7 @@ class YHCertificateResourceUploadVC: YHBaseViewController { ...@@ -39,6 +41,7 @@ class YHCertificateResourceUploadVC: YHBaseViewController {
self.view.backgroundColor = .white self.view.backgroundColor = .white
self.gk_navigationBar.isHidden = true self.gk_navigationBar.isHidden = true
createUI() createUI()
requestList()
} }
func createUI() { func createUI() {
...@@ -122,3 +125,36 @@ extension YHCertificateResourceUploadVC: JXSegmentedListContainerViewListDelegat ...@@ -122,3 +125,36 @@ extension YHCertificateResourceUploadVC: JXSegmentedListContainerViewListDelegat
return view return view
} }
} }
extension YHCertificateResourceUploadVC {
func requestList() {
let params = [
"order_id" : orderId ?? 0,
"node": "1",
"state": "1",
"category_id": "20",
"status_all": "",
"keywork": "",
"template_cate_id": "",
"supplement_ids": []] as [String: Any]
// state: 3:待上传 2:已驳回 1:已通过 0:审核中
viewModel.getCertificateList(params: params) {
[weak self] listInfo, error in
guard let self = self else { return }
items.removeAll()
if let listInfo = listInfo {
let arr = listInfo.supplementList
items.append(contentsOf: arr)
self.tableView.reloadData()
}
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 { ...@@ -19,15 +19,22 @@ class YHMaterialListViewController: YHBaseViewController {
static let segmentHeight = 53.0 static let segmentHeight = 53.0
var orderId : Int?
lazy var navBar: YHCustomNavigationBar = { lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar() let bar = YHCustomNavigationBar.navBar()
bar.title = "资料上传".local bar.title = "资料上传".local
bar.showLeftSecondButtonType(.search) bar.showLeftSecondButtonType(.search)
bar.backBlock = { bar.backBlock = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
bar.leftSecondBtnClick = { bar.leftSecondBtnClick = {
print("点击搜索") [weak self] in
guard let self = self else { return }
let vc = YHCertificateSearchViewController()
self.navigationController?.pushViewController(vc)
} }
return bar return bar
}() }()
...@@ -68,23 +75,22 @@ class YHMaterialListViewController: YHBaseViewController { ...@@ -68,23 +75,22 @@ class YHMaterialListViewController: YHBaseViewController {
return JXSegmentedListContainerView(dataSource: self, type: .collectionView) return JXSegmentedListContainerView(dataSource: self, type: .collectionView)
}() }()
lazy var searchView:UIView = { lazy var filterBtn: YHCertificateFilterButton = {
let view = UIView() let btn = YHCertificateFilterButton.filterBtn()
view.backgroundColor = .white btn.clickBlock = {
view.addSubview(searchBar) [weak self] select in
searchBar.snp.makeConstraints { make in guard let self = self else { return }
make.centerY.equalToSuperview() filterSheetView.show()
make.left.equalToSuperview().offset(16)
make.size.equalTo(CGSize(width: KScreenWidth-32.0, height:YHCertificateSearchBar.height))
} }
return view return btn
}() }()
lazy var searchBar: YHCertificateSearchBar = { lazy var filterSheetView: YHCertificateFilterView = {
let bar = YHCertificateSearchBar(frame:CGRect(x: 0, y: 0, width:KScreenWidth-32, height:YHCertificateSearchBar.height)) let view = YHCertificateFilterView.sheetView
return bar // view.
return view
}() }()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.gk_navigationBar.isHidden = true self.gk_navigationBar.isHidden = true
...@@ -95,6 +101,7 @@ class YHMaterialListViewController: YHBaseViewController { ...@@ -95,6 +101,7 @@ class YHMaterialListViewController: YHBaseViewController {
} }
view.addSubview(navBar) view.addSubview(navBar)
view.addSubview(segmentedView) view.addSubview(segmentedView)
view.addSubview(filterBtn)
view.addSubview(listContainerView) view.addSubview(listContainerView)
navBar.snp.makeConstraints { make in navBar.snp.makeConstraints { make in
...@@ -103,10 +110,17 @@ class YHMaterialListViewController: YHBaseViewController { ...@@ -103,10 +110,17 @@ class YHMaterialListViewController: YHBaseViewController {
make.height.equalTo(k_Height_NavContentBar) make.height.equalTo(k_Height_NavContentBar)
} }
segmentedView.snp.makeConstraints { make in 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.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(Self.segmentHeight) 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 listContainerView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(segmentedView.snp.bottom) make.top.equalTo(segmentedView.snp.bottom)
......
...@@ -13,6 +13,7 @@ import UIKit ...@@ -13,6 +13,7 @@ import UIKit
class YHMineCertificateEntryViewController: YHBaseViewController { class YHMineCertificateEntryViewController: YHBaseViewController {
var orderId : Int?
private let certificateReqVM : YHCertificateViewModel = YHCertificateViewModel() private let certificateReqVM : YHCertificateViewModel = YHCertificateViewModel()
private lazy var topBkg : UIView = { private lazy var topBkg : UIView = {
...@@ -161,6 +162,10 @@ extension YHMineCertificateEntryViewController : UITableViewDelegate,UITableView ...@@ -161,6 +162,10 @@ extension YHMineCertificateEntryViewController : UITableViewDelegate,UITableView
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true) tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.section)") printLog("点击了 tableView Cell \(indexPath.section)")
let vc = YHMaterialListViewController()
vc.orderId = orderId
self.navigationController?.pushViewController(vc)
// //获取订单号 // //获取订单号
......
...@@ -37,12 +37,13 @@ class YHQuestionAndAnswerViewController: YHBaseViewController { ...@@ -37,12 +37,13 @@ class YHQuestionAndAnswerViewController: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData() loadData()
} }
// override func viewWillAppear(_ animated: Bool) {
// super.viewWillAppear(animated)
//
// }
} }
extension YHQuestionAndAnswerViewController { extension YHQuestionAndAnswerViewController {
...@@ -66,15 +67,43 @@ extension YHQuestionAndAnswerViewController { ...@@ -66,15 +67,43 @@ extension YHQuestionAndAnswerViewController {
func setupUI() { func setupUI() {
gk_navTitle = "问题答疑" gk_navTitle = "问题答疑"
gk_navBarAlpha = 1.0 gk_navBarAlpha = 0.5
gk_navLineHidden = false
gk_navBackgroundColor = .white
view.addSubview(homeTableView) view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in homeTableView.snp.makeConstraints { make in
make.edges.equalTo(0) make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.left.right.bottom.equalToSuperview()
} }
homeTableView.delegate = self homeTableView.delegate = self
homeTableView.dataSource = self homeTableView.dataSource = self
let foot = UIView()
foot.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 62)
let label000 = UILabel()
label000.text = "* 如以上问题无法帮助,请前往咨询联系或直接联系您的服务团队"
label000.textColor = .labelTextColor2
label000.font = UIFont.PFSC_R(ofSize: 12)
label000.numberOfLines = 0
label000.lineBreakMode = .byWordWrapping
foot.addSubview(label000)
label000.snp.makeConstraints { make in
make.top.equalToSuperview().offset(28)
make.left.equalToSuperview().offset(34)
make.right.equalToSuperview().offset(-34)
make.bottom.equalToSuperview()
}
homeTableView.tableFooterView = foot
homeTableView.reloadData()
homeTableView.layoutIfNeeded()
} }
} }
...@@ -114,8 +143,8 @@ extension YHQuestionAndAnswerViewController : UITableViewDelegate,UITableViewDat ...@@ -114,8 +143,8 @@ extension YHQuestionAndAnswerViewController : UITableViewDelegate,UITableViewDat
let cell0 = tableView.dequeueReusableCell(withClass: YHQuestionAndAnswerCell.self) let cell0 = tableView.dequeueReusableCell(withClass: YHQuestionAndAnswerCell.self)
cell0.selectionStyle = .none cell0.selectionStyle = .none
if indexPath.row < certificateReqVM.arrQuestionAndAnswer.count { if indexPath.section < certificateReqVM.arrQuestionAndAnswer.count {
cell0.dataModel = certificateReqVM.arrQuestionAndAnswer[indexPath.row] cell0.dataModel = certificateReqVM.arrQuestionAndAnswer[indexPath.section]
} }
return cell0 return cell0
} }
......
//
// 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)
}
}
}
// //
// YHCertificateViewModel.swift // YHCertificateViewModel.swift
// galaxy // galaxy
...@@ -11,7 +12,6 @@ import SmartCodable ...@@ -11,7 +12,6 @@ import SmartCodable
class YHCertificateViewModel: YHBaseViewModel { class YHCertificateViewModel: YHBaseViewModel {
var certificateEntryModel : YHCertificateEntryModel? var certificateEntryModel : YHCertificateEntryModel?
var arrQuestionAndAnswer : [YHQuestionAndAnswerModel?] = [] var arrQuestionAndAnswer : [YHQuestionAndAnswerModel?] = []
//获取问答列表 //获取问答列表
...@@ -78,15 +78,14 @@ class YHCertificateViewModel: YHBaseViewModel { ...@@ -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 { if !isSilient {
YHHUD.show(.progress(message: "数据加载中...")) YHHUD.show(.progress(message: "数据加载中..."))
} }
let params = ["id": 0]
let _ = YHNetRequest.getRequest(url: strUrl, params:params) { json, code in let _ = YHNetRequest.getRequest(url: strUrl, params:params) { json, code in
if !isSilient { if !isSilient {
...@@ -112,4 +111,32 @@ class YHCertificateViewModel: YHBaseViewModel { ...@@ -112,4 +111,32 @@ class YHCertificateViewModel: YHBaseViewModel {
callBack(nil, err) 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)
}
}
} }
...@@ -559,6 +559,7 @@ extension YHEducationDetailVC { ...@@ -559,6 +559,7 @@ extension YHEducationDetailVC {
guard var dict:[String:Any] = detailInfo.toDictionary() else { return } guard var dict:[String:Any] = detailInfo.toDictionary() else { return }
dict["order_id"] = self.orderId dict["order_id"] = self.orderId
dict["is_aboard_school"] = detailInfo.isSchoolInAboard()
self.educationRequest.saveEducationInfo(params: dict, isSilent: !isShowToast) { self.educationRequest.saveEducationInfo(params: dict, isSilent: !isShowToast) {
[weak self] success, error in [weak self] success, error in
......
...@@ -137,7 +137,7 @@ extension YHServiceCenterMainViewModel { ...@@ -137,7 +137,7 @@ extension YHServiceCenterMainViewModel {
if true || resultModel.supplement_not_submit_num > 0 { //for test hjl if true || resultModel.supplement_not_submit_num > 0 { //for test hjl 方便测试
let model2 = YHContactMainItemStatusModel() let model2 = YHContactMainItemStatusModel()
model2.type = 2 model2.type = 2
model2.isFinished = false model2.isFinished = false
......
...@@ -197,6 +197,12 @@ class YHAllApiName { ...@@ -197,6 +197,12 @@ class YHAllApiName {
// 我的证件-状态数量统计 // 我的证件-状态数量统计
static let statisticApi = "infoflow/certificate/statistic" static let statisticApi = "infoflow/certificate/statistic"
// 证件列表
static let certificateListApi = "infoflow/needUploadItems"
// 证件上传
static let certificateUploadApi = "infoflow/certificate/upload"
//获取问答列表 //获取问答列表
static let questionAndAnswerApi = "infoflow/answer-question/getAnswerQuestion" static let questionAndAnswerApi = "infoflow/answer-question/getAnswerQuestion"
} }
......
...@@ -90,6 +90,9 @@ class YHNetRequest: NSObject { ...@@ -90,6 +90,9 @@ class YHNetRequest: NSObject {
requestHeader.add(name:"sign",value:sign) requestHeader.add(name:"sign",value:sign)
requestHeader.add(name: "token", value: YHLoginManager.shared.userModel?.token ?? "-") requestHeader.add(name: "token", value: YHLoginManager.shared.userModel?.token ?? "-")
// requestHeader.add(name: "token", value: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTI0NjA1NzQsImkiOjk4OTcwNDI5NjA3NzI0OSwidSI6IumTtuays-mbhuWboiIsInIiOiJzdXBlcl9hcHAifQ.jyBpXSii6nlRIITdOya3GQa5eb5G42Jh9nj39Cncwl8")
headers = requestHeader 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