Commit e5bcf1f1 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:
  文件预览预研
  //  我的证书
  点击范围
parents bc8132c7 0dc1b7bb
...@@ -219,6 +219,7 @@ ...@@ -219,6 +219,7 @@
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; }; 049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.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 */; };
04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */; };
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; }; 04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; };
04A6715C2B9FE9EA00C1FB91 /* YHUploadContentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */; }; 04A6715C2B9FE9EA00C1FB91 /* YHUploadContentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */; };
04A6715E2B9FFCA700C1FB91 /* YHCertificateNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */; }; 04A6715E2B9FFCA700C1FB91 /* YHCertificateNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */; };
...@@ -240,7 +241,7 @@ ...@@ -240,7 +241,7 @@
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; }; 04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; };
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */; }; 04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */; };
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */; }; 04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */; };
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateView.swift */; }; 04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; }; 6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; }; A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; };
A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; }; A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; };
...@@ -601,6 +602,7 @@ ...@@ -601,6 +602,7 @@
049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; }; 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.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>"; };
04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadTypeCell.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>"; };
04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadContentVC.swift; sourceTree = "<group>"; }; 04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadContentVC.swift; sourceTree = "<group>"; };
04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateNameCell.swift; sourceTree = "<group>"; }; 04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateNameCell.swift; sourceTree = "<group>"; };
...@@ -622,7 +624,7 @@ ...@@ -622,7 +624,7 @@
04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; }; 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebViewViewController.swift; sourceTree = "<group>"; }; 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebViewViewController.swift; sourceTree = "<group>"; };
04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginManager.swift; sourceTree = "<group>"; }; 04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginManager.swift; sourceTree = "<group>"; };
04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateView.swift; sourceTree = "<group>"; }; 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateSheetView.swift; sourceTree = "<group>"; };
58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; }; 58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; };
987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
...@@ -1457,12 +1459,13 @@ ...@@ -1457,12 +1459,13 @@
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */, 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */,
044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */, 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */,
044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */, 044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */,
04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateView.swift */, 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */,
04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */, 04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */,
04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */, 04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */,
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */, 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */,
044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */, 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */,
049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */, 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */,
04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */,
0477E17D2BA4362A00436346 /* YHCustomNavigationBar.swift */, 0477E17D2BA4362A00436346 /* YHCustomNavigationBar.swift */,
A592FE902BA6CC010062FACA /* YHCertificateEntryHeadView.swift */, A592FE902BA6CC010062FACA /* YHCertificateEntryHeadView.swift */,
A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */, A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */,
...@@ -2294,6 +2297,7 @@ ...@@ -2294,6 +2297,7 @@
045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */, 045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */,
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */, 045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */,
A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */, A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */,
04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */,
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */, A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */, A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */, 045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */,
...@@ -2515,7 +2519,7 @@ ...@@ -2515,7 +2519,7 @@
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */, A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */, A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */, 045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */,
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateView.swift in Sources */, 04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */,
045EEEA22B9F171A0022A143 /* YHWorkExperienceProjectModel.swift in Sources */, 045EEEA22B9F171A0022A143 /* YHWorkExperienceProjectModel.swift in Sources */,
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */, 0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */,
045EEECA2B9F171A0022A143 /* YHMyDocumentsListViewController.swift in Sources */, 045EEECA2B9F171A0022A143 /* YHMyDocumentsListViewController.swift in Sources */,
......
...@@ -105,7 +105,7 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou ...@@ -105,7 +105,7 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
cell.templateBlock = { cell.templateBlock = {
[weak self] in [weak self] in
guard let self = self else { return } guard let self = self else { return }
let view = YHCertificateTemplateView.templateView(item.templateInfo) let view = YHCertificateTemplateSheetView.templateView(item.templateInfo)
view.scanTemplateBlock = { view.scanTemplateBlock = {
[weak self] temlateInfo in [weak self] temlateInfo in
guard let self = self else { return } guard let self = self else { return }
...@@ -123,15 +123,21 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou ...@@ -123,15 +123,21 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHUploadContentVC()
vc.orderId = orderId
vc.categoryInfo = categoryInfo
if 0 <= indexPath.section && indexPath.section < items.count { if 0 <= indexPath.section && indexPath.section < items.count {
let item = items[indexPath.section] let item = items[indexPath.section]
// if item.checkStatus == YHCertificateUploadStatus.preUpload { // 待上传
showUploadSheetView(item.templateInfo)
return
// }
// 非待上传的进入详情
let vc = YHUploadContentVC()
vc.orderId = orderId
vc.categoryInfo = categoryInfo
vc.uploadInfo = item vc.uploadInfo = item
self.navigationController?.pushViewController(vc)
} }
self.navigationController?.pushViewController(vc)
} }
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
...@@ -216,4 +222,30 @@ extension YHCertificateResourceUploadVC { ...@@ -216,4 +222,30 @@ extension YHCertificateResourceUploadVC {
} }
} }
} }
func showUploadSheetView(_ template: YHTemplateInfo) {
let sheetView = YHCertificateUploadSheetView.sheetView
sheetView.templateInfo = template
sheetView.uploadFilesBlock = {
[weak self] fileUrl in
guard let self = self else { return }
print(fileUrl)
if let fileData = try? Data(contentsOf: fileUrl) {
// 将文件数据上传到服务器
let size = String(format: "%.2fM", Double(fileData.count)/(1024.0 * 1024.0))
print("\(size)")
self.viewModel.uploadFile(fileUrl.absoluteString) {[weak self] success, error in
guard let self = self else { return }
}
}
}
sheetView.uploadImageBlock = {
[weak self] image in
guard let self = self else { return }
// uploadImage(image)
}
sheetView.show()
}
} }
...@@ -164,9 +164,9 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource { ...@@ -164,9 +164,9 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
if indexPath.section == 0 { if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateTemplateCell.cellReuseIdentifier, for: indexPath) as! YHCertificateTemplateCell let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateTemplateCell.cellReuseIdentifier, for: indexPath) as! YHCertificateTemplateCell
cell.templateInfo = uploadInfo.templateInfo // cell.templateInfo = uploadInfo.templateInfo
cell.templateClick = { cell.templateClick = {
[weak self] in [weak self] path in
guard let self = self else { return } guard let self = self else { return }
// 查看模版 uploadInfo.templateInfo // 查看模版 uploadInfo.templateInfo
......
...@@ -181,6 +181,7 @@ class YHTemplateInfo: SmartCodable { ...@@ -181,6 +181,7 @@ class YHTemplateInfo: SmartCodable {
var name: String = "" var name: String = ""
var description: String = "" var description: String = ""
var materialPath: [YHMaterialPath] = [] var materialPath: [YHMaterialPath] = []
var guideFilePath: [YHMaterialPath] = []
func isNeedShowTemplate() -> Bool { func isNeedShowTemplate() -> Bool {
if self.description.isEmpty && self.materialPath.isEmpty { if self.description.isEmpty && self.materialPath.isEmpty {
...@@ -198,9 +199,10 @@ class YHTemplateInfo: SmartCodable { ...@@ -198,9 +199,10 @@ class YHTemplateInfo: SmartCodable {
case name = "name" case name = "name"
case description = "description" case description = "description"
case materialPath = "material_path" case materialPath = "material_path"
case guideFilePath = "guide_file_path"
} }
init(id: Int = 0, name: String = "", description: String = "", materialPath: [YHMaterialPath] = []) { init(id: Int = 0, name: String = "", description: String = "", materialPath: [YHMaterialPath] = [], guideFilePath: [YHMaterialPath] = []) {
self.id = id self.id = id
self.name = name self.name = name
self.description = description self.description = description
......
...@@ -73,7 +73,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -73,7 +73,7 @@ class YHCertificateInfoCell: UITableViewCell {
statusBtn.setTitle(title, for: .normal) statusBtn.setTitle(title, for: .normal)
} }
if model.templateInfo.materialPath.isEmpty && model.templateInfo.description.isEmpty { if model.templateInfo.materialPath.isEmpty && model.templateInfo.guideFilePath.isEmpty && model.templateInfo.description.isEmpty {
nameTextView.attributed.text = """ nameTextView.attributed.text = """
\(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16)))
......
...@@ -8,65 +8,75 @@ ...@@ -8,65 +8,75 @@
import UIKit import UIKit
class YHCertificateTemplateCell: UITableViewCell { class YHCertificateSampleTemplateView: UIView {
static let cellReuseIdentifier = "YHCertificateTemplateCell"
var templateClick:(()->())? lazy var iconImgV: UIImageView = {
let imgView = UIImageView(image:UIImage(named:"my_cer_template"))
return imgView
}()
var templateInfo: YHTemplateInfo? { lazy var arrowImgV: UIImageView = {
didSet { let imgView = UIImageView(image:UIImage(named:"form_right_arrow"))
guard let templateInfo = templateInfo else { return imgView
contentView.isHidden = true
return
}
if templateInfo.description.isEmpty && templateInfo.materialPath.isEmpty {
contentView.isHidden = true
return
}
contentView.isHidden = false
if !templateInfo.name.isEmpty {
templateTitleLabel.text = "\(templateInfo.name)示例模版"
} else {
templateTitleLabel.text = ""
}
if !templateInfo.description.isEmpty {
tipsLabel.text = "注意事项: \(templateInfo.description)"
} else {
tipsLabel.text = ""
}
let noTemplate = templateInfo.materialPath.isEmpty
templateView.isHidden = noTemplate
templateView.snp.updateConstraints { make in
make.height.equalTo(noTemplate ? 0.0 : 62.0)
make.bottom.equalToSuperview().offset(noTemplate ? 0.0 : -34.0)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.labelTextColor2
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:12)
label.numberOfLines = 0
return label
}() }()
lazy var templateTitleLabel: UILabel = { lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.text = "查看证件示例模版".local
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.textAlignment = .left label.textAlignment = .left
label.font = UIFont.PFSC_M(ofSize:17) label.font = UIFont.PFSC_B(ofSize:14)
label.text = "示例模版"
label.numberOfLines = 0
return label return label
}() }()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.backgroundColor = .contentBkgColor
self.layer.cornerRadius = 6.0
self.clipsToBounds = true
self.addSubview(iconImgV)
self.addSubview(titleLabel)
self.addSubview(arrowImgV)
iconImgV.snp.makeConstraints { make in
make.width.height.equalTo(24)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(16)
}
titleLabel.snp.makeConstraints { make in
make.height.equalTo(20)
make.centerY.equalToSuperview()
make.left.equalTo(iconImgV.snp.right).offset(12)
make.right.equalTo(arrowImgV.snp.left).offset(-5)
}
arrowImgV.snp.makeConstraints { make in
make.width.height.equalTo(20)
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-13)
}
}
}
class YHCertificateTemplateCell: UITableViewCell {
static let cellReuseIdentifier = "YHCertificateTemplateCell"
var templateClick:((YHMaterialPath?)->())?
var templatePath: YHMaterialPath?
lazy var templateView: YHCertificateSampleTemplateView = { lazy var templateView: YHCertificateSampleTemplateView = {
let view = YHCertificateSampleTemplateView(frame:CGRectZero) let view = YHCertificateSampleTemplateView(frame:CGRectZero)
let tap = UITapGestureRecognizer(target:self, action:#selector(didTemplateTap)) let tap = UITapGestureRecognizer(target:self, action:#selector(didTemplateTap))
...@@ -75,9 +85,7 @@ class YHCertificateTemplateCell: UITableViewCell { ...@@ -75,9 +85,7 @@ class YHCertificateTemplateCell: UITableViewCell {
}() }()
@objc func didTemplateTap() { @objc func didTemplateTap() {
if let templateClick = templateClick { templateClick?(templatePath)
templateClick()
}
} }
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
...@@ -93,26 +101,17 @@ class YHCertificateTemplateCell: UITableViewCell { ...@@ -93,26 +101,17 @@ class YHCertificateTemplateCell: UITableViewCell {
self.selectionStyle = .none self.selectionStyle = .none
contentView.addSubview(templateTitleLabel)
contentView.addSubview(tipsLabel)
contentView.addSubview(templateView) contentView.addSubview(templateView)
templateTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalToSuperview().offset(16)
}
tipsLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalTo(templateTitleLabel.snp.bottom).offset(5)
}
templateView.snp.makeConstraints { make in templateView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20) make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20) make.right.equalToSuperview().offset(-20)
make.top.equalTo(tipsLabel.snp.bottom).offset(15) make.top.bottom.equalToSuperview()
make.height.equalTo(62.0) }
make.bottom.equalToSuperview().offset(-34) }
func update(bottomMargin:CGFloat) {
templateView.snp.updateConstraints { make in
make.bottom.equalToSuperview().offset(-bottomMargin)
} }
} }
......
...@@ -17,15 +17,17 @@ ...@@ -17,15 +17,17 @@
import UIKit import UIKit
class YHCertificateTemplateView: UIView { class YHCertificateTemplateSheetView: UIView {
static func templateView(_ model: YHTemplateInfo) -> YHCertificateTemplateView { static func templateView(_ model: YHTemplateInfo) -> YHCertificateTemplateSheetView {
let sheetView = YHCertificateTemplateView(frame:UIScreen.main.bounds) let sheetView = YHCertificateTemplateSheetView(frame:UIScreen.main.bounds)
sheetView.updateModel(model) sheetView.updateModel(model)
return sheetView return sheetView
} }
var templateArr: [YHMaterialPath] = []
var templateInfo: YHTemplateInfo? var templateInfo: YHTemplateInfo?
var scanTemplateBlock: ((YHTemplateInfo?)->())? var scanTemplateBlock: ((YHTemplateInfo?)->())?
lazy var blackMaskView: UIView = { lazy var blackMaskView: UIView = {
...@@ -72,19 +74,25 @@ class YHCertificateTemplateView: UIView { ...@@ -72,19 +74,25 @@ class YHCertificateTemplateView: UIView {
return view return view
}() }()
lazy var scrollView: UIScrollView = { lazy var tableView: UITableView = {
let view = UIScrollView()
view.addSubview(scrollContentView) let tableView = UITableView(frame:.zero, style:.grouped)
scrollContentView.snp.makeConstraints { make in
make.edges.equalToSuperview() if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
} }
return view tableView.estimatedSectionHeaderHeight = 20.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = .white
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHCertificateTemplateCell.self, forCellReuseIdentifier: YHCertificateTemplateCell.cellReuseIdentifier)
return tableView
}() }()
lazy var scrollContentView: UIView = {
let view = UIView()
return view
}()
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
...@@ -103,24 +111,6 @@ class YHCertificateTemplateView: UIView { ...@@ -103,24 +111,6 @@ class YHCertificateTemplateView: UIView {
return btn return btn
}() }()
lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:14)
label.numberOfLines = 0
label.text = ""
return label
}()
lazy var templateView: YHCertificateSampleTemplateView = {
let view = YHCertificateSampleTemplateView(frame:CGRectZero)
view.tag = YHCertificateUploadType.sample.rawValue
let tap = UITapGestureRecognizer(target:self, action:#selector(didTemplateViewClicked))
view.addGestureRecognizer(tap)
return view
}()
lazy var knowBtn:UIButton = { lazy var knowBtn:UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setTitle("知道了".local, for: .normal) btn.setTitle("知道了".local, for: .normal)
...@@ -149,15 +139,16 @@ class YHCertificateTemplateView: UIView { ...@@ -149,15 +139,16 @@ class YHCertificateTemplateView: UIView {
titleLabel.text = "\(model.name)示例模版" titleLabel.text = "\(model.name)示例模版"
} }
if !model.description.isEmpty { templateArr.removeAll()
tipsLabel.text = "注意事项:\(model.description)"
if model.materialPath.count > 0 {
templateArr.append(model.materialPath[0])
} }
templateView.isHidden = model.materialPath.isEmpty if model.guideFilePath.count > 0 {
templateArr.append(model.guideFilePath[0])
let topMargin = model.description.isEmpty ? 0 : 20
templateView.snp.updateConstraints { make in
make.top.equalTo(tipsLabel.snp.bottom).offset(topMargin)
} }
self.tableView.reloadData()
self.setNeedsLayout() self.setNeedsLayout()
self.layoutIfNeeded() self.layoutIfNeeded()
} }
...@@ -167,11 +158,8 @@ class YHCertificateTemplateView: UIView { ...@@ -167,11 +158,8 @@ class YHCertificateTemplateView: UIView {
self.addSubview(blackMaskView) self.addSubview(blackMaskView)
self.addSubview(whiteContentView) self.addSubview(whiteContentView)
whiteContentView.addSubview(topView) whiteContentView.addSubview(topView)
whiteContentView.addSubview(scrollView)
whiteContentView.addSubview(knowBtn) whiteContentView.addSubview(knowBtn)
whiteContentView.addSubview(tableView)
scrollContentView.addSubview(tipsLabel)
scrollContentView.addSubview(templateView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue) let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0)); let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0));
...@@ -192,29 +180,11 @@ class YHCertificateTemplateView: UIView { ...@@ -192,29 +180,11 @@ class YHCertificateTemplateView: UIView {
make.top.left.right.equalToSuperview() make.top.left.right.equalToSuperview()
} }
scrollView.snp.makeConstraints { make in tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(topView.snp.bottom).offset(20) make.top.equalTo(topView.snp.bottom).offset(20)
make.bottom.equalTo(knowBtn.snp.top).offset(-8) make.bottom.equalTo(knowBtn.snp.top).offset(-8)
} }
tipsLabel.snp.makeConstraints { make in
let gap = 20.0
make.left.equalToSuperview().offset(gap)
make.right.equalToSuperview().offset(-gap)
make.width.equalTo(KScreenWidth-gap*2.0)
make.top.equalToSuperview()
}
templateView.snp.makeConstraints { make in
let gap = 20.0
make.left.equalToSuperview().offset(gap)
make.right.equalToSuperview().offset(-gap)
make.width.equalTo(KScreenWidth-gap*2.0)
make.height.equalTo(62.0)
make.top.equalTo(tipsLabel.snp.bottom).offset(20)
make.bottom.equalToSuperview().offset(-20)
}
knowBtn.snp.makeConstraints { make in knowBtn.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16) make.left.equalToSuperview().offset(16)
...@@ -224,7 +194,7 @@ class YHCertificateTemplateView: UIView { ...@@ -224,7 +194,7 @@ class YHCertificateTemplateView: UIView {
} }
} }
func show() -> YHCertificateTemplateView { func show() -> YHCertificateTemplateSheetView {
UIApplication.shared.yhKeyWindow()?.addSubview(self) UIApplication.shared.yhKeyWindow()?.addSubview(self)
return self return self
} }
...@@ -244,3 +214,72 @@ class YHCertificateTemplateView: UIView { ...@@ -244,3 +214,72 @@ class YHCertificateTemplateView: UIView {
dismiss() dismiss()
} }
} }
extension YHCertificateTemplateSheetView: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return templateArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateTemplateCell.cellReuseIdentifier, for: indexPath) as! YHCertificateTemplateCell
if 0 <= indexPath.row && indexPath.row < templateArr.count {
cell.templatePath = templateArr[indexPath.row]
cell.templateClick = {
[weak self] path in
}
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 62.0
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
if let desc = templateInfo?.description, !desc.isEmpty {
return UITableView.automaticDimension
}
return 0.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 20.0
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
if section == 0, let desc = templateInfo?.description, !desc.isEmpty {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:14)
label.numberOfLines = 0
label.text = "注意事项:\(desc)"
view.addSubview(label)
label.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.bottom.equalToSuperview().offset(-20)
}
}
return view
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
}
//
// YHCertificateUploadTypeCell.swift
// galaxy
//
// Created by edy on 2024/3/21.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateUploadItem {
var type: YHCertificateUploadType
var title: String
var subtitle: String
init(type:YHCertificateUploadType, title: String, subtitle: String = "") {
self.type = type
self.title = title
self.subtitle = subtitle
}
}
class YHCertificateUploadItemView: UIView {
var item: YHCertificateUploadItem {
didSet {
updateUI()
}
}
lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize:14)
return label
}()
lazy var subTitleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.labelTextColor2
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize:11)
return label
}()
init(_ item: YHCertificateUploadItem) {
self.item = item
super.init(frame:CGRect(x: 0, y: 0, width: KScreenWidth, height: 52.0))
self.createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.tag = self.item.type.rawValue
self.addSubview(titleLabel)
self.addSubview(subTitleLabel)
self.addSubview(topLine)
updateUI()
}
func updateUI() {
self.tag = self.item.type.rawValue
titleLabel.text = item.title
subTitleLabel.text = item.subtitle
subTitleLabel.isHidden = item.subtitle.isEmpty
if item.type == .cancel {
titleLabel.textColor = UIColor(hexString:"#909090")
}
titleLabel.snp.remakeConstraints { make in
make.height.equalTo(20)
make.left.right.equalToSuperview()
if item.subtitle.isEmpty {
make.centerY.equalToSuperview()
} else {
make.bottom.equalTo(self.snp.centerY)
}
}
subTitleLabel.snp.remakeConstraints { make in
make.height.equalTo(16)
make.left.right.equalToSuperview()
make.top.equalTo(titleLabel.snp.bottom)
}
topLine.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalToSuperview()
make.height.equalTo(1)
}
}
}
class YHCertificateUploadTypeCell: UITableViewCell {
static let cellReuseIdentifier = "YHCertificateUploadTypeCell"
lazy var itemView: YHCertificateUploadItemView = {
let view = YHCertificateUploadItemView(YHCertificateUploadItem(type:.camera, title:"拍照上传"))
return view
}()
var item: YHCertificateUploadItem! {
didSet {
itemView.item = item
}
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
createUI()
}
func createUI() {
self.selectionStyle = .none
contentView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
}
}
...@@ -194,7 +194,10 @@ class YHCollegeInfo: SmartCodable { ...@@ -194,7 +194,10 @@ class YHCollegeInfo: SmartCodable {
} else if mainNameType == 2 { } else if mainNameType == 2 {
return enName return enName
} }
return "" if !zhName.isEmpty {
return zhName
}
return enName
} }
required init() { required init() {
......
...@@ -104,8 +104,8 @@ class YHLoginPrivacyView: UIView { ...@@ -104,8 +104,8 @@ class YHLoginPrivacyView: UIView {
} }
agreeButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50) agreeButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
serviceButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50) serviceButton.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0)
privacyButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50) privacyButton.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0)
} }
......
...@@ -137,6 +137,45 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -137,6 +137,45 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
} }
func openXLSXRemoteFile(urlString: String) {
guard let url = URL(string: urlString) else { return }
let configuration = URLSessionConfiguration.default
let session = URLSession(configuration: configuration)
let task = session.downloadTask(with: url) { (tempLocalUrl, response, error) in
if let tempLocalUrl = tempLocalUrl, error == nil {
// 下载完成,尝试打开文件
let fileManager = FileManager.default
let destination = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(response?.suggestedFilename ?? UUID().uuidString)
try? fileManager.moveItem(at: tempLocalUrl, to: destination)
// 打开文件
self.openXLSXFile(at: destination)
} else {
print("Error downloading the file: \(error?.localizedDescription ?? "Unknown error")")
}
}
task.resume()
}
func openXLSXFile(at fileURL: URL) {
let controller = UIDocumentInteractionController(url: fileURL)
controller.delegate = self
DispatchQueue.main.async {
controller.presentPreview(animated: true)
}
}
}
extension YHMyViewController: UIDocumentInteractionControllerDelegate {
func documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -> UIViewController {
return self
}
} }
extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
...@@ -164,65 +203,58 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -164,65 +203,58 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController()) let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true) self.navigationController?.present(vc, animated: true)
return
} else { } else {
YHHUD.flash(message: "已登录: 功能完善中...") YHHUD.flash(message: "已登录: 功能完善中...")
} }
let vc = YHWebViewViewController()
navigationController?.pushViewController(vc, animated: true) //for test hjl
return
// let url = URL(string: "https://docs.qq.com/openapi/drive/v2/files/embed/temporary?timestamp=1710298232&id=6bcaa379b0e5488abbaff85d51ee2fab&clientID=2aebc2da4f0b4883bf33ef20836f2e2d")!
//
// let tmpVC = SFSafariViewController(url: url)
// navigationController?.pushViewController(tmpVC)
//
//
// return
// if indexPath.row == 0 {
//
//
// let vc = YHWebViewViewController()
// navigationController?.pushViewController(vc, animated: true)
// } else {
// let vc = YHWebViewViewController()
// navigationController?.pushViewController(vc, animated: true)
// }
//
// return
let item: PersonalModuleItem = items[indexPath.row]; let item: PersonalModuleItem = items[indexPath.row];
// 预览文件预研 杜宇todo
if item.title == "关于我们" { if item.title == "我的消息" {
let vc = YHAboutUsViewController() YHHUD.flash(message: "预览image")
self.navigationController?.pushViewController(vc) self.openXLSXRemoteFile(urlString: "https://upload-cdn.galaxy-immi.com/crm/production/1620280305822.jpg")
} else if item.title == "我的进度" {
} else if item.title == "我的设置" { YHHUD.flash(message: "预览pdf")
self.openXLSXRemoteFile(urlString: "https://upload-cdn.galaxy-immi.com/crm/production/1620271660487.pdf")
} else if item.title == "积分中心" {
YHHUD.flash(message: "预览xlsx")
self.openXLSXRemoteFile(urlString: "https://test-cdn.galaxy-immi.com/4001001/8979989729091623170120240321152216.xlsx?Expires=1711007546&OSSAccessKeyId=LTAI5tNFvK2xGRrBeJ2z8R2j&Signature=UfM6tRcws5ObN4rp/3ZESEWbM2E%3D&v=1711005746")
} else if item.title == "推荐有理" {
let account = "duyu" } else if item.title == "我的海报" {
let token = "123456"
let vc = ConversationController()
self.navigationController?.pushViewController(vc)
IMKitClient.instance.loginIM(account, token) { error in
if let err = error {
print("login error in app : ", err.localizedDescription)
}else {
let _ = NEAtMessageManager.instance
}
}
} else if item.title == "我的测评码" {
}
} else {
// if item.title == "关于我们" {
// let vc = YHAboutUsViewController()
// self.navigationController?.pushViewController(vc)
//
// } else if item.title == "我的设置" {
//
// let account = "duyu"
// let token = "123456"
// let vc = ConversationController()
// self.navigationController?.pushViewController(vc)
//
// IMKitClient.instance.loginIM(account, token) { error in
// if let err = error {
// print("login error in app : ", err.localizedDescription)
// }else {
// let _ = NEAtMessageManager.instance
//
// }
// }
//
//
//
// } else {
// let vc = YHLoginViewController() // let vc = YHLoginViewController()
// self.navigationController?.pushViewController(vc) // self.navigationController?.pushViewController(vc)
} // }
} }
} }
......
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