Commit 110882e1 authored by Steven杜宇's avatar Steven杜宇

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

parents 5879beb5 431078ec
...@@ -12,6 +12,8 @@ import Alamofire ...@@ -12,6 +12,8 @@ import Alamofire
class YHBaseViewModel { class YHBaseViewModel {
// 上传方法 // 上传方法
func uploadImage(_ image: UIImage, callBackBlock:@escaping (_ success: String?, _ error:YHErrorModel?)->()) { func uploadImage(_ image: UIImage, callBackBlock:@escaping (_ success: String?, _ error:YHErrorModel?)->()) {
let size = imageSize(image: image)
YHHUD.flash(message: "\(size/1000)KB")
let strUrl = YHBaseUrlManager.shared.curOssURL() + YHAllApiName.OSS.uploadApi let strUrl = YHBaseUrlManager.shared.curOssURL() + YHAllApiName.OSS.uploadApi
let boundary = UUID().uuidString let boundary = UUID().uuidString
let headers: HTTPHeaders = [ let headers: HTTPHeaders = [
...@@ -49,7 +51,6 @@ class YHBaseViewModel { ...@@ -49,7 +51,6 @@ class YHBaseViewModel {
} }
} }
//换取多张图片 //换取多张图片
func getPublicImageUrls(_ url: [String], callBackBlock:@escaping (_ success: [String : Any]?, _ error:YHErrorModel?)->()) { func getPublicImageUrls(_ url: [String], callBackBlock:@escaping (_ success: [String : Any]?, _ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curOssURL() + YHAllApiName.OSS.getPublicApi let strUrl = YHBaseUrlManager.shared.curOssURL() + YHAllApiName.OSS.getPublicApi
...@@ -67,4 +68,16 @@ class YHBaseViewModel { ...@@ -67,4 +68,16 @@ class YHBaseViewModel {
callBackBlock(nil,err) callBackBlock(nil,err)
} }
} }
func imageSize(image: UIImage) -> Int {
// 如果是JPEG格式,可以调整压缩质量来影响文件大小
if let jpegData = image.jpegData(compressionQuality: 1.0) {
return jpegData.count
}
// 如果是PNG格式
if let pngData = image.pngData() {
return pngData.count
}
return 0 // 如果转换失败,返回0
}
} }
...@@ -100,6 +100,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -100,6 +100,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
if let error = error { if let error = error {
YHHUD.flash(message: error.errorMsg ) YHHUD.flash(message: error.errorMsg )
} else { } else {
YHHUD.hideFlashMessage()
self.stepView.currentIndex = self.stepView.currentIndex + 1 self.stepView.currentIndex = self.stepView.currentIndex + 1
self.isShowPrompt = false self.isShowPrompt = false
self.stepView.currentIndex = self.stepView.currentIndex self.stepView.currentIndex = self.stepView.currentIndex
......
...@@ -54,6 +54,8 @@ class YHBottomNextView: UIView { ...@@ -54,6 +54,8 @@ class YHBottomNextView: UIView {
button.layer.cornerRadius = kCornerRadius6 button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true button.clipsToBounds = true
button.addTarget(self, action: #selector(goNext), for: .touchUpInside) button.addTarget(self, action: #selector(goNext), for: .touchUpInside)
button.backgroundColor = .brandMainColor //for test hjl
return button return button
}() }()
addSubview(nextButton) addSubview(nextButton)
...@@ -61,12 +63,11 @@ class YHBottomNextView: UIView { ...@@ -61,12 +63,11 @@ class YHBottomNextView: UIView {
make.right.equalTo(-16) make.right.equalTo(-16)
make.top.equalTo(10) make.top.equalTo(10)
make.height.equalTo(44) make.height.equalTo(44)
make.width.equalTo(247) make.left.equalTo(saveButton.snp.right).offset(10)
} }
nextButton.layoutIfNeeded() nextButton.layoutIfNeeded()
nextButton.addYinHeGradualLayer() nextButton.addYinHeGradualLayer()//for test hjl
} }
......
...@@ -56,7 +56,7 @@ class YHCardExampleView: UIView { ...@@ -56,7 +56,7 @@ class YHCardExampleView: UIView {
} }
func setView() { func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5) backgroundColor = UIColor(hex: 0x000000, alpha: 0.5)
centerView = { centerView = {
let view = UIView() let view = UIView()
view.backgroundColor = .white view.backgroundColor = .white
...@@ -187,7 +187,7 @@ class YHCardExampleView: UIView { ...@@ -187,7 +187,7 @@ class YHCardExampleView: UIView {
centerView.addSubview(imageView) centerView.addSubview(imageView)
imageView.snp.makeConstraints { make in imageView.snp.makeConstraints { make in
make.top.equalTo(76) make.top.equalTo(76)
make.left.equalTo(21 + i * 85) make.left.equalTo(21 + i * 99)
make.width.height.equalTo(14) make.width.height.equalTo(14)
} }
let label = UILabel() let label = UILabel()
...@@ -197,9 +197,9 @@ class YHCardExampleView: UIView { ...@@ -197,9 +197,9 @@ class YHCardExampleView: UIView {
centerView.addSubview(label) centerView.addSubview(label)
label.snp.makeConstraints { make in label.snp.makeConstraints { make in
make.top.equalTo(73) make.top.equalTo(73)
make.left.equalTo(43 + i * 85) make.left.equalTo(43 + i * 99)
make.height.equalTo(20) make.height.equalTo(20)
make.width.equalTo(65) make.width.equalTo(56)
} }
} }
} }
......
...@@ -68,7 +68,7 @@ class YHItemView: UIView { ...@@ -68,7 +68,7 @@ class YHItemView: UIView {
}() }()
addSubview(showPromptLabel) addSubview(showPromptLabel)
showPromptLabel.snp.makeConstraints { make in showPromptLabel.snp.makeConstraints { make in
make.left.equalTo(messageTextField.snp.left) make.left.equalTo(titleLabel.snp.left)
make.height.equalTo(20) make.height.equalTo(20)
make.right.bottom.equalToSuperview() make.right.bottom.equalToSuperview()
} }
...@@ -289,7 +289,7 @@ class YHItemView: UIView { ...@@ -289,7 +289,7 @@ class YHItemView: UIView {
} }
if dataSource.id == .id11 || dataSource.id == .id15 || dataSource.id == .id20 { if dataSource.id == .id11 {
longTimeButton.isHidden = false longTimeButton.isHidden = false
nextStepImageView.isHidden = true nextStepImageView.isHidden = true
if dataSource.message == "8888-01-01" { if dataSource.message == "8888-01-01" {
......
...@@ -280,6 +280,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -280,6 +280,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
make.height.equalTo(25) make.height.equalTo(25)
make.width.equalTo(25) make.width.equalTo(25)
} }
exampleButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
} }
@objc func exampleClick() { @objc func exampleClick() {
......
...@@ -61,7 +61,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -61,7 +61,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let item3 = YHItemModel(id: .id11, isNeed: flag, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.cn_identity_card.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期") let item3 = YHItemModel(id: .id11, isNeed: flag, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.cn_identity_card.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期")
let section = YHSectionItemModel(title: "中国身份证", models: [item, item1, item2, item3]) let section = YHSectionItemModel(title: "中国身份证", models: [item, item1, item2, item3])
let item10 = YHItemModel(id: .id12, isNeed: true, title: "旅行证件号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.number, isShowPrompts: isShowPrompt, alertMessage:"请输入旅行证件号码") let item10 = YHItemModel(id: .id12, isNeed: true, title: "证件号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.number, isShowPrompts: isShowPrompt, alertMessage:"请输入旅行证件号码")
let item11 = YHItemModel(id: .id13, isNeed: true, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.issue_at, isShowPrompts: isShowPrompt, alertMessage:"请输入签发地") let item11 = YHItemModel(id: .id13, isNeed: true, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates.hk_macao_pass.issue_at, isShowPrompts: isShowPrompt, alertMessage:"请输入签发地")
let item12 = YHItemModel(id: .id14, isNeed: true, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择签发日期") let item12 = YHItemModel(id: .id14, isNeed: true, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_start_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择签发日期")
let item13 = YHItemModel(id: .id15, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期") let item13 = YHItemModel(id: .id15, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates.hk_macao_pass.issue_date_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期")
......
...@@ -251,9 +251,11 @@ private extension YHPreviewFamilyMemberViewController { ...@@ -251,9 +251,11 @@ private extension YHPreviewFamilyMemberViewController {
} }
} }
} }
button.setTitleColor(.black, for: .normal)
} }
sender.addYinHeGradualLayer() sender.addYinHeGradualLayer()
sender.layoutIfNeeded() sender.layoutIfNeeded()
sender.setTitleColor(.white, for: .normal)
if sender == parentButton { if sender == parentButton {
previewVM.arrDataForMainApplicationInfo = previewVM.arrDataForParents previewVM.arrDataForMainApplicationInfo = previewVM.arrDataForParents
......
...@@ -119,6 +119,7 @@ class YHWorkExperienceViewController: YHBaseViewController { ...@@ -119,6 +119,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
if let error = error { if let error = error {
YHHUD.flash(message: error.errorMsg ) YHHUD.flash(message: error.errorMsg )
} else { } else {
YHHUD.hideFlashMessage()
if self.stepView.currentIndex == 4 || (self.stepView.currentIndex == 3 && self.viewModel.mainModel.is_project_introduction == 0) { if self.stepView.currentIndex == 4 || (self.stepView.currentIndex == 3 && self.viewModel.mainModel.is_project_introduction == 0) {
YHHUD.flash(message: "提交成功") YHHUD.flash(message: "提交成功")
self.navigationController?.popViewController() self.navigationController?.popViewController()
......
...@@ -70,7 +70,7 @@ class YHWorkExperienceItemView: UIView { ...@@ -70,7 +70,7 @@ class YHWorkExperienceItemView: UIView {
}() }()
addSubview(showPromptLabel) addSubview(showPromptLabel)
showPromptLabel.snp.makeConstraints { make in showPromptLabel.snp.makeConstraints { make in
make.left.equalTo(messageTextField.snp.left) make.left.equalTo(titleLabel.snp.left)
make.height.equalTo(20) make.height.equalTo(20)
make.right.bottom.equalToSuperview() make.right.bottom.equalToSuperview()
} }
......
...@@ -30,14 +30,6 @@ class YHInformationFillTipsCell: UITableViewCell { ...@@ -30,14 +30,6 @@ class YHInformationFillTipsCell: UITableViewCell {
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
} }
extension YHInformationFillTipsCell { extension YHInformationFillTipsCell {
...@@ -102,7 +94,6 @@ extension YHInformationFillTipsCell { ...@@ -102,7 +94,6 @@ extension YHInformationFillTipsCell {
lable2.snp.makeConstraints { make in lable2.snp.makeConstraints { make in
make.top.equalTo(lable1.snp.bottom).offset(12) make.top.equalTo(lable1.snp.bottom).offset(12)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
// make.bottom.equalToSuperview().offset(-16)//for test hjl
} }
let holdView2 = UIView() let holdView2 = UIView()
...@@ -242,11 +233,15 @@ extension YHInformationFillTipsCell { ...@@ -242,11 +233,15 @@ extension YHInformationFillTipsCell {
make.top.equalTo(holdView2.snp.bottom).offset(12) make.top.equalTo(holdView2.snp.bottom).offset(12)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-8) make.bottom.equalToSuperview().offset(-8)
make.height.equalTo(120)
} }
let tImageV : UIImageView = UIImageView(image: UIImage(named: "entry_bkg"))
tImageV.contentMode = .scaleAspectFill
holdView3.addSubview(tImageV)
tImageV.snp.makeConstraints { make in
make.edges.equalTo(0)
}
let imageV4 = UIImageView() let imageV4 = UIImageView()
...@@ -284,7 +279,6 @@ extension YHInformationFillTipsCell { ...@@ -284,7 +279,6 @@ extension YHInformationFillTipsCell {
make.right.equalToSuperview().offset(-16) make.right.equalToSuperview().offset(-16)
} }
let lable10 = UILabel(text: "* 申请过程中有任何疑问,请随时联系专属服务群内的专业文案老师为您解答护航。") let lable10 = UILabel(text: "* 申请过程中有任何疑问,请随时联系专属服务群内的专业文案老师为您解答护航。")
lable10.numberOfLines = 0 lable10.numberOfLines = 0
lable10.lineBreakMode = .byWordWrapping lable10.lineBreakMode = .byWordWrapping
...@@ -295,7 +289,6 @@ extension YHInformationFillTipsCell { ...@@ -295,7 +289,6 @@ extension YHInformationFillTipsCell {
make.top.equalTo(lable9.snp.bottom).offset(7) make.top.equalTo(lable9.snp.bottom).offset(7)
make.left.equalTo(lable9.snp.left) make.left.equalTo(lable9.snp.left)
make.right.equalToSuperview().offset(-16) make.right.equalToSuperview().offset(-16)
make.bottom.equalToSuperview().offset(-18)
} }
holdView3.layoutIfNeeded() holdView3.layoutIfNeeded()
...@@ -305,8 +298,5 @@ extension YHInformationFillTipsCell { ...@@ -305,8 +298,5 @@ extension YHInformationFillTipsCell {
imageV44.contentMode = .scaleAspectFill imageV44.contentMode = .scaleAspectFill
imageV44.layer.zPosition = -1 imageV44.layer.zPosition = -1
holdView3.addSubview(imageV44) holdView3.addSubview(imageV44)
// imageV44.snp.makeConstraints { make in
// make.edges.equalTo(0)
// }
} }
} }
...@@ -151,7 +151,7 @@ extension YHInformationPerfectCell { ...@@ -151,7 +151,7 @@ extension YHInformationPerfectCell {
if dataModel?.isLastestCell == true { if dataModel?.isLastestCell == true {
bottomImagV.isHidden = true bottomImagV.isHidden = true
} else { } else {
bottomImagV.isHidden = false
if dataModel?.isFinished == true { if dataModel?.isFinished == true {
bottomImagV.image = UIImage(named: "top_image") bottomImagV.image = UIImage(named: "top_image")
} else { } else {
......
...@@ -102,6 +102,11 @@ class YHLoginPrivacyView: UIView { ...@@ -102,6 +102,11 @@ class YHLoginPrivacyView: UIView {
make.height.equalTo(20) make.height.equalTo(20)
make.width.equalTo(80) make.width.equalTo(80)
} }
agreeButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
serviceButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
privacyButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
} }
@objc func agreeClick() { @objc func agreeClick() {
......
...@@ -45,7 +45,7 @@ class YHPrivacyAlertView: UIView { ...@@ -45,7 +45,7 @@ class YHPrivacyAlertView: UIView {
centerView.snp.makeConstraints { make in centerView.snp.makeConstraints { make in
make.center.equalToSuperview() make.center.equalToSuperview()
make.width.equalTo(299) make.width.equalTo(299)
make.height.equalTo(187) make.height.equalTo(164)
} }
messageLabel = { messageLabel = {
...@@ -74,8 +74,7 @@ class YHPrivacyAlertView: UIView { ...@@ -74,8 +74,7 @@ class YHPrivacyAlertView: UIView {
messageLabel.snp.makeConstraints { make in messageLabel.snp.makeConstraints { make in
make.left.equalTo(22) make.left.equalTo(22)
make.right.equalTo(-22) make.right.equalTo(-22)
make.height.equalTo(42) make.top.equalTo(40)
make.top.equalTo(63)
} }
disAgressButton = { disAgressButton = {
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2461@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2461@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