Commit 01c2a1bc authored by pete谢兆麟's avatar pete谢兆麟

Merge commit '35a5fa05' into xiezhaolin

parents 29ab68fc 35a5fa05
......@@ -2459,7 +2459,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -2501,7 +2501,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......
......@@ -53,8 +53,8 @@ class YHScorePersonInfoCell: UITableViewCell {
//综合得分
private lazy var scoreLable : UILabel = {
let lable0 = UILabel(text: "92 分")
lable0.textColor = UIColor(hex: 0x3C86F8)
lable0.font = UIFont.PFSC_B(ofSize: 68)
lable0.textColor = UIColor(hex: 0xFFEEB0)
lable0.font = UIFont(name: "DINAlternate-Bold", size: 68)
lable0.textAlignment = .right
return lable0
}()
......@@ -186,8 +186,8 @@ extension YHScorePersonInfoCell {
make.height.equalTo(79)
}
let a: ASAttributedString = .init("-", .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0x3C86F8)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x3C86F8)))
let a: ASAttributedString = .init("-",.font(UIFont(name: "DINAlternate-Bold", size: 68) ?? UIFont.PFSC_B(ofSize: 43)),.foreground(UIColor(hex: 0xFFEEB0)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex: 0xFFEEB0)))
scoreLable.attributed.text = a + b
}
......@@ -203,7 +203,7 @@ extension YHScorePersonInfoCell {
phoneLable.text = model.userinfo?.mobile ?? "-"
let score : String = String(model.total_score?.sum_score ?? 0)
let a: ASAttributedString = .init(NSAttributedString(string: score), .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0xFFEEB0)))
let a: ASAttributedString = .init(NSAttributedString(string: score),.font(UIFont(name: "DINAlternate-Bold", size: 68) ?? UIFont.PFSC_B(ofSize: 43)),.foreground(UIColor(hex: 0xFFEEB0)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(.white))
scoreLable.attributed.text = a + b
}
......
......@@ -215,8 +215,9 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
textField in
var max = -1
if detailItem.type == .educationMajor ||
detailItem.type == .educationCity {
if detailItem.type == .educationMajor {
max = 50
} else if detailItem.type == .educationCity {
max = 100
}
......
......@@ -11,6 +11,8 @@ import UIKit
class YHCertificateUploadVC: YHBaseViewController, YHFamilyMemberProtol {
var tableView: UITableView!
weak var delegate:YHSpouseInfoVCProtocol?
var familyMember:YHFamilyMember? {
didSet {
if let familyMember = familyMember {
......@@ -18,7 +20,15 @@ class YHCertificateUploadVC: YHBaseViewController, YHFamilyMemberProtol {
}
}
}
var viewModel: YHFamilyMemberViewModel = YHFamilyMemberViewModel()
lazy var viewModel: YHFamilyMemberViewModel = {
let model = YHFamilyMemberViewModel()
model.saveInfoSilentBlock = {
if let delegate = self.delegate, delegate.responds(to: #selector(YHSpouseInfoVCProtocol.saveInfoSilent)) {
delegate.saveInfoSilent()
}
}
return model
}()
override func viewDidLoad() {
super.viewDidLoad()
......
......@@ -285,9 +285,9 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
if detailItem.type == .childName ||
detailItem.type == .everName {
max = 30
} else if detailItem.type == .birthCity ||
detailItem.type == .occupationName
{
} else if detailItem.type == .occupationName {
max = 50
} else if detailItem.type == .birthCity {
max = 100
}
......
......@@ -94,6 +94,7 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
guard let child = child else { return }
primaryInfoVC.delegate = self
uploadVC.delegate = self
certificateVC.delegate = self
basicInfoVC.delegate = self
......
......@@ -244,6 +244,8 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
var max = -1
if detailItem.type == .brotherName {
max = 30
} else if detailItem.type == .occupationName {
max = 50
} else if detailItem.type == .birthCity {
max = 100
}
......
......@@ -287,9 +287,10 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
if detailItem.type == .fatherName ||
detailItem.type == .motherName {
max = 30
} else if detailItem.type == .birthCity ||
detailItem.type == .occupationName
{
} else if detailItem.type == .occupationName {
max = 50
} else if detailItem.type == .birthCity {
max = 100
}
......
......@@ -411,9 +411,9 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
if detailItem.type == .spouseName ||
detailItem.type == .everName {
max = 30
} else if detailItem.type == .birthCity ||
detailItem.type == .occupationName
{
} else if detailItem.type == .occupationName {
max = 50
} else if detailItem.type == .birthCity {
max = 100
}
......
......@@ -110,6 +110,7 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
guard let spouse = spouse else { return }
primaryInfoVC.delegate = self
uploadVC.delegate = self
certificateVC.delegate = self
basicInfoVC.delegate = self
......
......@@ -13,6 +13,8 @@ class YHFamilyMemberViewModel : YHBaseViewModel{
var mainModel: YHFamilyMember = YHFamilyMember()
var saveInfoSilentBlock:(()->())?
func getIDCardDataSource(_ isShowPrompt: Bool) -> [YHSectionItemModel] {
let item = YHItemModel(id: .id5, isNeed: true, title: "身份证", isUserKeyBoard: false, prompts: "请输入", message: nil, isShowPrompts: isShowPrompt)
let section = YHSectionItemModel(title: "中国身份证(选填)", models: [item])
......@@ -58,6 +60,9 @@ class YHFamilyMemberViewModel : YHBaseViewModel{
} else if item.id == .id20 {
mainModel.certificates.passport.issueDateEndAt = item.message ?? ""
}
if let saveInfoSilentBlock = saveInfoSilentBlock {
saveInfoSilentBlock()
}
}
// 更新身份证
......@@ -90,6 +95,9 @@ class YHFamilyMemberViewModel : YHBaseViewModel{
if model.card_num.count != 0 {
mainModel.certificates.cnIdentityCard.number = model.card_num
}
if let saveInfoSilentBlock = saveInfoSilentBlock {
saveInfoSilentBlock()
}
}
// 更新港澳通行证
......@@ -122,6 +130,9 @@ class YHFamilyMemberViewModel : YHBaseViewModel{
if model.card_num.count != 0 {
mainModel.certificates.hkMacaoPass.number = model.card_num
}
if let saveInfoSilentBlock = saveInfoSilentBlock {
saveInfoSilentBlock()
}
}
func updateModel(_ type: YHCardType, isFront: Bool, url: String) {
......@@ -139,6 +150,9 @@ class YHFamilyMemberViewModel : YHBaseViewModel{
mainModel.certificates.hkMacaoPass.imgBack = url
}
}
if let saveInfoSilentBlock = saveInfoSilentBlock {
saveInfoSilentBlock()
}
}
func requestCnIDCardMessage(_ url: String, isBack: Int, callBackBlock:@escaping (_ success: Bool, _ error:YHErrorModel?)->()) {
......
......@@ -124,6 +124,7 @@ class YHFamilyRequestViewModel {
callBackBlock(nil, YHErrorModel(errorCode:Int32(json.code), errorMsg:"解析失败".local))
return
}
_ = resultModel.checkDefaultValue()
callBackBlock(resultModel, nil)
} else {
......
......@@ -78,7 +78,7 @@ class YHFormItemExpireDateCell: UITableViewCell {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize: 14)
label.font = UIFont.PFSC_M(ofSize: 14)
return label
}()
......
......@@ -484,6 +484,11 @@ extension YHItemView: UITextFieldDelegate {
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.isEmpty == true {
return true
}
var newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if (dataSource?.id == .id21 || dataSource?.id == .id22 || dataSource?.id == .id23) && newText.count > 30 {
return false
......@@ -498,11 +503,11 @@ extension YHItemView: UITextFieldDelegate {
return false
}
if (dataSource?.id == .id8) && newText.count > 18 {
if (dataSource?.id == .id29) && newText.count > 20 {
return false
}
if (dataSource?.id == .id29 || dataSource?.id == .id35) && newText.count > 18 {
if (dataSource?.id == .id8 || dataSource?.id == .id35) && newText.count > 18 {
return false
}
......
......@@ -475,8 +475,13 @@ extension YHWorkExperienceItemView: UITextFieldDelegate {
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.isEmpty == true {
return true
}
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if (dataSource?.id == .id1 || dataSource?.id == .id7 || dataSource?.id == .id8 || dataSource?.id == .id12 || dataSource?.id == .id14 || dataSource?.id == .id16 || dataSource?.id == .id18) && newText.count > 1 {
if (dataSource?.id == .id1 || dataSource?.id == .id7 || dataSource?.id == .id14 || dataSource?.id == .id16 || dataSource?.id == .id18) && newText.count > 10 {
return false
}
......@@ -501,13 +506,12 @@ extension YHWorkExperienceItemView: UITextFieldDelegate {
return false
}
if dataSource?.id == .id12 && newText.count > 50 {
if (dataSource?.id == .id12 || dataSource?.id == .id8) && newText.count > 50 {
return false
}
if (dataSource?.id == .id14 || dataSource?.id == .id16 || dataSource?.id == .id18) && newText.count > 100 {
if (dataSource?.id == .id14 || dataSource?.id == .id16 || dataSource?.id == .id18) && newText.count > 10 {
return false
}
......
......@@ -69,9 +69,6 @@ class YHInformationFillTipsAlertView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
// let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
// tap.delegate = self
// addGestureRecognizer(tap)
setView()
}
......@@ -114,7 +111,7 @@ class YHInformationFillTipsAlertView: UIView {
bottomView.addSubview(checkBtn)
checkBtn.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-40)
make.bottom.equalToSuperview().offset(-24)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(48)
......@@ -133,7 +130,7 @@ class YHInformationFillTipsAlertView: UIView {
bottomView.addSubview(lable00)
lable00.snp.makeConstraints { make in
make.bottom.equalTo(checkBtn.snp.top).offset(-14)
make.bottom.equalTo(checkBtn.snp.top).offset(-26)
make.left.equalTo(41)
make.right.equalTo(-16)
make.height.equalTo(20)
......@@ -154,6 +151,8 @@ class YHInformationFillTipsAlertView: UIView {
let topView = UIView()
topView.backgroundColor = .white
topView.layer.zPosition = 1
centerView.addSubview(topView)
topView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
......@@ -172,6 +171,16 @@ class YHInformationFillTipsAlertView: UIView {
make.height.equalTo(24)
}
let closeBtn : UIButton = UIButton(type: .custom)
closeBtn.setImage(UIImage(named: "person_info_close_btn"), for: .normal)
closeBtn.setImage(UIImage(named: "person_info_close_btn"), for: .highlighted)
topView.addSubview(closeBtn)
closeBtn.addTarget(self, action: #selector(clickCloseBtn), for: .touchUpInside)
closeBtn.snp.makeConstraints { make in
make.centerY.equalTo(lable01.snp.centerY)
make.right.equalTo(-25)
make.width.height.equalTo(20)
}
let line = UIView()
line.backgroundColor = UIColor.separatorColor
......@@ -206,11 +215,13 @@ class YHInformationFillTipsAlertView: UIView {
if agreeButton.isSelected == true {
block?(true)
dismiss() //for test hjl
} else {
YHHUD.flash(message: "请先勾选确认知悉内容")
}
}
@objc func clickCloseBtn() {
dismiss()
}
@objc func onClickAgree() {
......@@ -218,15 +229,8 @@ class YHInformationFillTipsAlertView: UIView {
}
@objc func agree() {
block?(true)
// dismiss()
}
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func disagree() {
......
......@@ -23,7 +23,7 @@ class YHSubmintAllInfoSuccessTipView: UIView {
guard let model = model else {
return
}
let a: ASAttributedString = .init(NSAttributedString(string: model.sum_score), .font(UIFont.PFSC_M(ofSize: 43)),.foreground(UIColor.warnColor))
let a: ASAttributedString = .init(NSAttributedString(string: model.sum_score), .font(UIFont(name: "DINAlternate-Bold", size: 43) ?? UIFont.PFSC_M(ofSize: 43)),.foreground(UIColor.warnColor))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.labelTextColor2))
messageLabel.attributed.text = a + b
}
......
......@@ -42,14 +42,16 @@ struct PersonalModuleItem {
class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
lazy var tableView: UITableView = {
let tableView = UITableView(frame: CGRect.zero, style:.plain)
let tableView = UITableView(frame: CGRect.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.estimatedSectionHeaderHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.tableHeaderView = headerView
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.bounces = false
tableView.register(YHPersonalCenterCell.self, forCellReuseIdentifier: YHPersonalCenterCell.cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
......@@ -67,7 +69,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
PersonalModuleItem(icon: "mine_item_poster", title: "我的海报".local, type:.myPoster),
PersonalModuleItem(icon: "mine_item_code", title: "我的测评码".local, type:.myTestCode),
PersonalModuleItem(icon: "mine_item_appoint", title: "预约银河湾".local, type:.appointGalaxyBay),
PersonalModuleItem(icon: "mine_item_appoint", title: version, type:.appointGalaxyBay),
]
}()
......@@ -99,11 +100,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
return view
}()
private lazy var bgImgView:UIImageView = {
let img = UIImageView(image: UIImage(named: "mine_header_bg"))
return img
}()
override func viewDidLoad() {
super.viewDidLoad()
initView()
......@@ -127,15 +123,10 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
func initView() {
gk_navigationBar.isHidden = true
view.addSubview(bgImgView)
view.addSubview(tableView)
updateUserUI()
bgImgView.snp.makeConstraints { make in
make.left.right.top.equalTo(view)
make.height.equalTo(bgImgView.snp.width).multipliedBy(YHUserInfoHeaderView.bgRatio)
}
tableView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
......
......@@ -10,9 +10,6 @@ import UIKit
class YHUserInfoHeaderView: UIView {
static let bgRatio = 312.0/375.0 // 背景图高宽比
static let height = (KScreenWidth*bgRatio + 24)
var settingBlock:(()->Void)?
var evaluateBlock:(()->Void)?
var avatarClickBlock:(()->Void)?
......@@ -34,12 +31,12 @@ class YHUserInfoHeaderView: UIView {
private lazy var bgImgView:UIImageView = {
let imgView = UIImageView(image: UIImage(named: "mine_header_bg"))
imgView.isHidden = true
return imgView
}()
private lazy var userNameLabel:UILabel = {
let label = UILabel()
label.text = "登录/注册".local
label.textColor = UIColor(hexString:"##242424")
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_B(ofSize: 21)
......@@ -51,6 +48,7 @@ class YHUserInfoHeaderView: UIView {
private lazy var infoLabel:UILabel = {
let label = UILabel()
label.text = "点赞 0 收藏 0 最近浏览 0".local
label.textColor = UIColor(hexString:"#949DB5")
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_R(ofSize: 13)
......@@ -64,6 +62,7 @@ class YHUserInfoHeaderView: UIView {
private lazy var evaluateLabel:UILabel = {
let label = UILabel()
label.text = "香港身份20秒极速测评".local
label.textColor = UIColor(hexString:"#242424")
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_M(ofSize: 17)
......@@ -110,12 +109,13 @@ class YHUserInfoHeaderView: UIView {
}
static func createView() -> YHUserInfoHeaderView {
let view = YHUserInfoHeaderView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: Self.height))
let view = YHUserInfoHeaderView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height:310+k_Height_StatusBar))
return view
}
private func createUI() {
self.addSubview(bgImgView)
self.addSubview(settingView)
settingView.addSubview(settingBtn)
......@@ -129,13 +129,11 @@ class YHUserInfoHeaderView: UIView {
evaluateView.addSubview(evaluateLabel)
evaluateView.addSubview(evaluateBtn)
userNameLabel.text = "登录/注册".local
infoLabel.text = "点赞 0 收藏 0 最近浏览 0".local
evaluateLabel.text = "香港身份20秒极速测评".local
bgImgView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(bgImgView.snp.width).multipliedBy(Self.bgRatio)
make.left.right.equalTo(self)
let topMargin = (k_Height_StatusBar > 20.0 ? 0 : -24)
make.top.equalToSuperview().offset(topMargin)
make.height.equalTo(312.0)
}
settingView.snp.makeConstraints { make in
......@@ -145,7 +143,7 @@ class YHUserInfoHeaderView: UIView {
}
settingBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 21, height: 21))
make.width.height.equalTo(21.0)
make.right.equalToSuperview().offset(-21)
make.centerY.equalToSuperview()
}
......@@ -160,21 +158,21 @@ class YHUserInfoHeaderView: UIView {
make.left.equalTo(avarImgView)
make.top.equalTo(avarImgView.snp.bottom).offset(16)
make.right.equalToSuperview().offset(-30)
make.height.equalTo(30.0)
make.height.equalTo(25.0)
}
infoLabel.snp.makeConstraints { make in
make.left.equalTo(avarImgView)
make.right.equalToSuperview().offset(-30)
make.height.equalTo(18.0)
make.top.equalTo(userNameLabel.snp.bottom).offset(6)
make.height.equalTo(15.0)
make.top.equalTo(userNameLabel.snp.bottom).offset(10)
}
evaluateView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(evaluateView.snp.width).multipliedBy(98.0/357.0)
make.top.equalTo(infoLabel.snp.bottom).offset(9.0)
make.left.equalToSuperview().offset(10)
make.right.equalToSuperview().offset(-7)
make.height.equalTo(98)
make.top.equalTo(infoLabel.snp.bottom).offset(17.0)
}
evaluateBgImgView.snp.makeConstraints { make in
......@@ -182,15 +180,15 @@ class YHUserInfoHeaderView: UIView {
}
evaluateLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20+13)
make.centerY.equalToSuperview()
make.height.equalTo(24.0)
make.left.equalToSuperview().offset(32)
make.top.equalToSuperview().offset(33)
make.height.equalTo(20.0)
}
evaluateBtn.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-20)
make.centerY.equalToSuperview()
make.size.equalTo(CGSize(width: 72, height: 30))
make.right.equalToSuperview().offset(-35)
make.centerY.equalTo(evaluateLabel)
make.size.equalTo(CGSize(width: 72, height: 32))
}
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "测评测评@2x.png",
"filename" : "Group 2033194041 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "测评测评@3x.png",
"filename" : "Group 2033194041 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 33332868@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 33332868@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