Commit 0545217d authored by Steven杜宇's avatar Steven杜宇

Merge branch 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into youhua-dev

# Conflicts:
#	galaxy/Podfile
parents 31444aca d7a473db
......@@ -83,6 +83,8 @@ target 'galaxy' do
pod 'VisualEffectView', '4.1.5'
#GIF图播放
pod 'FLAnimatedImage', '1.0.17'
#动画框架
pod 'lottie-ios', '4.4.0'
end
......
......@@ -279,6 +279,9 @@
04EA230A2BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EA23092BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift */; };
04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EA230B2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift */; };
04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EA230D2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift */; };
04EA2E6A2BF70BAE00AE80B0 /* shipin.json in Resources */ = {isa = PBXBuildFile; fileRef = 04EA2E672BF70BAD00AE80B0 /* shipin.json */; };
04EA2E6B2BF70BAE00AE80B0 /* shouye.json in Resources */ = {isa = PBXBuildFile; fileRef = 04EA2E682BF70BAD00AE80B0 /* shouye.json */; };
04EA2E6C2BF70BAE00AE80B0 /* zixun.json in Resources */ = {isa = PBXBuildFile; fileRef = 04EA2E692BF70BAE00AE80B0 /* zixun.json */; };
04EA376D2BEA06EF00DBAF64 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376C2BEA06EF00DBAF64 /* WebKit.framework */; };
04EA376F2BEA071600DBAF64 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376E2BEA070500DBAF64 /* libc++.tbd */; };
04EA37742BEA0A3400DBAF64 /* YHShareManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EA37732BEA0A3400DBAF64 /* YHShareManager.swift */; };
......@@ -737,6 +740,9 @@
04EA23092BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocumentPromptTableViewCell.swift; sourceTree = "<group>"; };
04EA230B2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocumentToActionTableViewCell.swift; sourceTree = "<group>"; };
04EA230D2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocumentUploadTableViewCell.swift; sourceTree = "<group>"; };
04EA2E672BF70BAD00AE80B0 /* shipin.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = shipin.json; path = "../../../../../Downloads/点赞动效文件-05.17/shipin.json"; sourceTree = "<group>"; };
04EA2E682BF70BAD00AE80B0 /* shouye.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = shouye.json; path = "../../../../../Downloads/点赞动效文件-05.17/shouye.json"; sourceTree = "<group>"; };
04EA2E692BF70BAE00AE80B0 /* zixun.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = zixun.json; path = "../../../../../Downloads/点赞动效文件-05.17/zixun.json"; sourceTree = "<group>"; };
04EA376C2BEA06EF00DBAF64 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
04EA376E2BEA070500DBAF64 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
04EA37732BEA0A3400DBAF64 /* YHShareManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHShareManager.swift; sourceTree = "<group>"; };
......@@ -2214,6 +2220,9 @@
A5ACE9142B4564F7002C94D2 /* Res */ = {
isa = PBXGroup;
children = (
04EA2E672BF70BAD00AE80B0 /* shipin.json */,
04EA2E682BF70BAD00AE80B0 /* shouye.json */,
04EA2E692BF70BAE00AE80B0 /* zixun.json */,
A5E69D4F2BA304D400411932 /* Font */,
A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */,
04808C022B4686510056D53C /* Frameworks */,
......@@ -2480,11 +2489,14 @@
049663C02BF729F6003C8295 /* galaxy_refresher.gif in Resources */,
045EEED42B9F171A0022A143 /* scoreOptionData.plist in Resources */,
045EEED62B9F171A0022A143 /* YHQuestionList.plist in Resources */,
04EA2E6C2BF70BAE00AE80B0 /* zixun.json in Resources */,
A5C5B2EE2B4F9B8800A7C5D1 /* Localizable.xcstrings in Resources */,
A58951C52B398D1000225C19 /* Launch Screen.storyboard in Resources */,
A51044182B493675006B60BB /* README.md in Resources */,
A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */,
04EA2E6B2BF70BAE00AE80B0 /* shouye.json in Resources */,
A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */,
04EA2E6A2BF70BAE00AE80B0 /* shipin.json in Resources */,
047619ED2BA9B9C900F45358 /* area.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -3057,11 +3069,9 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -3088,7 +3098,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = com.dev.profile;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = TESTENV;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h";
......@@ -3263,11 +3272,9 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -3294,7 +3301,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = com.dev.profile;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h";
SWIFT_VERSION = 5.0;
......@@ -3311,11 +3317,9 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -3342,7 +3346,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = com.dev.profile;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(TARGET_NAME)/Res/galaxy-Bridge-Header.h";
SWIFT_VERSION = 5.0;
......
......@@ -10,6 +10,7 @@ import UIKit
import Kingfisher
import AVFoundation
import AVKit
import Lottie
class YHHomeCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHHomeCollectionViewCell"
......@@ -66,7 +67,8 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
var animationView: LottieAnimationView!
required init?(coder: NSCoder) {
super.init(coder: coder)
}
......@@ -138,6 +140,18 @@ extension YHHomeCollectionViewCell {
make.height.equalTo(16)
}
animationView = {
let view = LottieAnimationView(name: "shouye")
view.isHidden = true
return view
}()
subHoldView.addSubview(animationView)
animationView.snp.makeConstraints { make in
make.right.equalTo(numLable.snp.left).offset(2.5)
make.height.width.equalTo(24)
make.centerY.equalTo(numLable).offset(-0.5)
}
subHoldView.addSubview(heartImageViewBtn)
heartImageViewBtn.snp.makeConstraints { make in
make.right.equalTo(numLable.snp.left).offset(-2)
......@@ -199,6 +213,12 @@ extension YHHomeCollectionViewCell {
if YHLoginManager.shared.isLogin() {
if listModel.is_like == false {
animationView.isHidden = false
animationView.loopMode = .playOnce
animationView.play {[weak self] completed in
guard let self = self else { return }
self.animationView.isHidden = true
}
viewModel.getLike(listModel.id, 1) {[weak self] success, error in
guard let self = self else { return }
if success {
......@@ -208,6 +228,7 @@ extension YHHomeCollectionViewCell {
}
}
} else {
animationView.isHidden = true
viewModel.getLike(listModel.id, 0) {[weak self] success, error in
guard let self = self else { return }
if success {
......
......@@ -7,6 +7,7 @@
//
import UIKit
import Lottie
enum YHTintColorMode {
case light
......@@ -22,6 +23,7 @@ class YHHomeWebBottomView: UIView {
var starBlock: Block?
var likeButton: YHHomeWebBottomButton!
var starButton: YHHomeWebBottomButton!
var animationView: LottieAnimationView!
var likeCount: Int = 0
var starCount: Int = 0
var isStar: Bool = false {
......@@ -77,7 +79,18 @@ class YHHomeWebBottomView: UIView {
}
func setUpView() {
animationView = {
let view = LottieAnimationView(name: "zixun")
view.isHidden = true
return view
}()
addSubview(animationView)
animationView.snp.makeConstraints { make in
make.right.equalTo(-72)
make.top.equalTo(2.5)
make.height.equalTo(36)
make.width.equalTo(36)
}
likeButton = {
let button = YHHomeWebBottomButton()
button.setContent(UIImage(named:"home_web_like"), "0")
......@@ -86,7 +99,7 @@ class YHHomeWebBottomView: UIView {
}()
addSubview(likeButton)
likeButton.snp.makeConstraints { make in
make.right.equalTo(-79)
make.centerX.equalTo(animationView.snp.centerX)
make.top.equalTo(10)
make.height.equalTo(39)
make.width.equalTo(24)
......@@ -115,6 +128,16 @@ class YHHomeWebBottomView: UIView {
return
}
isLike = !isLike
if isLike {
animationView.isHidden = false
animationView.loopMode = .playOnce
animationView.play {[weak self] completed in
guard let self = self else { return }
self.animationView.isHidden = true
}
} else {
animationView.isHidden = true
}
if let block = likeBlock {
block(isLike)
}
......
......@@ -144,7 +144,7 @@ class YHServiceOrderAlertView: UIView {
let aa: ASAttributedString = .init(NSAttributedString(string: "优才订单"), .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init(",如果是签约了其他高才、专、留学等订单,请与您的服务管家或销售顾问企微沟通联系哦", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor(hex: 0x121a26).withAlphaComponent(0.7)))
let aaa: ASAttributedString = .init(",如果是签约了其他高才、专、留学等订单,请与您的服务管家或销售顾问企微沟通联系哦", .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor(hex: 0x121a26).withAlphaComponent(0.7)))
let b: ASAttributedString = .init(NSAttributedString(string: "2.使用其他手机号签约合同/订单,请退出登录"), .font(UIFont.PFSC_M(ofSize: 15)),.foreground(UIColor(hex: 0x121a26).withAlphaComponent(0.7)))
......
......@@ -52,10 +52,20 @@ class YHScorePersonInfoCell: UITableViewCell {
//综合得分
private lazy var scoreLable : UILabel = {
let lable0 = UILabel(text: "92")
let lable0 = UILabel(text: "92")
lable0.textColor = UIColor(hex: 0xFFEEB0)
lable0.font = UIFont(name: "DINAlternate-Bold", size: 68)
lable0.textAlignment = .right
lable0.textAlignment = .center
return lable0
}()
//分
private lazy var fenLable : UILabel = {
let lable0 = UILabel(text: "分")
lable0.textColor = UIColor(hex: 0xFFEEB0)
lable0.font = UIFont.PFSC_R(ofSize: 16)
lable0.textAlignment = .center
return lable0
}()
......@@ -81,6 +91,9 @@ class YHScorePersonInfoCell: UITableViewCell {
fatalError("init(coder:) has not been implemented")
}
private let secondHoldView = UIView()
}
extension YHScorePersonInfoCell {
......@@ -178,18 +191,36 @@ extension YHScorePersonInfoCell {
make.width.equalTo(200)
}
contentView.addSubview(secondHoldView)
secondHoldView.snp.makeConstraints { make in
make.bottom.equalTo(holdView.snp.top)
make.right.equalTo(holdView.snp.right).offset(5)
make.height.equalTo(105)
make.width.equalTo(148)
}
let imageV = UIImageView(image: UIImage(named: "score_maisui_icon"))
imageV.contentMode = .scaleAspectFill
secondHoldView.addSubview(imageV)
imageV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
contentView.addSubview(scoreLable)
secondHoldView.addSubview(scoreLable)
scoreLable.snp.makeConstraints { make in
make.bottom.equalTo(holdView.snp.top).offset(-kMargin)
make.right.equalTo(holdView.snp.right).offset(-5)
make.height.equalTo(79)
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
}
secondHoldView.addSubview(fenLable)
fenLable.snp.makeConstraints { make in
make.left.equalTo(scoreLable.snp.right).offset(2)
make.bottom.equalTo(scoreLable.snp.bottom).offset(-13)
}
let a: ASAttributedString = .init("-",.font(UIFont(name: "DINAlternate-Bold", size: 68) ?? UIFont.PFSC_B(ofSize: 43)),.foreground(UIColor(hex: 0xFFEEB0)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex: 0xFFEEB0)))
scoreLable.attributed.text = a + b
scoreLable.attributed.text = a
}
......@@ -203,9 +234,27 @@ extension YHScorePersonInfoCell {
phoneLable.text = model.userinfo?.mobile ?? "-"
let score : String = String(model.total_score?.sum_score ?? 0)
let a: ASAttributedString = .init(NSAttributedString(string: score),.font(UIFont(name: "DINAlternate-Bold", size: 68) ?? UIFont.PFSC_B(ofSize: 43)),.foreground(UIColor(hex: 0xFFEEB0)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(.white))
scoreLable.attributed.text = a + b
// let a: ASAttributedString = .init(NSAttributedString(string: score),.font(UIFont(name: "DINAlternate-Bold", size: 68) ?? UIFont.PFSC_B(ofSize: 43)),.foreground(UIColor(hex: 0xFFEEB0)))
// let b: ASAttributedString = .init("分", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(.white))
// scoreLable.attributed.text = a
scoreLable.text = score
scoreLable.layoutIfNeeded()
let gradientLayer = CAGradientLayer()
gradientLayer.colors = [UIColor(hex: 0xFFF9E3, alpha: 1.0).cgColor, UIColor(hex: 0xFFE895, alpha: 1.0).cgColor]
gradientLayer.startPoint = CGPoint(x: 0, y: 0)
gradientLayer.endPoint = CGPoint(x: 1, y: 1)
gradientLayer.locations = [NSNumber(value: 0.2)]
gradientLayer.frame = scoreLable.bounds
gradientLayer.mask = scoreLable.layer
secondHoldView.layer.insertSublayer(gradientLayer, at: 0)
}
......
......@@ -237,17 +237,10 @@ private extension YHPreviewFamilyMemberViewController {
@objc func clickButton(sender : UIButton) {
for button in arrButtons {
if let arr = button.layer.sublayers {
for layer in arr {
if layer is CAGradientLayer {
layer.removeFromSuperlayer()
}
}
}
button.backgroundColor = UIColor.white
button.setTitleColor(.black, for: .normal)
}
sender.addYinHeGradualLayer()
sender.layoutIfNeeded()
sender.backgroundColor = .brandMainColor
sender.setTitleColor(.white, for: .normal)
if sender == parentButton {
......@@ -273,11 +266,8 @@ private extension YHPreviewFamilyMemberViewController {
}
self.layouButtons()
//延迟刷新
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
self.highlightButton()
self.homeTableView.reloadData()
}
self.highlightButton()
self.homeTableView.reloadData()
return
}
} else {
......@@ -289,6 +279,7 @@ private extension YHPreviewFamilyMemberViewController {
private func highlightButton() {
if !spouseButton.isHidden {
clickButton(sender:spouseButton)
clickButton(sender:spouseButton)
return
}
......
......@@ -15,6 +15,13 @@ class YHServiceBannerView: UIView {
var dataArr: [YHBannerModel] = [] {
didSet {
self.indicatorView.indicatorItems = self.dataArr.count
let width = 16 * self.dataArr.count + 3 * (self.dataArr.count - 1)
indicatorView.snp.remakeConstraints { make in
make.right.equalToSuperview().offset(-20)
make.height.equalTo(2)
make.bottom.equalTo(-14)
make.width.equalTo(width)
}
bannerView.reloadData()
}
}
......@@ -35,14 +42,8 @@ class YHServiceBannerView: UIView {
view.delegate = self
view.dataSource = self
view.automaticSlidingInterval = 3
view.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
view.register(YHServiceBannerCollectionViewCell.self, forCellWithReuseIdentifier: "cell")
view.itemSize = FSPagerView.automaticSize
// view.interitemSpacing = 10
return view
}()
lazy var pageControl: FSPageControl = {
let view = FSPageControl()
return view
}()
......@@ -59,35 +60,15 @@ private extension YHServiceBannerView {
make.top.left.right.bottom.equalToSuperview()
}
bannerView.addSubview(pageControl)
pageControl.snp.makeConstraints { make in
make.left.bottom.right.equalToSuperview()
make.height.equalTo(25)
}
// setupPageControl()
bannerView.addSubview(indicatorView)
indicatorView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.right.equalToSuperview().offset(-20)
make.height.equalTo(2)
make.bottom.equalTo(-14)
}
bannerView.reloadData()
}
func setupPageControl() {
self.pageControl.numberOfPages = self.dataArr.count
self.pageControl.contentHorizontalAlignment = .center
self.pageControl.contentInsets = UIEdgeInsets(top: 0, left: 12, bottom: 10, right: 12)
let normalImage = UIImage(color: UIColor(hex: 0xff0000, alpha: 1.0), size: CGSize(width: 5, height: 5))
let selectImage = UIImage(color: .white, size: CGSize(width: 8, height: 5))
self.pageControl.setImage(normalImage, for: .normal)
self.pageControl.setImage(selectImage, for: .selected)
self.pageControl.interitemSpacing = 3
}
func goAppTab(tabBarName : String) {
if !tabBarName.isEmpty {
if tabBarName.contains("tabBarHome",caseSensitive: false) {
......@@ -117,24 +98,10 @@ extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
}
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index)
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index) as! YHServiceBannerCollectionViewCell
if index < dataArr.count {
let model = dataArr[index]
if model.id != 0 {
if let url = URL(string: model.img_url) {
// cell.imageView?.kf.setImage(with: url)
cell.imageView?.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image"))
}
} else {
cell.imageView?.image = UIImage(named: model.img_url)
}
// cell.textLabel?.text = model.name
cell.dataModel = dataArr[index]
}
cell.imageView?.contentMode = .scaleAspectFill
cell.backgroundColor = .contentBkgColor
cell.contentView.layer.shadowColor = UIColor.clear.cgColor
return cell
}
......@@ -183,3 +150,88 @@ extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
self.indicatorView.curIndicatorIndex = pagerView.currentIndex
}
}
class YHServiceBannerCollectionViewCell: FSPagerViewCell {
override init(frame: CGRect) {
super.init(frame: frame)
textLabel?.text = ""
textLabel?.isHidden = true
imageView?.isHidden = true
initView()
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var bannerImagV: UIImageView = {
let imagV : UIImageView = UIImageView()
imagV.contentMode = .scaleAspectFill
imagV.clipsToBounds = true
imagV.image = UIImage(named: "global_default_image")
return imagV
}()
lazy var bannerTitleLable: UILabel = {
let lable = UILabel()
lable.font = UIFont.PFSC_R(ofSize: 17)
lable.textColor = UIColor.white
return lable
}()
lazy var bgImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "service_title_bg")
return imageView
}()
var dataModel : YHBannerModel? {
didSet {
updateUI()
}
}
}
private extension YHServiceBannerCollectionViewCell {
func initView() {
contentView.addSubview(bannerImagV)
bannerImagV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
contentView.addSubview(bgImageView)
bgImageView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(64)
}
contentView.addSubview(bannerTitleLable)
bannerTitleLable.snp.makeConstraints { make in
make.right.equalTo(-20)
make.bottom.equalTo(-20)
make.left.equalTo(20)
make.height.equalTo(24)
}
}
func updateUI() {
guard let model = dataModel else { return }
if model.isLocalItemFlag {
bannerTitleLable.isHidden = true
bannerImagV.image = UIImage(named: model.img_url)
} else {
bannerTitleLable.isHidden = false
if let url = URL(string: model.img_url) {
bannerImagV.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image"))
} else {
bannerImagV.image = UIImage(named: "global_default_image")
}
bannerTitleLable.text = model.name
}
}
}
......@@ -50,10 +50,10 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel.text = "您还有" + "\(model.num)" + "份信息待填写哦~"
// 0未知 1待开始 2进行中 3 已完成
if model.status == 1 {
titleLabel.textColor = UIColor(hex: 0x121a26,transparency: 0.3)
messageLabel.textColor = UIColor(hex: 0x94a3b8,transparency: 0.3)
titleLabel.textColor = UIColor(hex: 0x121a26,transparency: 0.5)
messageLabel.textColor = UIColor(hex: 0x94a3b8,transparency: 0.5)
buttonLabel.text = "待开始"
buttonLabel.backgroundColor = UIColor(hex: 0xb8babe,transparency: 0.3)
buttonLabel.backgroundColor = UIColor(hex: 0xb8babe,transparency: 0.5)
progressImageView.image = UIImage(named: "service_progress_normal")
// 1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
if model.type == 1 {
......
//
// YHTestViewController.swift
// YHDeviceInfoViewController.swift
// galaxy
//
// Created by edy on 2024/4/11.
......
......@@ -119,6 +119,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
#else
let version = "版本号:V" + UIDevice.appVersion() + "_" + UIDevice.appBuild()
versionLabel.text = version
versionLabel.isHidden = true
#endif
}
......
......@@ -160,7 +160,7 @@ extension UIImage {
imageData = self.jpegData(compressionQuality: compression)
}
if imageData!.count > toKb {
return nil
return imageData
}
return imageData
}
......
......@@ -194,7 +194,10 @@ class YHNetRequest: NSObject {
}
return httpRequest
}
guard let imageData = image.compressOriginalImage(5 * 1024 * 1024) else { return httpRequest }
let size = Int(5 * 1024 * 1024)
guard let imageData = image.compressOriginalImage(size) else { return httpRequest }
let tttt = Double(imageData.count)/1024.0/1024.0
#if DEBUG
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_title_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_title_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "Group 3471@2x.png",
"filename" : "Group 2033194829@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 3471@3x.png",
"filename" : "Group 2033194829@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Mask group@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Mask group@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