Commit edb64f3d authored by pete谢兆麟's avatar pete谢兆麟

弹窗提示

parent 592687ba
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
044D0C002C21663300C5CF5E /* YHMyInformationItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044D0BFF2C21663300C5CF5E /* YHMyInformationItemCell.swift */; }; 044D0C002C21663300C5CF5E /* YHMyInformationItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044D0BFF2C21663300C5CF5E /* YHMyInformationItemCell.swift */; };
044D0C022C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044D0C012C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift */; }; 044D0C022C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044D0C012C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift */; };
044D0C042C2180B700C5CF5E /* YHInformationAuthorizationStepTwoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044D0C032C2180B700C5CF5E /* YHInformationAuthorizationStepTwoViewController.swift */; }; 044D0C042C2180B700C5CF5E /* YHInformationAuthorizationStepTwoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044D0C032C2180B700C5CF5E /* YHInformationAuthorizationStepTwoViewController.swift */; };
044D0C062C22736F00C5CF5E /* YHSetExplainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044D0C052C22736F00C5CF5E /* YHSetExplainView.swift */; };
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */; }; 045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */; };
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */; }; 045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */; };
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */; }; 045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */; };
...@@ -575,6 +576,7 @@ ...@@ -575,6 +576,7 @@
044D0BFF2C21663300C5CF5E /* YHMyInformationItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyInformationItemCell.swift; sourceTree = "<group>"; }; 044D0BFF2C21663300C5CF5E /* YHMyInformationItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyInformationItemCell.swift; sourceTree = "<group>"; };
044D0C012C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationAuthorizeViewModel.swift; sourceTree = "<group>"; }; 044D0C012C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationAuthorizeViewModel.swift; sourceTree = "<group>"; };
044D0C032C2180B700C5CF5E /* YHInformationAuthorizationStepTwoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationAuthorizationStepTwoViewController.swift; sourceTree = "<group>"; }; 044D0C032C2180B700C5CF5E /* YHInformationAuthorizationStepTwoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationAuthorizationStepTwoViewController.swift; sourceTree = "<group>"; };
044D0C052C22736F00C5CF5E /* YHSetExplainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSetExplainView.swift; sourceTree = "<group>"; };
045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewViewModel.swift; sourceTree = "<group>"; }; 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewViewModel.swift; sourceTree = "<group>"; };
045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewForOtherInfoModel.swift; sourceTree = "<group>"; }; 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewForOtherInfoModel.swift; sourceTree = "<group>"; };
045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPersonInfoCellModel2.swift; sourceTree = "<group>"; }; 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPersonInfoCellModel2.swift; sourceTree = "<group>"; };
...@@ -2035,6 +2037,7 @@ ...@@ -2035,6 +2037,7 @@
04F9574C2C20644E003C631C /* YHFriendsResponseView.swift */, 04F9574C2C20644E003C631C /* YHFriendsResponseView.swift */,
04FD85712C21786900BEF9C5 /* YHNameCardInfoView.swift */, 04FD85712C21786900BEF9C5 /* YHNameCardInfoView.swift */,
044D0BFF2C21663300C5CF5E /* YHMyInformationItemCell.swift */, 044D0BFF2C21663300C5CF5E /* YHMyInformationItemCell.swift */,
044D0C052C22736F00C5CF5E /* YHSetExplainView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2886,6 +2889,7 @@ ...@@ -2886,6 +2889,7 @@
A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */, A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */,
045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */, 045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */,
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */, 044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */,
044D0C062C22736F00C5CF5E /* YHSetExplainView.swift in Sources */,
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */, 045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */, A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */,
048787D52BCE880B0036E221 /* YHServiceOrderListViewController.swift in Sources */, 048787D52BCE880B0036E221 /* YHServiceOrderListViewController.swift in Sources */,
......
//
// YHSetExplainView.swift
// galaxy
//
// Created by EDY on 2024/6/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSetExplainView: UIView {
var centerView: UIView!
var titleLabel: UILabel!
var closeButton: UIButton!
var lineView: UIView!
var messageLabel: UILabel!
var topImageView: UIImageView!
var bottomImageView: UIImageView!
var bottomButton: UIButton!
var type: YHSettingType? {
didSet {
guard let type = type else { return }
switch type {
case .normal: break
case .people:
titleLabel.text = "授权AI人脉匹配"
messageLabel.text = "启动该功能后,您将能够使用AI人脉雷达来高效匹配新人脉,申请交换名片并成功成为好友后,双方可互相查看名片。信息准确度越高,匹配结果越精准"
topImageView.image = UIImage(named: "set_example_people")
case .school:
titleLabel.text = "允许向好友公开您的教育经历"
messageLabel.text = "授权开启后,您的个人主页将展示最高学历信息,仅对好友人脉开放查看权限,保护您的隐私安全"
topImageView.image = UIImage(named: "set_example_school")
case .work:
titleLabel.text = "允许向好友公开您的工作经历"
messageLabel.text = "授权开启后,您的个人主页将展示最新工作信息,仅对好友人脉开放查看权限,保护您的隐私安全"
topImageView.image = UIImage(named: "set_example_work")
}
}
}
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()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x000000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(592)
}
titleLabel = {
let label = UILabel()
label.text = "身份证示例模板"
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.height.equalTo(21)
make.top.equalTo(16)
}
closeButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_close"), for: .normal)
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return button
}()
centerView.addSubview(closeButton)
closeButton.snp.makeConstraints { make in
make.right.equalTo(-21)
make.width.height.equalTo(24)
make.top.equalTo(16)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(52)
make.height.equalTo(1)
make.right.equalTo(-18)
}
messageLabel = {
let label = UILabel()
label.text = "须使用二代身份证"
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.placeHolderColor
label.textAlignment = .left
label.numberOfLines = 0
return label
}()
centerView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(426)
}
topImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "service_card_id_back")
imageView.layer.cornerRadius = kCornerRadius6
imageView.clipsToBounds = true
return imageView
}()
centerView.addSubview(topImageView)
topImageView.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.height.equalTo(333)
make.top.equalTo(73)
}
bottomButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x4d9ffb)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("知道了", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return button
}()
centerView.addSubview(bottomButton)
bottomButton.snp.makeConstraints { make in
make.right.equalTo(-21)
make.left.equalTo(21)
make.bottom.equalTo(-42)
make.height.equalTo(48)
}
bottomButton.layoutIfNeeded()
bottomButton.addYinHeGradualLayer()
}
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func dismiss() {
removeFromSuperview()
}
}
extension YHSetExplainView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
...@@ -65,8 +65,8 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel { ...@@ -65,8 +65,8 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
func getBaseSetDataSource() -> [YHSettingItem] { func getBaseSetDataSource() -> [YHSettingItem] {
let item1 = YHSettingItem(type: .people, title: "授权AI人脉匹配", subTitle: "开启后,您的信息将用于AI人脉匹配,为您构建高质量的人脉网络", isSelect: setModel.isRea, isShowAlert: true) let item1 = YHSettingItem(type: .people, title: "授权AI人脉匹配", subTitle: "开启后,您的信息将用于AI人脉匹配,为您构建高质量的人脉网络", isSelect: setModel.isRea, isShowAlert: true)
let item2 = YHSettingItem(type: .people, title: "允许向好友公开您的教育经历", subTitle: "开启后,您的教育经历将在您的个人名片上对已交换名片的好友可见", isSelect: setModel.isSchool, isShowAlert: true) let item2 = YHSettingItem(type: .school, title: "允许向好友公开您的教育经历", subTitle: "开启后,您的教育经历将在您的个人名片上对已交换名片的好友可见", isSelect: setModel.isSchool, isShowAlert: true)
let item3 = YHSettingItem(type: .people, title: "允许向好友公开您的工作经历", subTitle: "开启后,您的工作经历将在您的个人名片上对已交换名片的好友可见", isSelect: setModel.isWork, isShowAlert: true) let item3 = YHSettingItem(type: .work, title: "允许向好友公开您的工作经历", subTitle: "开启后,您的工作经历将在您的个人名片上对已交换名片的好友可见", isSelect: setModel.isWork, isShowAlert: true)
return [item1, item2, item3] return [item1, item2, item3]
} }
......
...@@ -104,7 +104,11 @@ class YHAllowSettingTableViewCell: UITableViewCell { ...@@ -104,7 +104,11 @@ class YHAllowSettingTableViewCell: UITableViewCell {
} }
@objc func exampleClick() { @objc func exampleClick() {
guard let model = item else { return }
let view = YHSetExplainView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.type = model.type
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
} }
@objc func switchViewChange() { @objc func switchViewChange() {
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "set_example_people@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "set_example_people@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "set_example_school@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "set_example_school@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "set_example_work@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "set_example_work@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