Commit 9d4b7f55 authored by David黄金龙's avatar David黄金龙

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

* 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  更换GIF播放第三方库
  点赞动画优化
  修改文字错误
  //  提交成功弹窗
parents 3d7e44bf ba3c8c9d
...@@ -81,10 +81,10 @@ target 'galaxy' do ...@@ -81,10 +81,10 @@ target 'galaxy' do
pod 'BMPlayer', '1.3.0' pod 'BMPlayer', '1.3.0'
#高斯模糊 #高斯模糊
pod 'VisualEffectView', '4.1.5' pod 'VisualEffectView', '4.1.5'
#GIF图播放
pod 'FLAnimatedImage', '1.0.17'
#动画框架 #动画框架
pod 'lottie-ios', '4.4.0' pod 'lottie-ios', '4.4.0'
#GIF图播放
pod 'YYImage', '1.0.4'
end end
......
...@@ -239,6 +239,9 @@ ...@@ -239,6 +239,9 @@
0488518F2BF5FD1500C4E32D /* YHOSSManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0488518E2BF5FD1500C4E32D /* YHOSSManager.swift */; }; 0488518F2BF5FD1500C4E32D /* YHOSSManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0488518E2BF5FD1500C4E32D /* YHOSSManager.swift */; };
048B2A4A2BC7D9DC00A93BF0 /* YHMyLikeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */; }; 048B2A4A2BC7D9DC00A93BF0 /* YHMyLikeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */; };
048B2A4D2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A4C2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift */; }; 048B2A4D2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A4C2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift */; };
048FA0332BFDDFF400AD3BA9 /* submit_head_animation.gif in Resources */ = {isa = PBXBuildFile; fileRef = 048FA0312BFDDFF400AD3BA9 /* submit_head_animation.gif */; };
048FA0342BFDDFF400AD3BA9 /* submit_page_scroll.gif in Resources */ = {isa = PBXBuildFile; fileRef = 048FA0322BFDDFF400AD3BA9 /* submit_page_scroll.gif */; };
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048FA0352BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift */; };
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; }; 0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; };
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; }; 0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; };
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; }; 049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; };
...@@ -702,6 +705,9 @@ ...@@ -702,6 +705,9 @@
0488518E2BF5FD1500C4E32D /* YHOSSManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOSSManager.swift; sourceTree = "<group>"; }; 0488518E2BF5FD1500C4E32D /* YHOSSManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOSSManager.swift; sourceTree = "<group>"; };
048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyLikeViewController.swift; sourceTree = "<group>"; }; 048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyLikeViewController.swift; sourceTree = "<group>"; };
048B2A4C2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyLikeViewModel.swift; sourceTree = "<group>"; }; 048B2A4C2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyLikeViewModel.swift; sourceTree = "<group>"; };
048FA0312BFDDFF400AD3BA9 /* submit_head_animation.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = submit_head_animation.gif; sourceTree = "<group>"; };
048FA0322BFDDFF400AD3BA9 /* submit_page_scroll.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = submit_page_scroll.gif; sourceTree = "<group>"; };
048FA0352BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSubmitAllInfoSuccessAlertView.swift; sourceTree = "<group>"; };
0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; }; 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; };
0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; }; 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; };
049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; }; 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; };
...@@ -1691,6 +1697,15 @@ ...@@ -1691,6 +1697,15 @@
path = ViewModel; path = ViewModel;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
048FA0302BFDDFF400AD3BA9 /* gif */ = {
isa = PBXGroup;
children = (
048FA0312BFDDFF400AD3BA9 /* submit_head_animation.gif */,
048FA0322BFDDFF400AD3BA9 /* submit_page_scroll.gif */,
);
path = gif;
sourceTree = "<group>";
};
049663B62BF60BB7003C8295 /* CustomRefreshHeader */ = { 049663B62BF60BB7003C8295 /* CustomRefreshHeader */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -2225,6 +2240,7 @@ ...@@ -2225,6 +2240,7 @@
A5ACE9142B4564F7002C94D2 /* Res */ = { A5ACE9142B4564F7002C94D2 /* Res */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
048FA0302BFDDFF400AD3BA9 /* gif */,
A5DF3D4A2BF9A304003D5F03 /* jsons */, A5DF3D4A2BF9A304003D5F03 /* jsons */,
A5DF3D492BF9A2E4003D5F03 /* videos */, A5DF3D492BF9A2E4003D5F03 /* videos */,
A5E69D4F2BA304D400411932 /* Font */, A5E69D4F2BA304D400411932 /* Font */,
...@@ -2292,6 +2308,7 @@ ...@@ -2292,6 +2308,7 @@
A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */, A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */,
A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */, A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */,
A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */, A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */,
048FA0352BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift */,
A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */, A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */,
A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */, A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */,
044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */, 044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */,
...@@ -2517,10 +2534,12 @@ ...@@ -2517,10 +2534,12 @@
A51044182B493675006B60BB /* README.md in Resources */, A51044182B493675006B60BB /* README.md in Resources */,
A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */, A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */,
04EA2E712BF74FA200AE80B0 /* shouye.json in Resources */, 04EA2E712BF74FA200AE80B0 /* shouye.json in Resources */,
048FA0332BFDDFF400AD3BA9 /* submit_head_animation.gif in Resources */,
A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */, A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */,
04EA2E702BF74FA200AE80B0 /* shipin.json in Resources */, 04EA2E702BF74FA200AE80B0 /* shipin.json in Resources */,
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */, 044378A42BFC848C001F95AE /* loginBkg.mov in Resources */,
047619ED2BA9B9C900F45358 /* area.plist in Resources */, 047619ED2BA9B9C900F45358 /* area.plist in Resources */,
048FA0342BFDDFF400AD3BA9 /* submit_page_scroll.gif in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -2633,6 +2652,7 @@ ...@@ -2633,6 +2652,7 @@
045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */, 045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */,
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */, A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */, 045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */,
045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */, 045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */,
A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */, A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */,
04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */, 04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */,
......
...@@ -217,7 +217,7 @@ extension YHHomeCollectionViewCell { ...@@ -217,7 +217,7 @@ extension YHHomeCollectionViewCell {
animationView.loopMode = .playOnce animationView.loopMode = .playOnce
animationView.play {[weak self] completed in animationView.play {[weak self] completed in
guard let self = self else { return } guard let self = self else { return }
self.animationView.isHidden = true // self.animationView.isHidden = true
} }
viewModel.getLike(listModel.id, 1) {[weak self] success, error in viewModel.getLike(listModel.id, 1) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -53,7 +53,11 @@ class YHHomeWebBottomView: UIView { ...@@ -53,7 +53,11 @@ class YHHomeWebBottomView: UIView {
} }
} }
if animationView.isHidden {
likeButton.setContent(image, "\(likeCount)") likeButton.setContent(image, "\(likeCount)")
} else {
likeButton.setContent(UIImage(named: ""), "\(likeCount)")
}
} }
}//是否点赞 }//是否点赞
......
...@@ -268,7 +268,7 @@ extension YHServiceCenterMainViewController { ...@@ -268,7 +268,7 @@ extension YHServiceCenterMainViewController {
let aaa: ASAttributedString = .init("阶段,审核没问题会安排递交入境处哦~", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let aaa: ASAttributedString = .init("阶段,审核没问题会安排递交入境处哦~", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
self.nameLabel.attributed.text = a + aa + aaa self.nameLabel.attributed.text = a + aa + aaa
} else { } else {
let a: ASAttributedString = .init("您好,\(name),您当前处于", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("您好,\(name),您处于", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "信息提交"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor)) let aa: ASAttributedString = .init(NSAttributedString(string: "信息提交"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("阶段,让我们一起共同完成您的身份申请之旅吧~", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let aaa: ASAttributedString = .init("阶段,让我们一起共同完成您的身份申请之旅吧~", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
self.nameLabel.attributed.text = a + aa + aaa self.nameLabel.attributed.text = a + aa + aaa
......
//
// YHSubmitAllInfoSuccessAlertView.swift
// galaxy
//
// Created by edy on 2024/5/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
import YYImage
class YHSubmitAllInfoSuccessAlertView: UIView {
typealias Block = (Bool) -> ()
let scoreBigFont = UIFont.PFSC_B(ofSize: 50)
let scoreSmallFont = UIFont.PFSC_R(ofSize: 13)
let scoreBigColor = UIColor.brandMainColor
let scoreSmallColor = UIColor.init(hex: 0x000000)
var block: Block?
var centerView: UIView!
var scoreLabel: UILabel!
var cancelButton: UIButton!
var detailButton: UIButton!
var model : YHContactInfoScoreModel? {
didSet {
guard let model = model else {
return
}
let a: ASAttributedString = .init(NSAttributedString(string: model.sum_score), .font(self.scoreBigFont),.foreground(self.scoreBigColor))
let b: ASAttributedString = .init("分", .font(self.scoreSmallFont),.foreground(self.scoreSmallColor))
scoreLabel.attributed.text = a + b
}
}
//头部背景图片
lazy var headBkgImagV: UIImageView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "submit_success_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
lazy var headImgV: YYAnimatedImageView = {
let img = YYImage(named:"submit_head_animation.gif")
let imgV = YYAnimatedImageView(image: img)
return imgV
}()
lazy var scrollBgImgV:YYAnimatedImageView = {
let img = YYImage(named:"submit_page_scroll.gif")
let imgV = YYAnimatedImageView(image: img)
imgV.autoPlayAnimatedImage = false
imgV.currentAnimatedImageIndex = 0
return imgV
}()
static func showCheckView(model: YHContactInfoScoreModel?,callBack: @escaping Block) {
let view = YHSubmitAllInfoSuccessAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = callBack
view.model = model
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tap.delegate = self
addGestureRecognizer(tap)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .green
view.layer.cornerRadius = kCornerRadius8
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.width.equalTo(299)
make.height.equalTo(375)
}
centerView.addSubview(scrollBgImgV)
centerView.addSubview(headImgV)
headImgV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
scrollBgImgV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
scoreLabel = {
let label = UILabel()
label.text = "--分"
label.textAlignment = .left
label.numberOfLines = 1
return label
}()
scoreLabel.backgroundColor = .clear
centerView.addSubview(scoreLabel)
scoreLabel.snp.makeConstraints { make in
make.bottom.equalTo(-45)
make.left.equalTo(20)
make.height.equalTo(55)
}
let a: ASAttributedString = .init("0", .font(self.scoreBigFont), .foreground(scoreBigColor))
let b: ASAttributedString = .init("分", .font(scoreSmallFont), .foreground(scoreSmallColor))
scoreLabel.attributed.text = a + b
cancelButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "update_close"), for: .normal)
button.addTarget(self, action: #selector(disagree), for: .touchUpInside)
return button
}()
self.addSubview(cancelButton)
cancelButton.snp.makeConstraints { make in
make.width.height.equalTo(24)
make.centerX.equalTo(self)
make.top.equalTo(centerView.snp.bottom).offset(20)
}
detailButton = {
let btn = UIButton()
btn.addTarget(self, action: #selector(agree), for: .touchUpInside)
return btn
}()
centerView.addSubview(detailButton)
detailButton.snp.makeConstraints { make in
make.width.equalTo(72)
make.height.equalTo(55)
make.bottom.right.equalToSuperview()
}
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 1) {
self.scrollBgImgV.startAnimating()
}
}
@objc func agree() {
block?(true)
dismiss()
}
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func disagree() {
block?(false)
dismiss()
}
func dismiss() {
removeFromSuperview()
}
}
extension YHSubmitAllInfoSuccessAlertView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
import ESPullToRefresh import ESPullToRefresh
import FLAnimatedImage import YYImage
public extension ES where Base: UIScrollView { public extension ES where Base: UIScrollView {
...@@ -49,15 +49,9 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt ...@@ -49,15 +49,9 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt
return imageView return imageView
}() }()
fileprivate let animaitonImgView: FLAnimatedImageView = { fileprivate let animaitonImgView: YYAnimatedImageView = {
let imgV = FLAnimatedImageView() let img = YYImage(named:"galaxy_refresher.gif")
imgV.isHidden = true let imgV = YYAnimatedImageView(image: img)
let url = Bundle.main.url(forResource: "galaxy_refresher", withExtension: "gif")!
if let animatedImage = try? FLAnimatedImage(animatedGIFData: Data(contentsOf: url)) {
imgV.animatedImage = animatedImage
} else {
print("Error loading GIF")
}
return imgV return imgV
}() }()
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
#import "JPUSHService.h" #import "JPUSHService.h"
// iOS10注册APNs所需头文件 // iOS10注册APNs所需头文件
#ifdef NSFoundationVersionNumber_iOS_9_x_Max #ifdef NSFoundationVersionNumber_iOS_9_x_Max
// GIF播放
#import "FLAnimatedImage.h"
#import <UserNotifications/UserNotifications.h> #import <UserNotifications/UserNotifications.h>
#endif #endif
......
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