Commit c4f72108 authored by Steven杜宇's avatar Steven杜宇

// plan

parent 4d4cacd4
......@@ -1227,6 +1227,8 @@
04D8FF652D93CCBA00703C75 /* YHPlanCustomerCaseListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF642D93CCBA00703C75 /* YHPlanCustomerCaseListCell.swift */; };
04D8FF672D93D15800703C75 /* YHPlanCustomerCaseCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF662D93D15800703C75 /* YHPlanCustomerCaseCollectionCell.swift */; };
04D8FF692D93D4E500703C75 /* YHPlanCustomerCaseListLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF682D93D4E500703C75 /* YHPlanCustomerCaseListLayout.swift */; };
04D8FF6B2D94EADE00703C75 /* YHPlanItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF6A2D94EADE00703C75 /* YHPlanItemView.swift */; };
04D8FF6D2D94EE1100703C75 /* YHLookPlanButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF6C2D94EE1100703C75 /* YHLookPlanButton.swift */; };
04E4CF3E2D5C6D32004D4013 /* YHCountryMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */; };
04E4CF402D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */; };
04E507D62D6EE856005F758B /* YHUserLevelAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */; };
......@@ -2493,6 +2495,8 @@
04D8FF642D93CCBA00703C75 /* YHPlanCustomerCaseListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanCustomerCaseListCell.swift; sourceTree = "<group>"; };
04D8FF662D93D15800703C75 /* YHPlanCustomerCaseCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanCustomerCaseCollectionCell.swift; sourceTree = "<group>"; };
04D8FF682D93D4E500703C75 /* YHPlanCustomerCaseListLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanCustomerCaseListLayout.swift; sourceTree = "<group>"; };
04D8FF6A2D94EADE00703C75 /* YHPlanItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanItemView.swift; sourceTree = "<group>"; };
04D8FF6C2D94EE1100703C75 /* YHLookPlanButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookPlanButton.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>"; };
04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserLevelAlertView.swift; sourceTree = "<group>"; };
......@@ -6642,6 +6646,8 @@
04D8FF642D93CCBA00703C75 /* YHPlanCustomerCaseListCell.swift */,
04D8FF682D93D4E500703C75 /* YHPlanCustomerCaseListLayout.swift */,
04D8FF662D93D15800703C75 /* YHPlanCustomerCaseCollectionCell.swift */,
04D8FF6A2D94EADE00703C75 /* YHPlanItemView.swift */,
04D8FF6C2D94EE1100703C75 /* YHLookPlanButton.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -7130,6 +7136,7 @@
045C102B2D12CA5F00BD2DC0 /* YHAppVersionForceUpdateView.swift in Sources */,
045C102C2D12CA5F00BD2DC0 /* YHMyPermissionCell.swift in Sources */,
04AFEF3F2D5D8F8A0007A011 /* YHMyNewViewController.swift in Sources */,
04D8FF6B2D94EADE00703C75 /* YHPlanItemView.swift in Sources */,
045C102D2D12CA5F00BD2DC0 /* YHHKEventModel.swift in Sources */,
045C102E2D12CA5F00BD2DC0 /* YHOfficailLetterColledtionCell.swift in Sources */,
045C102F2D12CA5F00BD2DC0 /* YHFormItemInputTextCell.swift in Sources */,
......@@ -7411,6 +7418,7 @@
045C11202D12CA5F00BD2DC0 /* UITextField+Extension.swift in Sources */,
045C11212D12CA5F00BD2DC0 /* YHPlayer.swift in Sources */,
045C11222D12CA5F00BD2DC0 /* YHAddAdoptersViewController.swift in Sources */,
04D8FF6D2D94EE1100703C75 /* YHLookPlanButton.swift in Sources */,
045C11232D12CA5F00BD2DC0 /* YHEmploymentVerificationAvailableCell.swift in Sources */,
045C11242D12CA5F00BD2DC0 /* YHHomeIdentityListVC.swift in Sources */,
045C11252D12CA5F00BD2DC0 /* YHModifySchemeInfoCell.swift in Sources */,
......
......@@ -11,7 +11,7 @@ import JXSegmentedView
class YHPlanViewController: YHBaseViewController {
var infoArr: [String] = ["", "", "", ""]
var infoArr: [String] = ["", "", "", "", "", ""]
var cases: [String] = ["水电费噶事多发结石冷风机拉萨反垃圾算法逻辑的山卡拉飞机啊索拉卡飞机啊拉卡萨",
"阿斯顿发发", "阿斯顿发生大法师懂法守法说法大萨达法司法发沙发是打发三大发实达防擦是打发",
"啊所发生的发生的放假啦苏卡达飞机拉萨开发机阿萨拉法基阿萨拉开发",
......@@ -38,7 +38,6 @@ class YHPlanViewController: YHBaseViewController {
tableView.register(YHPlanScoreCell.self, forCellReuseIdentifier: YHPlanScoreCell.cellReuseIdentifier)
tableView.register(YHPlanCustomerCaseListCell.self, forCellReuseIdentifier: YHPlanCustomerCaseListCell.cellReuseIdentifier)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
view.backgroundColor = .clear
tableView.tableHeaderView = headerView
return tableView
}()
......@@ -122,7 +121,8 @@ class YHPlanViewController: YHBaseViewController {
lazy var segmented1View: JXSegmentedView = {
let view = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: KScreenWidth, height: 30))
view.backgroundColor = .clear
view.delegate = self
// 配置指示器
let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16
......@@ -151,6 +151,7 @@ class YHPlanViewController: YHBaseViewController {
lazy var segmented2View: JXSegmentedView = {
let view = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: KScreenWidth, height: 48))
view.backgroundColor = .clear
view.delegate = self
// 配置指示器
let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16
......@@ -158,6 +159,7 @@ class YHPlanViewController: YHBaseViewController {
indicator.indicatorCornerRadius = 0.0
indicator.indicatorColor = .mainTextColor
view.indicators = [indicator]
view.dataSource = segmented2DataSource
return view
}()
......@@ -178,8 +180,7 @@ class YHPlanViewController: YHBaseViewController {
lazy var fixedSegmentView: UIView = {
let v = UIView()
v.backgroundColor = .white
segmented2View.dataSource = segmented2DataSource
v.alpha = 0.0
v.addSubview(segmented2View)
segmented2View.snp.makeConstraints { make in
......@@ -193,6 +194,33 @@ class YHPlanViewController: YHBaseViewController {
return v
}()
lazy var bottomView: UIView = {
let v = UIView()
v.backgroundColor = .white
let listView = YHPlanItemsView(frame: .zero)
v.addSubview(listView)
let button = YHLookPlanButton(frame: .zero)
v.addSubview(button)
listView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.height.equalTo(17)
make.top.equalTo(12)
}
button.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(60)
make.top.equalTo(listView.snp.bottom).offset(8)
}
return v
}()
@objc func didRevalueBtnClicked() {
}
......@@ -200,10 +228,15 @@ class YHPlanViewController: YHBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
gk_navigationBar.backgroundColor = .white
gk_navigationBar.alpha = 0.0
gk_navTitleColor = .mainTextColor
gk_navTitle = "续签至永居方案分析"
self.view.backgroundColor = .init(hex: 0xF8F9FB)
self.view.addSubview(bgImgView)
self.view.addSubview(tableView)
self.view.addSubview(fixedSegmentView)
self.view.addSubview(bottomView)
bgImgView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
......@@ -211,8 +244,9 @@ class YHPlanViewController: YHBaseViewController {
}
tableView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
fixedSegmentView.snp.makeConstraints { make in
......@@ -220,6 +254,11 @@ class YHPlanViewController: YHBaseViewController {
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(44)
}
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(102 + k_Height_safeAreaInsetsBottom())
}
}
}
......@@ -241,13 +280,13 @@ extension YHPlanViewController: UITableViewDelegate, UITableViewDataSource {
return UITableViewCell()
}
return cell1
} else if indexPath.section == 1 || indexPath.section == 2 {
} else if indexPath.section < 5 {
guard let cell2 = tableView.dequeueReusableCell(withIdentifier: YHPlanAnalyzeInfoCell.cellReuseIdentifier, for: indexPath) as? YHPlanAnalyzeInfoCell else {
return UITableViewCell()
}
cell2.products = ["", ""]
return cell2
} else if indexPath.section == 3 {
} else if indexPath.section == 5 {
guard let cell3 = tableView.dequeueReusableCell(withIdentifier: YHPlanCustomerCaseListCell.cellReuseIdentifier, for: indexPath) as? YHPlanCustomerCaseListCell else {
return UITableViewCell()
......@@ -262,7 +301,7 @@ extension YHPlanViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 3 {
if indexPath.section == 5 {
return getCaseListHeight()
}
return UITableView.automaticDimension
......@@ -318,7 +357,35 @@ extension YHPlanViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
bgImgView.isHidden = scrollView.contentOffset.y >= topScrollHeight
segmented2View.isHidden = scrollView.contentOffset.y < topScrollHeight
bgImgView.y = scrollView.contentOffset.y > 0.0 ? -scrollView.contentOffset.y : 0.0
var percent = scrollView.contentOffset.y/20.0
if percent > 1.0 {
percent = 1.0
} else if percent < 0.0 {
percent = 0.0
}
fixedSegmentView.alpha = scrollView.contentOffset.y >= topScrollHeight ? 1.0 : 0.0
tableView.y = scrollView.contentOffset.y > topScrollHeight ? k_Height_NavigationtBarAndStatuBar+44.0 : k_Height_NavigationtBarAndStatuBar
gk_navigationBar.alpha = percent
}
}
extension YHPlanViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
let index = segmentedView.selectedIndex
self.tableView.scrollToRow(at: IndexPath(row: 0, section: index), at: .top, animated: true)
if segmentedView == segmented1View {
self.segmented2View.defaultSelectedIndex = index
self.segmented2View.reloadDataWithoutListContainer()
}
if segmentedView == segmented2View {
self.segmented1View.defaultSelectedIndex = index
self.segmented1View.reloadDataWithoutListContainer()
}
}
}
//
// YHLookPlanButton.swift
// galaxy
//
// Created by Dufet on 2025/3/27.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHLookPlanButton: UIButton {
lazy var title1Label: UILabel = {
let lable = UILabel()
lable.textColor = .white
lable.textAlignment = .center
lable.font = UIFont.PFSC_M(ofSize: 16)
lable.text = "查看定制方案"
return lable
}()
lazy var title2Label: UILabel = {
let lable = UILabel()
lable.textColor = UIColor.init(hex: 0xFFFFFF, alpha: 0.6)
lable.textAlignment = .center
lable.font = UIFont.PFSC_R(ofSize: 11)
lable.text = "银河创世纪专业团队为您服务"
return lable
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
backgroundColor = .mainTextColor
self.layer.cornerRadius = 3.0
self.addSubview(title1Label)
self.addSubview(title2Label)
title1Label.snp.makeConstraints { make in
make.top.equalTo(12)
make.height.equalTo(22)
make.centerX.equalToSuperview()
}
title2Label.snp.makeConstraints { make in
make.top.equalTo(title1Label.snp.bottom).offset(0)
make.height.equalTo(14)
make.centerX.equalToSuperview()
}
}
}
//
// YHPlanItemView.swift
// galaxy
//
// Created by Dufet on 2025/3/27.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPlanItemView: UIView {
lazy var iconImgV: UIImageView = {
let v = UIImageView()
v.image = UIImage(named: "plan_item_icon")
return v
}()
lazy var titleLabel: UILabel = {
let lable = UILabel()
lable.textColor = .mainTextColor
lable.textAlignment = .center
lable.font = UIFont.PFSC_R(ofSize: 13)
lable.text = "您的续签评估等级为"
return lable
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
backgroundColor = .clear
self.addSubview(iconImgV)
self.addSubview(titleLabel)
iconImgV.snp.makeConstraints { make in
make.width.height.equalTo(12)
make.left.equalToSuperview()
make.right.equalTo(titleLabel.snp.left).offset(-4)
make.centerY.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalToSuperview()
make.height.equalTo(17)
}
}
}
class YHPlanItemsView: UIView {
lazy var item1View: YHPlanItemView = {
let v = YHPlanItemView()
v.titleLabel.text = "私人定制"
return v
}()
lazy var item2View: YHPlanItemView = {
let v = YHPlanItemView()
v.titleLabel.text = "官方计划"
return v
}()
lazy var item3View: YHPlanItemView = {
let v = YHPlanItemView()
v.titleLabel.text = "模块化配置"
return v
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
backgroundColor = .clear
self.addSubview(item1View)
self.addSubview(item2View)
self.addSubview(item3View)
item1View.snp.makeConstraints { make in
make.right.equalTo(item2View.snp.left).offset(-24)
make.height.equalTo(17)
make.centerY.equalToSuperview()
}
item3View.snp.makeConstraints { make in
make.left.equalTo(item2View.snp.right).offset(24)
make.height.equalTo(17)
make.centerY.equalToSuperview()
}
item2View.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
make.height.equalTo(17)
}
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "4.6_单选框@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "4.6_单选框@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