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

// 关于我们page

parent fc65b59e
......@@ -10,6 +10,8 @@
0468D41D2B47D20600CFB916 /* YHHomeNetWorkServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D41C2B47D20600CFB916 /* YHHomeNetWorkServer.swift */; };
04808C062B4686510056D53C /* ATAuthSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 04808C042B4686510056D53C /* ATAuthSDK.bundle */; };
04808C082B4686C10056D53C /* ATAuthSDK_D.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04808C032B4686510056D53C /* ATAuthSDK_D.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; };
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; };
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; };
......@@ -106,6 +108,8 @@
0468D41C2B47D20600CFB916 /* YHHomeNetWorkServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeNetWorkServer.swift; sourceTree = "<group>"; };
04808C032B4686510056D53C /* ATAuthSDK_D.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ATAuthSDK_D.framework; sourceTree = "<group>"; };
04808C042B4686510056D53C /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = ATAuthSDK.bundle; sourceTree = "<group>"; };
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; };
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; };
58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; };
987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
......@@ -360,6 +364,7 @@
isa = PBXGroup;
children = (
A5ACE8EA2B4564F7002C94D2 /* YHMyViewController.swift */,
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */,
);
path = C;
sourceTree = "<group>";
......@@ -369,6 +374,7 @@
children = (
A5ACE8EC2B4564F7002C94D2 /* Algorithm.swift */,
A5ACE8ED2B4564F7002C94D2 /* YHPersonalCenterCell.swift */,
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -753,6 +759,7 @@
A5ACE92C2B4564F7002C94D2 /* YHLoginStyleButton.swift in Sources */,
A5ACE92F2B4564F7002C94D2 /* YHMyViewController.swift in Sources */,
A5ACE9332B4564F7002C94D2 /* NetBaseModel.swift in Sources */,
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */,
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */,
A5ACE9542B4564F7002C94D2 /* YHNavigationController.swift in Sources */,
A5ACE95E2B4571BF002C94D2 /* YHHomeViewController.swift in Sources */,
......@@ -793,6 +800,7 @@
A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */,
A5ACE93C2B4564F7002C94D2 /* UIColor+Extension.swift in Sources */,
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */,
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */,
A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */,
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */,
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
......
//
// YHAboutUsViewController.swift
// galaxy
//
// Created by edy on 2024/1/6.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
import DeviceKit
class YHAboutUsViewController: YHBaseViewController {
lazy var collectView = {
// 设置布局方向
let flowLayout = UICollectionViewFlowLayout()
let margin = 18.0
let gap = 12.0
let itemWidth = floor((KScreenWidth-2*margin-gap)/2.0)
flowLayout.itemSize = CGSize(width: itemWidth, height: itemWidth)
flowLayout.minimumInteritemSpacing = 12.0
flowLayout.scrollDirection = .vertical
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.contentInset = UIEdgeInsets(top: 0, left: margin, bottom: 0, right: margin)
collectinoView.backgroundColor = UIColor.white
collectinoView.register(YHAboutUsAdvantageCell.self, forCellWithReuseIdentifier:YHAboutUsAdvantageCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
return collectinoView
}()
lazy var aboutLabel = {
var label = UILabel()
label.text = "关于银河"
label.textColor = UIColor(hexString:"#222222")
label.textAlignment = NSTextAlignment.left
label.font = UIFont.systemFont(ofSize: 20)
return label
}()
lazy var detailLabel = {
var label = UILabel()
label.text = "银河集团专注海外服务17年,总部设立在深圳,现已分别在北京、上海、广州等地建立分公司,立足于香港身份规划服务,业务逐步多元化发展。"
label.numberOfLines = 0
label.textColor = UIColor(hexString:"#888F98")
label.textAlignment = NSTextAlignment.left
label.font = UIFont.systemFont(ofSize: 14)
return label
}()
lazy var advantageLabel = {
var label = UILabel()
label.text = "四大优势"
label.textColor = UIColor(hexString:"#222222")
label.textAlignment = .center
label.font = UIFont.systemFont(ofSize: 15)
return label
}()
lazy var advantageLeftImgView = {
let arrowImgView = UIImageView(image: UIImage(named: "about_advantage_left"))
return arrowImgView
}()
lazy var advantageRightImgView = {
let arrowImgView = UIImageView(image: UIImage(named: "about_advantage_right"))
return arrowImgView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
func setupUI() {
self.title = "关于我们"
view.backgroundColor = .white
view.addSubview(collectView)
view.addSubview(aboutLabel)
view.addSubview(detailLabel)
view.addSubview(advantageLabel)
view.addSubview(advantageLeftImgView)
view.addSubview(advantageRightImgView)
aboutLabel.snp.makeConstraints { make in
make.left.equalTo(view).offset(18)
make.right.equalTo(view).offset(-18)
make.top.equalTo(view).offset(k_Height_NavigationtBarAndStatuBar+18)
}
detailLabel.snp.makeConstraints { make in
make.left.equalTo(view).offset(18)
make.right.equalTo(view).offset(-18)
make.top.equalTo(aboutLabel.snp.bottom).offset(18)
}
advantageLabel.snp.makeConstraints { make in
make.centerX.equalTo(view)
make.height.equalTo(40)
make.top.equalTo(detailLabel.snp.bottom).offset(48)
}
advantageLeftImgView.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 30, height: 3))
make.centerY.equalTo(advantageLabel)
make.right.equalTo(advantageLabel.snp.left).offset(-12)
}
advantageRightImgView.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 30, height: 3))
make.centerY.equalTo(advantageLabel)
make.left.equalTo(advantageLabel.snp.right).offset(12)
}
collectView.snp.makeConstraints { make in
make.left.right.bottom.equalTo(view)
make.top.equalTo(advantageLabel.snp.bottom).offset(22)
}
}
}
extension YHAboutUsViewController: UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 4
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHAboutUsAdvantageCell.cellReuseIdentifier, for: indexPath) as! YHAboutUsAdvantageCell
return cell
}
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
}
......@@ -120,7 +120,20 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHLoginViewController()
self.navigationController?.pushViewController(vc)
if (indexPath.row >= items.count) { return }
let item: PersonalModuleItem = items[indexPath.row];
if item.title == "关于我们" {
let vc = YHAboutUsViewController()
self.navigationController?.pushViewController(vc)
} else {
let vc = YHLoginViewController()
self.navigationController?.pushViewController(vc)
}
}
}
//
// YHAboutUsAdvantageCell.swift
// galaxy
//
// Created by edy on 2024/1/6.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
class YHAboutUsAdvantageCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHAboutUsAdvantageCell"
lazy var iconImgView:UIImageView = {
let icon = UIImageView(image: UIImage(named: "mine_manager"))
return icon
}()
lazy var titleLabel:UILabel = {
let label = UILabel()
label.text = "是的发放"
label.textColor = UIColor(hexString:"#333333")
label.textAlignment = .center
label.font = UIFont.systemFont(ofSize: 14)
return label
}()
lazy var detailLabel:UILabel = {
let label = UILabel()
label.text = "sdfasfdasfasdfasfasdfasdfsafasdfasdfasdfasfdas"
label.textColor = UIColor(hexString:"#888F98")
label.numberOfLines = 0
label.textAlignment = .center
label.font = UIFont.systemFont(ofSize: 12)
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
func setupUI() {
contentView.backgroundColor = UIColor(hexString: "#F8F9FB")
contentView.layer.cornerRadius = 4
contentView.clipsToBounds = true
contentView.addSubview(iconImgView)
contentView.addSubview(titleLabel)
contentView.addSubview(detailLabel)
iconImgView.snp.makeConstraints { make in
make.top.equalTo(contentView).offset(20)
make.centerX.equalTo(contentView)
make.width.height.equalTo(43)
}
titleLabel.snp.makeConstraints { make in
make.centerX.equalTo(contentView)
make.height.equalTo(18)
make.top.equalTo(iconImgView.snp.bottom).offset(12)
}
detailLabel.snp.makeConstraints { make in
make.left.equalTo(contentView).offset(5)
make.right.equalTo(contentView).offset(-5)
make.top.equalTo(titleLabel.snp.bottom).offset(8)
make.bottom.equalTo(contentView).offset(-5)
}
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2572@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2572@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2571@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2571@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