Commit 83fe4eb5 authored by pete谢兆麟's avatar pete谢兆麟

Merge commit 'ca1cfda8' into xiezhaolin

parents 555dcc40 ca1cfda8
......@@ -245,7 +245,7 @@
A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; };
A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; };
A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */; };
A525D2302BA83B87001A84F5 /* YHFileListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A525D22F2BA83B87001A84F5 /* YHFileListBottomView.swift */; };
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; };
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; };
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; };
......@@ -333,6 +333,8 @@
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */; };
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */; };
A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */; };
A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */; };
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001292BABC84A001F003C /* YHFileListBottomView.swift */; };
A5D6AB1B2B46A1CC001C10A5 /* YHHomeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */; };
A5D6AB1D2B46AAFB001C10A5 /* YHHomePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */; };
A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A5E69D502BA304D400411932 /* DIN Alternate Bold.ttf */; };
......@@ -623,7 +625,7 @@
A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
A51044192B495DD0006B60BB /* UIView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Extension.swift"; sourceTree = "<group>"; };
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterSecondViewController.swift; sourceTree = "<group>"; };
A525D22F2BA83B87001A84F5 /* YHFileListBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListBottomView.swift; sourceTree = "<group>"; };
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; };
A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; };
A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; };
......@@ -715,6 +717,8 @@
A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell5.swift; sourceTree = "<group>"; };
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBbxCollectionViewCell.swift; sourceTree = "<group>"; };
A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHChoiceButtonHoldView.swift; sourceTree = "<group>"; };
A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListHeaerView.swift; sourceTree = "<group>"; };
A5D001292BABC84A001F003C /* YHFileListBottomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListBottomView.swift; sourceTree = "<group>"; };
A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeModel.swift; sourceTree = "<group>"; };
A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomePageViewModel.swift; sourceTree = "<group>"; };
A5E69D502BA304D400411932 /* DIN Alternate Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "DIN Alternate Bold.ttf"; sourceTree = "<group>"; };
......@@ -1567,7 +1571,7 @@
A525D22C2BA837C5001A84F5 /* FileList(文件清单) */ = {
isa = PBXGroup;
children = (
A525D22E2BA83B58001A84F5 /* V */,
A5D001262BABC84A001F003C /* V */,
A525D22D2BA837DF001A84F5 /* C */,
);
path = "FileList(文件清单)";
......@@ -1581,14 +1585,6 @@
path = C;
sourceTree = "<group>";
};
A525D22E2BA83B58001A84F5 /* V */ = {
isa = PBXGroup;
children = (
A525D22F2BA83B87001A84F5 /* YHFileListBottomView.swift */,
);
path = V;
sourceTree = "<group>";
};
A5573EC52B317BFF00D98EC0 = {
isa = PBXGroup;
children = (
......@@ -1984,6 +1980,16 @@
path = VM;
sourceTree = "<group>";
};
A5D001262BABC84A001F003C /* V */ = {
isa = PBXGroup;
children = (
A520124E2BABCE05008655EA /* YHFileListContentView.swift */,
A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */,
A5D001292BABC84A001F003C /* YHFileListBottomView.swift */,
);
path = V;
sourceTree = "<group>";
};
A5D6AB192B465DFF001C10A5 /* VM */ = {
isa = PBXGroup;
children = (
......@@ -2200,6 +2206,7 @@
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */,
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */,
A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */,
045EEEEF2B9F171A0022A143 /* YHCertificateInfoController.swift in Sources */,
045EEEDA2B9F171A0022A143 /* YHEducationInfoListVC.swift in Sources */,
A5ACE92C2B4564F7002C94D2 /* YHLoginStyleButton.swift in Sources */,
......@@ -2249,6 +2256,7 @@
045EEEA82B9F171A0022A143 /* YHWorkIntroductionViewController.swift in Sources */,
045EEEBF2B9F171A0022A143 /* YHWorkFileItemView.swift in Sources */,
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */,
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */,
045EEF042B9F171A0022A143 /* YHIdentityCardCell.swift in Sources */,
045EEEB42B9F171A0022A143 /* YHWorkExampleMessageTableViewCell.swift in Sources */,
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
......@@ -2268,6 +2276,7 @@
045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */,
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */,
A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */,
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
......@@ -2377,7 +2386,6 @@
045EEE8A2B9F171A0022A143 /* YHPreviewOtherInformationViewController.swift in Sources */,
A5FD63C72B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift in Sources */,
A5ACE9402B4564F7002C94D2 /* String+Extension.swift in Sources */,
A525D2302BA83B87001A84F5 /* YHFileListBottomView.swift in Sources */,
045EEEE42B9F171A0022A143 /* YHMySignatureDetailModel.swift in Sources */,
A58A8C8F2BA6978100632765 /* YHMineCertificateEntryViewController.swift in Sources */,
045EEF1B2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift in Sources */,
......
......@@ -25,7 +25,18 @@ class YHInformationPerfectListVC: YHBaseViewController {
} else {
var name = ""
if let applicant = serviceCenterMainReqVM.informationFillStepModel {
name = applicant.applicantName.defaultStringIfEmpty(detaultValue: "尊敬的客户")
if applicant.applicantName.isEmpty {
name = "尊敬的客户"
} else {
name = applicant.applicantName
if applicant.sex == 1 {
name = name + "先生"
} else if applicant.sex == 2 {
name = name + "女士"
} else {
}
}
}
headerTitleDesLable.text = "您好," + name
}
......
......@@ -16,29 +16,23 @@ class YHFileListViewController: YHBaseViewController {
var orderId : Int?
private let certificateReqVM : YHCertificateViewModel = YHCertificateViewModel()
private lazy var topBkg : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "file_list_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
private lazy var headView : UIView = {
let view = UIView()
private lazy var headView : YHFileListHeaerView = {
let view = YHFileListHeaerView()
view.backgroundColor = .clear
return view
}()
private lazy var myScrollView : UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .red
view.backgroundColor = .white
return view
}()
private lazy var myContentView : UIView = {
let view = UIView()
private lazy var myContentView : YHFileListContentView = {
let view = YHFileListContentView()
view.backgroundColor = .yellow
view.layer.cornerRadius = kCornerRadius6
view.clipsToBounds = true
......@@ -46,10 +40,6 @@ class YHFileListViewController: YHBaseViewController {
}()
let bottomView : YHFileListBottomView = YHFileListBottomView()
override func viewDidLoad() {
......@@ -65,20 +55,22 @@ class YHFileListViewController: YHBaseViewController {
extension YHFileListViewController {
func loadData() {
// if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
// let param = ["order_id":orderID,"node":"1","state":"1"]
// certificateReqVM.getCertificateStatisticData(params: param) { success, error in
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let tttt = "11758" //for test hjl
let param = ["order_id":tttt,"node":"1","state":"1"]
certificateReqVM.getCertificateFileListData(params: param) { success, error in
// if success == true {
// self.headerView.dataModel = self.certificateReqVM.certificateEntryModel
// } else {
// YHHUD.flash(message: error?.errorMsg ?? "请求出错")
// }
//
// self.homeTableView.reloadData()
// }
// } else {
// printLog("error : orderID 为空")
// }
}
} else {
printLog("error : orderID 为空")
}
}
func setupUI() {
......@@ -86,18 +78,22 @@ extension YHFileListViewController {
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor(hex:0x0D37C7, alpha: 1.0)
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(YHFileListBottomView.viewH)
}
bottomView.block = { flag in
if flag == 1 {
printLog("生成清单")
}
}
myScrollView.backgroundColor = UIColor(hex:0x0D37C7, alpha: 1.0)
view.addSubview(myScrollView)
myScrollView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
......@@ -105,12 +101,10 @@ extension YHFileListViewController {
make.bottom.equalTo(bottomView.snp.top)
}
myScrollView.addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(312)
myScrollView.addSubview(headView)
headView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(YHFileListHeaerView.viewH)
}
myScrollView.addSubview(myContentView)
......
//
// YHFileListContentView.swift
// galaxy
//
// Created by davidhuangA on 2024/3/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHFileListContentView: UIView {
/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
override func draw(_ rect: CGRect) {
// Drawing code
}
*/
}
//
// YHFileListHeaerView.swift
// galaxy
//
// Created by davidhuangA on 2024/3/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHFileListHeaerView: UIView {
static let viewH : CGFloat = 312
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private lazy var topBkg : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "file_list_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
private lazy var imageV1 : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "file_list_wenzi")
imagV.contentMode = .scaleAspectFill
return imagV
}()
private lazy var imageV2 : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "file_list_icon")
imagV.contentMode = .scaleAspectFill
return imagV
}()
//待提交
private lazy var waitSubmitLable : UILabel = {
let imagV = UILabel()
imagV.text = "您有 - 项待提交"
imagV.font = UIFont.PFSC_R(ofSize: 14)
imagV.textColor = UIColor.white
return imagV
}()
//重传
private lazy var reuploadLable : UILabel = {
let imagV = UILabel()
imagV.text = "您有 - 项需重传"
imagV.font = UIFont.PFSC_R(ofSize: 14)
imagV.textColor = UIColor.white
return imagV
}()
}
private extension YHFileListHeaerView {
func initView() {
addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(YHFileListHeaerView.viewH)
}
addSubview(imageV1)
imageV1.snp.makeConstraints { make in
make.top.equalTo(34)
make.left.equalTo(28)
make.width.equalTo(222)
make.height.equalTo(86)
}
addSubview(imageV2)
imageV2.snp.makeConstraints { make in
make.top.equalToSuperview().offset(98)
make.left.equalTo(KScreenWidth - kMargin - 154)
make.width.equalTo(154)
make.height.equalTo(130)
}
let imagVDot1 = UIImageView()
imagVDot1.image = UIImage(named: "file_list_dot")
imagVDot1.contentMode = .scaleAspectFill
addSubview(imagVDot1)
imagVDot1.snp.makeConstraints { make in
make.left.equalTo(28)
make.top.equalTo(imageV1.snp.bottom).offset(21)
make.width.height.equalTo(8)
}
let imagVBkg1 = UIImageView()
imagVBkg1.image = UIImage(named: "file_list_icon_bkg")
imagVBkg1.contentMode = .scaleAspectFill
addSubview(imagVBkg1)
imagVBkg1.snp.makeConstraints { make in
make.left.equalTo(imagVDot1.snp.right).offset(10)
make.centerY.equalTo(imagVDot1)
make.width.equalTo(148)
make.height.equalTo(23)
}
let imagVDot2 = UIImageView()
imagVDot2.image = UIImage(named: "file_list_dot")
imagVDot2.contentMode = .scaleAspectFill
addSubview(imagVDot2)
imagVDot2.snp.makeConstraints { make in
make.left.equalTo(28)
make.top.equalTo(imagVDot1.snp.bottom).offset(25)
make.width.height.equalTo(8)
}
let imagVBkg2 = UIImageView()
imagVBkg2.image = UIImage(named: "file_list_icon_bkg")
imagVBkg2.contentMode = .scaleAspectFill
addSubview(imagVBkg2)
imagVBkg2.snp.makeConstraints { make in
make.left.equalTo(imagVDot2.snp.right).offset(10)
make.centerY.equalTo(imagVDot2)
make.width.equalTo(148)
make.height.equalTo(23)
}
addSubview(waitSubmitLable)
waitSubmitLable.snp.makeConstraints { make in
make.centerY.equalTo(imagVDot1)
make.left.equalTo(imagVDot1.snp.right).offset(20)
make.height.equalTo(21)
make.right.equalTo(imagVBkg1.snp.right).offset(4)
}
addSubview(reuploadLable)
reuploadLable.snp.makeConstraints { make in
make.centerY.equalTo(imagVDot2)
make.left.equalTo(imagVDot2.snp.right).offset(20)
make.height.equalTo(21)
make.right.equalTo(imagVBkg2.snp.right).offset(4)
}
}
}
......@@ -13,4 +13,5 @@ struct YHPersonInfoFillStepModel: SmartCodable {
var step : Int = 0
var applicantName : String = ""
var sweet_notify_status : Int = 0
var sex : Int = 0
}
......@@ -111,6 +111,7 @@ class YHUploadContentVC: YHBaseViewController {
sheetView.uploadImageBlock = {
[weak self] image in
guard let self = self else { return }
uploadImage(image)
}
sheetView.show()
}
......@@ -399,17 +400,85 @@ extension YHUploadContentVC {
]
self.viewModel.updateCertificates(params: params) {
[weak self] success in
[weak self] success, error in
guard let self = self else { return }
if operation == "del" {
YHHUD.flash(message: success ? "删除成功" : "删除失败")
} else if operation == "rename" {
YHHUD.flash(message: success ? "重命名成功" : "重命名失败")
if success {
YHHUD.flash(message: "删除成功")
} else {
var msg = "删除失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
}
YHHUD.flash(message:msg)
}
requestList()
return
}
if operation == "rename" {
if success {
YHHUD.flash(message: "重命名成功")
} else {
var msg = "重命名失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
}
YHHUD.flash(message:msg)
}
requestList()
return
}
if operation == "add" {
if success {
YHHUD.flash(message: "添加成功")
} else {
var msg = "添加失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
}
YHHUD.flash(message:msg)
}
requestList()
return
}
}
}
func uploadImage(_ img: UIImage) {
// 先OSS上传得到URL
YHHUD.show(.progress(message: "上传中..."))
self.viewModel.uploadImage(img) {
[weak self] url, error in
guard let self = self else { return }
YHHUD.hide()
if let url = url, !url.isEmpty {
let imgName = url.lastPathComponent
var suffix = "jpg"
let suffixName = url.pathExtension.lowercased()
if !suffixName.isEmpty {
suffix = suffixName
}
// 再调用业务接口
let model = YHContentUrl()
model.name = imgName
model.url = url
model.suffix = suffix
updateCertificateItem(model, operation: "add", rename: "")
return
}
//
var msg = "上传图片失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
}
YHHUD.flash(message: msg)
}
}
}
......@@ -88,7 +88,7 @@ private extension YHCertificateEntryHeadView {
guard let dataModel = dataModel else { return }
var tmp = ""
if dataModel.user_name.isEmpty {
tmp = "尊敬的户"
tmp = "尊敬的户"
} else {
tmp = dataModel.user_name
if dataModel.sex == 1 {
......
......@@ -451,6 +451,7 @@ extension YHCertificateUploadSheetView: (UIImagePickerControllerDelegate & UINav
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
uploadImageBlock?(image)
self.dismiss()
......
......@@ -37,6 +37,40 @@ class YHCertificateViewModel: YHBaseViewModel {
var certificateEntryModel : YHCertificateEntryModel?
var arrQuestionAndAnswer : [YHQuestionAndAnswerModel?] = []
//我的证件 清单列表数据
func getCertificateFileListData( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Certificate.documentListApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
let dic = json.data
guard let resultModel = YHCertificateEntryModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false,err)
return
}
self.certificateEntryModel = resultModel
callBackBlock(true,nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false,err)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
//获取问答列表
func getQuestionAndAnserList( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Certificate.questionAndAnswerApi
......@@ -137,7 +171,7 @@ class YHCertificateViewModel: YHBaseViewModel {
}
// 上传/重命名/删除 证件
func updateCertificates(params:[String : Any], isSilient:Bool = false, callBack:@escaping ((Bool)->())) {
func updateCertificates(params:[String : Any], isSilient:Bool = false, callBack:@escaping ((Bool, YHErrorModel?)->())) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Certificate.certificateUploadApi
......@@ -151,16 +185,17 @@ class YHCertificateViewModel: YHBaseViewModel {
YHHUD.hide()
}
if code == NetWorkCode.success.rawValue {
callBack(true)
callBack(true, nil)
} else {
callBack(false)
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBack(false, error)
}
} failBlock: { err in
if !isSilient {
YHHUD.hide()
}
callBack(false)
callBack(false, err)
}
}
}
......@@ -185,7 +185,11 @@ class YHPhoneLoginViewController: YHBaseViewController {
vc.phoneNumber = self.phoneMessageView.phoneTextField.text
self.navigationController?.pushViewController(vc)
} else {
YHHUD.flash(message: error?.errorMsg ?? "")
var msg = error?.errorMsg ?? ""
if msg.isEmpty {
msg = String(error?.errorCode ?? 404)
}
YHHUD.flash(message: msg)
#if DEBUG
let vc = YHCodeSueecssViewController()
vc.phoneNumber = self.phoneMessageView.phoneTextField.text
......
......@@ -14,7 +14,7 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
var webview = WKWebView()
var progBar = UIProgressView()
// var url = "https://www.baidu.com"
var url = "https://docs.qq.com/openapi/drive/v2/files/embed/temporary?timestamp=1710294842&id=50b4f6dab5df4497aeb23e5a54933d83&clientID=2aebc2da4f0b4883bf33ef20836f2e2d"
var url = "https://upload-cdn.galaxy-immi.com/crm/production/1620271613711.pdf"
override func viewDidLoad() {
super.viewDidLoad()
......@@ -27,6 +27,8 @@ class YHWebViewViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
// 创建wkwebview
webview = WKWebView(frame: CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height))
// webview.backgroundColor = .white//for test hjl
webview.navigationDelegate = self
// 创建网址
let url = NSURL(string: url)
......
......@@ -23,7 +23,12 @@ extension YHLoginViewModel {
let params: [String : Any] = ["type": "Phone",
"value": phone,
"extend":"register"]
// let strUrl = "http://test-cuser.galaxy-immi.com/" + YHAllApiName.User.verifyCode
let strUrl = "http://test-cuser.galaxy-immi.com/" + YHAllApiName.User.verifyCode
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.User.verifyCode
let _ = YHNetRequest.postRequest(url: strUrl, params: params) {[weak self] json, code in
guard let self = self else { return }
......
......@@ -168,6 +168,10 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
YHHUD.flash(message: "已登录: 功能完善中...")
}
let vc = YHWebViewViewController()
navigationController?.pushViewController(vc, animated: true) //for test hjl
return
......
......@@ -144,7 +144,12 @@ class YHAllApiName {
//获取验证
struct User {
#if DEBUG
static let verifyCode = "user/verify-code"
#else
static let verifyCode = "cuser/user/verify-code"
#endif
}
//预览相关接口
......@@ -197,6 +202,11 @@ class YHAllApiName {
// 我的证件-状态数量统计
static let statisticApi = "infoflow/certificate/statistic"
// 清单列表
static let documentListApi = "infoflow/certificate/certificate_document_list"
// 证件列表
static let certificateListApi = "infoflow/needUploadItems"
......
......@@ -8,37 +8,29 @@
// MARK: - 管理项目开发中需要使用到的域名地址
class YHBaseUrlManager {
static let shared = YHBaseUrlManager()
//开发环境
// static let baseUrlTest : String = "https://test-private-sphere.galaxy-immi.com/"
// static let baseUrlTest : String = "https://test.api.gateway.galaxy-immi.com/"
// static let baseUrlTest : String = "https://test-api-gateway.galaxy-immi.com/" //智汇银河 - 微信小程序
//测试环境
static let baseUrlTest : String = "http://test.api.diymanager.galaxy-immi.com/" //APP 使用域名
static let baseUrlTest : String = "https://test-app-go-api.galaxy-immi.com/" //APP 使用域名
//正式环境
static let baseUrlRelease : String = "http://test.api.diymanager.galaxy-immi.com/"
static let baseUrlRelease : String = "https://app-go-api.galaxy-immi.com/"
//测试环境-OSS
static let baseOSSUrlTest : String = "https://test-comserver.galaxy-immi.com/"
static let baseOSSUrlRelease : String = "https://test-comserver.galaxy-immi.com/"
//正式环境-OSS
static let baseOSSUrlRelease : String = "http://comserver.galaxy-immi.com/"
// static let baseOSSUrlRelease : String = "http://comserver.galaxy-immi.com/" //正式环境
//h5开发环境
//h5开发环境-H5
static let h5UrlDev : String = ""
//h5正式环境
//h5正式环境-H5
static let h5UrlRelease : String = ""
//用于外部编辑的
var urlForEditing : String?
// MARK: - 当前使用的url
func curURL() -> String {
#if DEBUG
return urlForEditing ?? YHBaseUrlManager.baseUrlTest
return YHBaseUrlManager.baseUrlTest
#else
return YHBaseUrlManager.baseUrlRelease
#endif
......@@ -46,7 +38,7 @@ class YHBaseUrlManager {
func curOssURL() -> String {
#if DEBUG
return urlForEditing ?? YHBaseUrlManager.baseOSSUrlTest
return YHBaseUrlManager.baseOSSUrlTest
#else
return YHBaseUrlManager.baseOSSUrlRelease
#endif
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Ellipse 256@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Ellipse 256@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 7417@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 7417@3x.png",
"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