Commit 54f0b5b7 authored by Steven杜宇's avatar Steven杜宇

// 服务UI更改

parent ce6176dc
...@@ -401,7 +401,6 @@ ...@@ -401,7 +401,6 @@
A5ACE9552B4564F7002C94D2 /* YHTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9222B4564F7002C94D2 /* YHTabBarViewController.swift */; }; A5ACE9552B4564F7002C94D2 /* YHTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9222B4564F7002C94D2 /* YHTabBarViewController.swift */; };
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */; }; A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */; };
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */; }; A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */; };
A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */; };
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */; }; A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */; };
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */; }; A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */; };
A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */; }; A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */; };
...@@ -865,7 +864,6 @@ ...@@ -865,7 +864,6 @@
A5ACE9222B4564F7002C94D2 /* YHTabBarViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHTabBarViewController.swift; sourceTree = "<group>"; }; A5ACE9222B4564F7002C94D2 /* YHTabBarViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHTabBarViewController.swift; sourceTree = "<group>"; };
A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBouncesContentView.swift; sourceTree = "<group>"; }; A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBouncesContentView.swift; sourceTree = "<group>"; };
A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBasicContentView.swift; sourceTree = "<group>"; }; A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBasicContentView.swift; sourceTree = "<group>"; };
A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHNoDataTipView.swift; sourceTree = "<group>"; };
A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginTipsView.swift; sourceTree = "<group>"; }; A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginTipsView.swift; sourceTree = "<group>"; };
A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractCell.swift; sourceTree = "<group>"; }; A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractCell.swift; sourceTree = "<group>"; };
A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterMainViewModel.swift; sourceTree = "<group>"; }; A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterMainViewModel.swift; sourceTree = "<group>"; };
...@@ -2320,7 +2318,6 @@ ...@@ -2320,7 +2318,6 @@
children = ( children = (
A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */, A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */,
A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */, A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */,
A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */,
04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */, 04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */,
04AAA8DB2BF5E5A200FE9FD5 /* YHEmptyDataView.swift */, 04AAA8DB2BF5E5A200FE9FD5 /* YHEmptyDataView.swift */,
); );
...@@ -2899,7 +2896,6 @@ ...@@ -2899,7 +2896,6 @@
044413FD2BC386DA00784A14 /* YHServiceViewController.swift in Sources */, 044413FD2BC386DA00784A14 /* YHServiceViewController.swift in Sources */,
045EEEBB2B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift in Sources */, 045EEEBB2B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift in Sources */,
045EEEED2B9F171A0022A143 /* YHParentInfoVC.swift in Sources */, 045EEEED2B9F171A0022A143 /* YHParentInfoVC.swift in Sources */,
A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */,
04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */, 04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */,
045EEF1C2B9F171A0022A143 /* YHAddressPresentAnimated.swift in Sources */, 045EEF1C2B9F171A0022A143 /* YHAddressPresentAnimated.swift in Sources */,
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */, 04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */,
......
//
// YHNoDataTipView.swift
// BaiSiSMApp
//
// Created by davidhuang on 2022/10/25.
// Copyright © 2022 www.davidhuang.com. All rights reserved.
//
import UIKit
class YHNoDataTipView: UIView {
public var reloadBlock: (()->())?
private var imageStr: String = "no-order-bkg-icon"
private var title: String = "暂无数据"
private lazy var imageView: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "no-order-bkg-icon"))
return imageView
}()
private lazy var titleLabel: UILabel = {
let label = UILabel(text: "暂无数据", font: UIFont.PFSC_R(ofSize: 14), color: UIColor.labelTextColor2)
return label
}()
private lazy var descLabel: UILabel = {
let label = UILabel(text: "", font: UIFont.PFSC_R(ofSize: 12), color: UIColor.labelTextColor2)
return label
}()
private lazy var reloadBtn: UIButton = {
let btn = UIButton.bs_button(title: "重新加载", font: UIFont.PFSC_M(ofSize: 12), normalColor: UIColor.brandMainColor)
btn.layer.cornerRadius = kCornerRadius3
btn.layer.masksToBounds = true
btn.layer.borderWidth = 1
btn.layer.borderColor = UIColor.labelTextColor2.cgColor
btn.addTarget(self, action: #selector(onReloadData), for: .touchUpInside)
return btn
}()
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
public func setup(image: String? = nil, title: String) {
if let image = image {
imageView.image = UIImage(named: image)
self.imageStr = image
}
titleLabel.text = title
self.title = title
}
override var isHidden: Bool {
didSet {
if isHidden == false {
if YHNetworkStatusManager.shared.isNetWorkOK == true {
imageView.image = UIImage(named: self.imageStr)
titleLabel.text = title
descLabel.isHidden = true
reloadBtn.isHidden = true
} else {
imageView.image = UIImage(named: "no_data_network_icon")
titleLabel.text = "网络好像断开了哦"
descLabel.isHidden = false
reloadBtn.isHidden = false
}
}
}
}
}
// MARK: - 提供快速创建的类方法
extension YHNoDataTipView {
private func initView() {
self.addSubview(imageView)
self.addSubview(titleLabel)
self.addSubview(descLabel)
self.addSubview(reloadBtn)
let imageViewTop = 132 / (UIDevice.kScreenW - UIDevice.bs_navigationFullHeight())
imageView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(imageViewTop)
make.centerX.equalToSuperview()
make.width.height.equalTo(165)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(imageView.snp.bottom)
make.centerX.equalToSuperview()
}
descLabel.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(4)
make.centerX.equalToSuperview()
}
reloadBtn.snp.makeConstraints { make in
make.top.equalTo(descLabel.snp.bottom).offset(16)
make.centerX.equalToSuperview()
make.width.equalTo(80)
make.height.equalTo(28)
}
descLabel.isHidden = true
reloadBtn.isHidden = true
}
// class func noDataTipView() -> YHNoDataTipView {
// return YHNoDataTipView()
// //return Bundle.main.loadNibNamed("YHNoDataTipView", owner: nil, options: nil)?.first as! YHNoDataTipView
// }
override func layoutSubviews() {
super.layoutSubviews()
let imageViewTop = (132 + UIDevice.bs_navigationFullHeight()) / UIDevice.kScreenH * self.frame.size.height
imageView.snp.updateConstraints { make in
make.top.equalToSuperview().offset(imageViewTop)
}
}
@objc private func onReloadData() {
reloadBlock?()
}
}
...@@ -15,15 +15,15 @@ class YHServiceNoOrderView: UIView { ...@@ -15,15 +15,15 @@ class YHServiceNoOrderView: UIView {
private lazy var iconImgV : UIImageView = { private lazy var iconImgV : UIImageView = {
let imagV = UIImageView() let imagV = UIImageView()
imagV.image = UIImage(named: "service_center_no_data") imagV.image = UIImage(named: "no_data_bg_order")
imagV.contentMode = .scaleAspectFill imagV.contentMode = .scaleAspectFill
return imagV return imagV
}() }()
private lazy var tipsLab : UILabel = { private lazy var tipsLab : UILabel = {
let lable = UILabel() let lable = UILabel()
lable.textColor = UIColor.mainTextColor lable.textColor = UIColor.init(hex: 0x121A26)
lable.font = UIFont.PFSC_R(ofSize: 14) lable.font = UIFont.PFSC_M(ofSize: 14)
lable.textAlignment = .center lable.textAlignment = .center
lable.text = "您还没有相关订单" lable.text = "您还没有相关订单"
return lable return lable
...@@ -31,7 +31,7 @@ class YHServiceNoOrderView: UIView { ...@@ -31,7 +31,7 @@ class YHServiceNoOrderView: UIView {
private lazy var noFindLab : UILabel = { private lazy var noFindLab : UILabel = {
let lable = UILabel() let lable = UILabel()
lable.textColor = UIColor.labelTextColor2 lable.textColor = UIColor.init(hex: 0x94A3B8)
lable.font = UIFont.PFSC_R(ofSize: 12) lable.font = UIFont.PFSC_R(ofSize: 12)
lable.textAlignment = .center lable.textAlignment = .center
lable.text = "找不到订单" lable.text = "找不到订单"
...@@ -49,9 +49,9 @@ class YHServiceNoOrderView: UIView { ...@@ -49,9 +49,9 @@ class YHServiceNoOrderView: UIView {
btn.setTitle("更多资讯", for: .normal) btn.setTitle("更多资讯", for: .normal)
btn.layer.cornerRadius = kCornerRadius3 btn.layer.cornerRadius = kCornerRadius3
btn.clipsToBounds = true btn.clipsToBounds = true
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 12) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
btn.setTitleColor(UIColor.mainTextColor, for: .normal) btn.setTitleColor(UIColor.init(hex: 0x121A26), for: .normal)
btn.backgroundColor = UIColor.contentBkgColor btn.backgroundColor = UIColor.init(hex: 0xF4F6FA)
return btn return btn
}() }()
...@@ -60,7 +60,7 @@ class YHServiceNoOrderView: UIView { ...@@ -60,7 +60,7 @@ class YHServiceNoOrderView: UIView {
btn.setTitle("返回首页", for: .normal) btn.setTitle("返回首页", for: .normal)
btn.layer.cornerRadius = kCornerRadius3 btn.layer.cornerRadius = kCornerRadius3
btn.clipsToBounds = true btn.clipsToBounds = true
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 12) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
btn.setTitleColor(.white, for: .normal) btn.setTitleColor(.white, for: .normal)
return btn return btn
}() }()
...@@ -75,8 +75,8 @@ class YHServiceNoOrderView: UIView { ...@@ -75,8 +75,8 @@ class YHServiceNoOrderView: UIView {
iconImgV.snp.makeConstraints { make in iconImgV.snp.makeConstraints { make in
make.top.equalToSuperview() make.top.equalToSuperview()
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.height.equalTo(93) make.height.equalTo(128)
make.width.equalTo(93) make.width.equalTo(128)
} }
addSubview(tipsLab) addSubview(tipsLab)
......
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