Commit c9044981 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 dabb250f 01c2a1bc
......@@ -12,6 +12,8 @@ import Alamofire
class YHBaseViewModel {
// 上传方法
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 boundary = UUID().uuidString
let headers: HTTPHeaders = [
......@@ -49,7 +51,6 @@ class YHBaseViewModel {
}
}
//换取多张图片
func getPublicImageUrls(_ url: [String], callBackBlock:@escaping (_ success: [String : Any]?, _ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curOssURL() + YHAllApiName.OSS.getPublicApi
......@@ -67,4 +68,16 @@ class YHBaseViewModel {
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
}
}
......@@ -124,6 +124,7 @@ class YHFamilyRequestViewModel {
callBackBlock(nil, YHErrorModel(errorCode:Int32(json.code), errorMsg:"解析失败".local))
return
}
_ = resultModel.checkDefaultValue()
callBackBlock(resultModel, nil)
} else {
......
......@@ -100,6 +100,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
if let error = error {
YHHUD.flash(message: error.errorMsg )
} else {
YHHUD.hideFlashMessage()
self.stepView.currentIndex = self.stepView.currentIndex + 1
self.isShowPrompt = false
self.stepView.currentIndex = self.stepView.currentIndex
......
......@@ -54,6 +54,8 @@ class YHBottomNextView: UIView {
button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
button.addTarget(self, action: #selector(goNext), for: .touchUpInside)
button.backgroundColor = .brandMainColor //for test hjl
return button
}()
addSubview(nextButton)
......@@ -61,12 +63,11 @@ class YHBottomNextView: UIView {
make.right.equalTo(-16)
make.top.equalTo(10)
make.height.equalTo(44)
make.width.equalTo(247)
make.left.equalTo(saveButton.snp.right).offset(10)
}
nextButton.layoutIfNeeded()
nextButton.addYinHeGradualLayer()
nextButton.addYinHeGradualLayer()//for test hjl
}
......
......@@ -56,7 +56,7 @@ class YHCardExampleView: UIView {
}
func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
backgroundColor = UIColor(hex: 0x000000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
......@@ -187,7 +187,7 @@ class YHCardExampleView: UIView {
centerView.addSubview(imageView)
imageView.snp.makeConstraints { make in
make.top.equalTo(76)
make.left.equalTo(21 + i * 85)
make.left.equalTo(21 + i * 99)
make.width.height.equalTo(14)
}
let label = UILabel()
......@@ -197,9 +197,9 @@ class YHCardExampleView: UIView {
centerView.addSubview(label)
label.snp.makeConstraints { make in
make.top.equalTo(73)
make.left.equalTo(43 + i * 85)
make.left.equalTo(43 + i * 99)
make.height.equalTo(20)
make.width.equalTo(65)
make.width.equalTo(56)
}
}
}
......
......@@ -68,7 +68,7 @@ class YHItemView: UIView {
}()
addSubview(showPromptLabel)
showPromptLabel.snp.makeConstraints { make in
make.left.equalTo(messageTextField.snp.left)
make.left.equalTo(titleLabel.snp.left)
make.height.equalTo(20)
make.right.bottom.equalToSuperview()
}
......@@ -289,7 +289,7 @@ class YHItemView: UIView {
}
if dataSource.id == .id11 || dataSource.id == .id15 || dataSource.id == .id20 {
if dataSource.id == .id11 {
longTimeButton.isHidden = false
nextStepImageView.isHidden = true
if dataSource.message == "8888-01-01" {
......
......@@ -280,6 +280,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
make.height.equalTo(25)
make.width.equalTo(25)
}
exampleButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
}
@objc func exampleClick() {
......
......@@ -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 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 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:"请选择届满日期")
......
......@@ -119,6 +119,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
if let error = error {
YHHUD.flash(message: error.errorMsg )
} else {
YHHUD.hideFlashMessage()
if self.stepView.currentIndex == 4 || (self.stepView.currentIndex == 3 && self.viewModel.mainModel.is_project_introduction == 0) {
YHHUD.flash(message: "提交成功")
self.navigationController?.popViewController()
......
......@@ -70,7 +70,7 @@ class YHWorkExperienceItemView: UIView {
}()
addSubview(showPromptLabel)
showPromptLabel.snp.makeConstraints { make in
make.left.equalTo(messageTextField.snp.left)
make.left.equalTo(titleLabel.snp.left)
make.height.equalTo(20)
make.right.bottom.equalToSuperview()
}
......
......@@ -102,6 +102,11 @@ class YHLoginPrivacyView: UIView {
make.height.equalTo(20)
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() {
......
......@@ -45,7 +45,7 @@ class YHPrivacyAlertView: UIView {
centerView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.width.equalTo(299)
make.height.equalTo(187)
make.height.equalTo(164)
}
messageLabel = {
......@@ -74,8 +74,7 @@ class YHPrivacyAlertView: UIView {
messageLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.height.equalTo(42)
make.top.equalTo(63)
make.top.equalTo(40)
}
disAgressButton = {
......
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