Commit 59be68e1 authored by Steven杜宇's avatar Steven杜宇

// plan

parent aa8f8b3c
...@@ -1244,6 +1244,8 @@ ...@@ -1244,6 +1244,8 @@
04D8FF6F2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF6E2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift */; }; 04D8FF6F2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF6E2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift */; };
04D8FF712D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF702D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift */; }; 04D8FF712D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF702D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift */; };
04D8FF732D96759400703C75 /* YHPlanScoreLevelTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF722D96759400703C75 /* YHPlanScoreLevelTextView.swift */; }; 04D8FF732D96759400703C75 /* YHPlanScoreLevelTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF722D96759400703C75 /* YHPlanScoreLevelTextView.swift */; };
04D8FF752D978CF000703C75 /* YHPlanLinkShareView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF742D978CF000703C75 /* YHPlanLinkShareView.swift */; };
04D8FF772D979BCC00703C75 /* YHPlanPolicyDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF762D979BCC00703C75 /* YHPlanPolicyDetailViewController.swift */; };
04E4CF3E2D5C6D32004D4013 /* YHCountryMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */; }; 04E4CF3E2D5C6D32004D4013 /* YHCountryMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */; };
04E4CF402D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */; }; 04E4CF402D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */; };
04E507D62D6EE856005F758B /* YHUserLevelAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */; }; 04E507D62D6EE856005F758B /* YHUserLevelAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */; };
...@@ -2527,6 +2529,8 @@ ...@@ -2527,6 +2529,8 @@
04D8FF6E2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanPolicyCarouselView.swift; sourceTree = "<group>"; }; 04D8FF6E2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanPolicyCarouselView.swift; sourceTree = "<group>"; };
04D8FF702D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanPolicyCarouselImageCell.swift; sourceTree = "<group>"; }; 04D8FF702D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanPolicyCarouselImageCell.swift; sourceTree = "<group>"; };
04D8FF722D96759400703C75 /* YHPlanScoreLevelTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanScoreLevelTextView.swift; sourceTree = "<group>"; }; 04D8FF722D96759400703C75 /* YHPlanScoreLevelTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanScoreLevelTextView.swift; sourceTree = "<group>"; };
04D8FF742D978CF000703C75 /* YHPlanLinkShareView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanLinkShareView.swift; sourceTree = "<group>"; };
04D8FF762D979BCC00703C75 /* YHPlanPolicyDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanPolicyDetailViewController.swift; sourceTree = "<group>"; };
04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCountryMessageView.swift; sourceTree = "<group>"; }; 04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCountryMessageView.swift; sourceTree = "<group>"; };
04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectPhoneCountryViewController.swift; sourceTree = "<group>"; }; 04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectPhoneCountryViewController.swift; sourceTree = "<group>"; };
04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserLevelAlertView.swift; sourceTree = "<group>"; }; 04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserLevelAlertView.swift; sourceTree = "<group>"; };
...@@ -6719,6 +6723,7 @@ ...@@ -6719,6 +6723,7 @@
04A750D52D94242000974E5F /* YHSurveySubmitDoneViewController.swift */, 04A750D52D94242000974E5F /* YHSurveySubmitDoneViewController.swift */,
04A750D72D94F3F400974E5F /* YHSurveyMatchResultViewController.swift */, 04A750D72D94F3F400974E5F /* YHSurveyMatchResultViewController.swift */,
04A750D92D94FDDF00974E5F /* YHSurveyMatchingViewController.swift */, 04A750D92D94FDDF00974E5F /* YHSurveyMatchingViewController.swift */,
04D8FF762D979BCC00703C75 /* YHPlanPolicyDetailViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -6740,6 +6745,7 @@ ...@@ -6740,6 +6745,7 @@
04D8FF6E2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift */, 04D8FF6E2D954D9B00703C75 /* YHPlanPolicyCarouselView.swift */,
04D8FF702D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift */, 04D8FF702D9550E700703C75 /* YHPlanPolicyCarouselImageCell.swift */,
04D8FF722D96759400703C75 /* YHPlanScoreLevelTextView.swift */, 04D8FF722D96759400703C75 /* YHPlanScoreLevelTextView.swift */,
04D8FF742D978CF000703C75 /* YHPlanLinkShareView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -7721,6 +7727,7 @@ ...@@ -7721,6 +7727,7 @@
045C11D02D12CA5F00BD2DC0 /* YHIdentityCardCell.swift in Sources */, 045C11D02D12CA5F00BD2DC0 /* YHIdentityCardCell.swift in Sources */,
045C11D12D12CA5F00BD2DC0 /* UINavigationController+Extension.swift in Sources */, 045C11D12D12CA5F00BD2DC0 /* UINavigationController+Extension.swift in Sources */,
04307BB42D21623300ED8E8D /* YHRecommendedAppointmentLiveView.swift in Sources */, 04307BB42D21623300ED8E8D /* YHRecommendedAppointmentLiveView.swift in Sources */,
04D8FF772D979BCC00703C75 /* YHPlanPolicyDetailViewController.swift in Sources */,
045C11D22D12CA5F00BD2DC0 /* YHPrincipleWaitResultViewController.swift in Sources */, 045C11D22D12CA5F00BD2DC0 /* YHPrincipleWaitResultViewController.swift in Sources */,
045C11D32D12CA5F00BD2DC0 /* YHInvitationWithGiftsShareBottomView.swift in Sources */, 045C11D32D12CA5F00BD2DC0 /* YHInvitationWithGiftsShareBottomView.swift in Sources */,
045C11D42D12CA5F00BD2DC0 /* YHPreviewInfoSingleLineTitleView.swift in Sources */, 045C11D42D12CA5F00BD2DC0 /* YHPreviewInfoSingleLineTitleView.swift in Sources */,
...@@ -7933,6 +7940,7 @@ ...@@ -7933,6 +7940,7 @@
045C12872D12CA5F00BD2DC0 /* YHStatusAdvantageVC.swift in Sources */, 045C12872D12CA5F00BD2DC0 /* YHStatusAdvantageVC.swift in Sources */,
045C12882D12CA5F00BD2DC0 /* YHHKPlanDoctumentVC.swift in Sources */, 045C12882D12CA5F00BD2DC0 /* YHHKPlanDoctumentVC.swift in Sources */,
045C12892D12CA5F00BD2DC0 /* YHHomeHeadView.swift in Sources */, 045C12892D12CA5F00BD2DC0 /* YHHomeHeadView.swift in Sources */,
04D8FF752D978CF000703C75 /* YHPlanLinkShareView.swift in Sources */,
0411CF062D1A88EA00644D35 /* YHGCDocListCell.swift in Sources */, 0411CF062D1A88EA00644D35 /* YHGCDocListCell.swift in Sources */,
045C128A2D12CA5F00BD2DC0 /* YHAITextInputView.swift in Sources */, 045C128A2D12CA5F00BD2DC0 /* YHAITextInputView.swift in Sources */,
045C128B2D12CA5F00BD2DC0 /* YHWorkExpDataModel.swift in Sources */, 045C128B2D12CA5F00BD2DC0 /* YHWorkExpDataModel.swift in Sources */,
......
//
// YHPlanPolicyDetailViewController.swift
// galaxy
//
// Created by Dufet on 2025/3/29.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPlanPolicyDetailViewController: YHBaseViewController {
var urls: [String] = []
lazy var scrollView: UIScrollView = {
let v = UIScrollView(frame: .zero)
return v
}()
lazy var shareBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .white
btn.setTitle("分享", for: .normal)
btn.setTitleColor(.mainTextColor, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 16)
btn.layer.cornerRadius = 3.0
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return btn
}()
override func viewDidLoad() {
super.viewDidLoad()
gk_backImage = UIImage(named: "nav_back_white")
gk_navTitle = "1/24"
gk_navTitleColor = .white
view.backgroundColor = .init(hex: 0x000000, alpha: 1.0)
view.addSubview(scrollView)
view.addSubview(shareBtn)
scrollView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar+24.0)
make.height.equalTo(520)
}
shareBtn.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(46)
make.top.equalTo(scrollView.snp.bottom).offset(32)
}
}
}
...@@ -48,16 +48,23 @@ class YHPlanViewController: YHBaseViewController { ...@@ -48,16 +48,23 @@ class YHPlanViewController: YHBaseViewController {
lazy var whiteBackBtn: UIButton = { lazy var whiteBackBtn: UIButton = {
let v = UIButton() let v = UIButton()
v.setImage(UIImage(named: "back_icon_white"), for: .normal) v.setImage(UIImage(named: "nav_back_white"), for: .normal)
v.addTarget(self, action: #selector(backItemClick(_:)), for: .touchUpInside)
return v return v
}() }()
lazy var shareBtn: UIButton = { lazy var shareBtn: UIButton = {
let v = UIButton() let v = UIButton()
v.setImage(UIImage(named: "plan_nav_share"), for: .normal) v.setImage(UIImage(named: "plan_nav_share"), for: .normal)
v.addTarget(self, action: #selector(didShareBtnClicked), for: .touchUpInside)
return v return v
}() }()
@objc func didShareBtnClicked() {
let vc = YHPlanPolicyDetailViewController()
self.navigationController?.pushViewController(vc)
}
lazy var headerView: UIView = { lazy var headerView: UIView = {
let v = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: headerViewHeight)) let v = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: headerViewHeight))
v.addSubview(titleImgView) v.addSubview(titleImgView)
...@@ -245,6 +252,7 @@ class YHPlanViewController: YHBaseViewController { ...@@ -245,6 +252,7 @@ class YHPlanViewController: YHBaseViewController {
@objc func didRevalueBtnClicked() { @objc func didRevalueBtnClicked() {
YHPlanLinkShareView.alertView().show()
} }
override func viewDidLoad() { override func viewDidLoad() {
...@@ -414,6 +422,7 @@ extension YHPlanViewController: UIScrollViewDelegate { ...@@ -414,6 +422,7 @@ extension YHPlanViewController: UIScrollViewDelegate {
fixedSegmentView.alpha = scrollView.contentOffset.y >= topScrollHeight ? 1.0 : 0.0 fixedSegmentView.alpha = scrollView.contentOffset.y >= topScrollHeight ? 1.0 : 0.0
gk_navigationBar.alpha = percent gk_navigationBar.alpha = percent
whiteBackBtn.isHidden = percent >= 1.0 whiteBackBtn.isHidden = percent >= 1.0
shareBtn.isHidden = percent >= 1.0 shareBtn.isHidden = percent >= 1.0
if scrollView.contentOffset.y > topScrollHeight { if scrollView.contentOffset.y > topScrollHeight {
......
//
// YHPlanLinkShareView.swift
// galaxy
//
// Created by Dufet on 2025/3/29.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum YHPlanShareItemButtonType: Int {
case wechat = 1
case copyLink = 2
case saveImg = 3
case cancel = 4
}
class YHPlanShareItemButton: UIButton {
lazy var iconImgV: UIImageView = {
let v = UIImageView()
return v
}()
lazy var textLabel: UILabel = {
let lable = UILabel()
lable.textColor = .init(hex: 0x666666)
lable.textAlignment = .center
lable.font = UIFont.PFSC_R(ofSize: 13)
return lable
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.addSubview(iconImgV)
self.addSubview(textLabel)
iconImgV.snp.makeConstraints { make in
make.width.height.equalTo(48)
make.top.equalTo(0)
make.centerX.equalToSuperview()
}
textLabel.snp.makeConstraints { make in
make.top.equalTo(iconImgV.snp.bottom).offset(8)
make.centerX.equalToSuperview()
make.height.equalTo(18)
}
}
}
class YHPlanLinkShareView: UIView {
let wechatBtnTag = 9527
let copyLinkTag = 9528
let saveImgTag = 9529
let cancelTag = 9530
var clickBlock: ((YHPlanShareItemButtonType) -> Void)?
lazy var whiteContentView: UIView = {
let v = UIView()
v.backgroundColor = .white
v.layer.cornerRadius = 12.0
v.clipsToBounds = true
return v
}()
lazy var cancelBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .init(hex: 0xF5F6F8)
btn.setTitle("取消", for: .normal)
btn.setTitleColor(.mainTextColor, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 16)
btn.layer.cornerRadius = 3.0
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return btn
}()
lazy var wechatBtn: YHPlanShareItemButton = {
let v = YHPlanShareItemButton()
v.tag = wechatBtnTag
v.textLabel.text = "微信"
v.iconImgV.image = UIImage(named: "plan_share_wechat")
v.addTarget(self, action: #selector(didFunctionBtnClicked(_:)), for: .touchUpInside)
return v
}()
lazy var copyLinkBtn: YHPlanShareItemButton = {
let v = YHPlanShareItemButton()
v.tag = copyLinkTag
v.textLabel.text = "复制链接"
v.iconImgV.image = UIImage(named: "plan_share_copy")
v.addTarget(self, action: #selector(didFunctionBtnClicked(_:)), for: .touchUpInside)
return v
}()
lazy var saveImgBtn: YHPlanShareItemButton = {
let v = YHPlanShareItemButton()
v.tag = saveImgTag
v.textLabel.text = "保存图片"
v.iconImgV.image = UIImage(named: "plan_share_save")
v.addTarget(self, action: #selector(didFunctionBtnClicked(_:)), for: .touchUpInside)
return v
}()
static func alertView() -> YHPlanLinkShareView {
let v = YHPlanLinkShareView(frame: UIScreen.main.bounds)
return v
}
@objc func didFunctionBtnClicked(_ sender: UIButton) {
if sender.tag == wechatBtnTag {
clickBlock?(.wechat)
} else if sender.tag == copyLinkTag {
clickBlock?(.copyLink)
} else if sender.tag == saveImgTag {
clickBlock?(.saveImg)
} else if sender.tag == cancelTag {
dismiss()
}
}
@objc func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
DispatchQueue.main.async {
self.removeFromSuperview()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.backgroundColor = .init(hex: 0x000000, alpha: 0.7)
self.addSubview(whiteContentView)
whiteContentView.addSubview(wechatBtn)
whiteContentView.addSubview(copyLinkBtn)
whiteContentView.addSubview(saveImgBtn)
whiteContentView.addSubview(cancelBtn)
whiteContentView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(216)
}
copyLinkBtn.snp.makeConstraints { make in
make.width.equalTo(64)
make.height.equalTo(74)
make.top.equalTo(20)
make.centerX.equalToSuperview()
}
wechatBtn.snp.makeConstraints { make in
make.width.equalTo(64)
make.height.equalTo(74)
make.top.equalTo(20)
make.right.equalTo(copyLinkBtn.snp.left).offset(-70)
}
saveImgBtn.snp.makeConstraints { make in
make.width.equalTo(64)
make.height.equalTo(74)
make.top.equalTo(20)
make.left.equalTo(copyLinkBtn.snp.right).offset(70)
}
cancelBtn.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(46)
make.top.equalTo(copyLinkBtn.snp.bottom).offset(24)
}
}
}
...@@ -87,6 +87,7 @@ class YHPlanScoreLevelTextView: UIView { ...@@ -87,6 +87,7 @@ class YHPlanScoreLevelTextView: UIView {
let btn = UIButton() let btn = UIButton()
btn.setImage(UIImage(named: "plan_score_level_close"), for: .normal) btn.setImage(UIImage(named: "plan_score_level_close"), for: .normal)
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside) btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
return btn return btn
}() }()
...@@ -166,7 +167,7 @@ class YHPlanScoreLevelTextView: UIView { ...@@ -166,7 +167,7 @@ class YHPlanScoreLevelTextView: UIView {
} }
closeBtn.snp.makeConstraints { make in closeBtn.snp.makeConstraints { make in
make.width.height.equalTo(16) make.width.height.equalTo(24)
make.centerY.equalTo(titleLabel) make.centerY.equalTo(titleLabel)
make.right.equalTo(-20) make.right.equalTo(-20)
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "24pt导航栏@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "24pt导航栏@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "复制链接@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "复制链接@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "保存图片@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "保存图片@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_wxhy@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_wxhy@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