Commit 29915880 authored by David黄金龙's avatar David黄金龙

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

* '630-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  匹配动画
  //  匹配动画
  开放分享小程序
  //  我的好友
parents be732cfa 843fe315
......@@ -32,6 +32,9 @@
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043B0A342C1190C6008A9BBA /* YHSelectFileSheetView.swift */; };
043BA8752C241B38006EF02D /* YHAddFriendCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043BA8742C241B38006EF02D /* YHAddFriendCardCell.swift */; };
043BA8892C244129006EF02D /* people_head.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA8882C244129006EF02D /* people_head.json */; };
043BA88B2C244146006EF02D /* people_launch.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA88A2C244146006EF02D /* people_launch.json */; };
043BA88D2C24416A006EF02D /* people_rotate.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA88C2C24416A006EF02D /* people_rotate.json */; };
043D2C8A2C0EEF3F00172438 /* YHOrderSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */; };
043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */; };
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */ = {isa = PBXBuildFile; fileRef = 044378A32BFC848C001F95AE /* loginBkg.mov */; };
......@@ -574,6 +577,9 @@
0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
043B0A342C1190C6008A9BBA /* YHSelectFileSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectFileSheetView.swift; sourceTree = "<group>"; };
043BA8742C241B38006EF02D /* YHAddFriendCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddFriendCardCell.swift; sourceTree = "<group>"; };
043BA8882C244129006EF02D /* people_head.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_head.json; sourceTree = "<group>"; };
043BA88A2C244146006EF02D /* people_launch.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_launch.json; sourceTree = "<group>"; };
043BA88C2C24416A006EF02D /* people_rotate.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_rotate.json; sourceTree = "<group>"; };
043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderSearchViewController.swift; sourceTree = "<group>"; };
043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceOrderSearchViewModel.swift; sourceTree = "<group>"; };
044378A32BFC848C001F95AE /* loginBkg.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = loginBkg.mov; sourceTree = "<group>"; };
......@@ -1184,6 +1190,30 @@
path = Model;
sourceTree = "<group>";
};
043BA8762C243477006EF02D /* people_head */ = {
isa = PBXGroup;
children = (
043BA8882C244129006EF02D /* people_head.json */,
);
path = people_head;
sourceTree = "<group>";
};
043BA87C2C2435D4006EF02D /* people_launch */ = {
isa = PBXGroup;
children = (
043BA88A2C244146006EF02D /* people_launch.json */,
);
path = people_launch;
sourceTree = "<group>";
};
043BA8822C24360C006EF02D /* people_rotate */ = {
isa = PBXGroup;
children = (
043BA88C2C24416A006EF02D /* people_rotate.json */,
);
path = people_rotate;
sourceTree = "<group>";
};
0445E6AC2BE9CF53003C52F9 /* VersionUpload(版本更新) */ = {
isa = PBXGroup;
children = (
......@@ -2798,6 +2828,9 @@
A5DF3D4A2BF9A304003D5F03 /* jsons */ = {
isa = PBXGroup;
children = (
043BA8822C24360C006EF02D /* people_rotate */,
043BA87C2C2435D4006EF02D /* people_launch */,
043BA8762C243477006EF02D /* people_head */,
A5EE41FB2C216C78005BBA5D /* radar */,
04EA2E6D2BF74FA200AE80B0 /* shipin.json */,
04EA2E6F2BF74FA200AE80B0 /* zixun.json */,
......@@ -2952,6 +2985,9 @@
A5EE42022C216C78005BBA5D /* img_2.jpg in Resources */,
04EA2E702BF74FA200AE80B0 /* shipin.json in Resources */,
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */,
043BA8892C244129006EF02D /* people_head.json in Resources */,
043BA88B2C244146006EF02D /* people_launch.json in Resources */,
043BA88D2C24416A006EF02D /* people_rotate.json in Resources */,
047619ED2BA9B9C900F45358 /* area.plist in Resources */,
A5EE42002C216C78005BBA5D /* img_1.png in Resources */,
048FA0342BFDDFF400AD3BA9 /* submit_page_scroll.gif in Resources */,
......
......@@ -8,6 +8,7 @@
import UIKit
import JXSegmentedView
import Lottie
class YHPeopleViewController: YHBaseViewController {
......@@ -31,6 +32,23 @@ class YHPeopleViewController: YHBaseViewController {
return btn
}()
lazy var headLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_head")
view.loopMode = .loop
return view
}()
lazy var launchLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_launch")
return view
}()
lazy var rotateLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_rotate")
view.isHidden = true
return view
}()
lazy var bottomLabel:UILabel = {
let label = UILabel()
label.textAlignment = .center
......@@ -43,6 +61,7 @@ class YHPeopleViewController: YHBaseViewController {
lazy var firstImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "people_first_bg_image")
imageView.isHidden = true
return imageView
}()
......@@ -53,6 +72,11 @@ class YHPeopleViewController: YHBaseViewController {
createUI()
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
resetAnimation()
}
func createUI() {
let wingLeftImgV = UIImageView(image: UIImage(named: "people_match_wing_left"))
......@@ -65,6 +89,26 @@ class YHPeopleViewController: YHBaseViewController {
self.view.addSubview(firstImageView)
self.view.addSubview(self.bottomBtn)
self.view.addSubview(self.bottomLabel)
self.view.addSubview(launchLottieView)
self.view.addSubview(rotateLottieView)
self.view.addSubview(headLottieView)
self.headLottieView.play()
launchLottieView.snp.makeConstraints { make in
make.width.height.equalTo(KScreenWidth)
make.centerX.equalToSuperview()
make.top.equalTo(204-48-k_Height_statusBar())
}
headLottieView.snp.makeConstraints { make in
make.width.height.equalTo(KScreenWidth)
make.center.equalTo(launchLottieView)
}
rotateLottieView.snp.makeConstraints { make in
make.width.height.equalTo(KScreenWidth)
make.center.equalTo(launchLottieView)
}
firstImageView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(547)
......@@ -103,17 +147,35 @@ class YHPeopleViewController: YHBaseViewController {
}
@objc func didMatchBtnClicked() {
if true {
self.headLottieView.isHidden = true
self.launchLottieView.loopMode = .playOnce
self.launchLottieView.play {
[weak self] completed in
guard let self = self else { return }
self.launchLottieView.isHidden = true
self.rotateLottieView.isHidden = false
self.rotateLottieView.loopMode = .playOnce
self.rotateLottieView.play { completed in
let vc = YHMatchPeopleViewController()
self.navigationController?.pushViewController(vc)
}
}
return
}
let view = YHPeopleSuccessView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
// let vc = YHMatchPeopleViewController()
// self.navigationController?.pushViewController(vc)
// let view = YHNameCardInfoView.createCardView()
// view.show()
}
// let vc = YHMyGoodFriendsVC()
// self.navigationController?.pushViewController(vc)
func resetAnimation() {
self.launchLottieView.stop()
self.rotateLottieView.stop()
self.headLottieView.isHidden = false
self.launchLottieView.isHidden = false
self.rotateLottieView.isHidden = true
}
}
......
......@@ -136,7 +136,7 @@ class YHAddFriendCardCell: UITableViewCell {
self.headImgV.backgroundColor = .red
self.nameLabel.text = "XASAFSDFASDXASAFSDFASDXASAFSDFASDXASAFSDFASD"
self.professionalLabel.text = "咨询副总监 | 资讯科技及电讯"
self.msgLabel.text = "资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资"
self.msgLabel.text = "资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及科技及电讯资资讯科技及讯科技及电讯资资讯科技及科技及电讯资资讯科技及讯科技及电讯资资讯科技及"
cardView.snp.makeConstraints { make in
make.edges.equalToSuperview()
......@@ -178,12 +178,13 @@ class YHAddFriendCardCell: UITableViewCell {
make.right.equalTo(-16)
make.top.equalTo(self.headImgV.snp.bottom).offset(16)
make.bottom.equalTo(self.ignoreBtn.snp.top).offset(-16)
make.height.lessThanOrEqualTo(60.0+6*2)
let msgHeight = self.getHeight(text: self.msgLabel.text!, font: self.msgLabel.font!, width: KScreenWidth-40.0*2)
make.height.equalTo(msgHeight >= 55.0 ? 52+12 : msgHeight+12)
}
self.scrollContentView.snp.makeConstraints { make in
make.width.equalTo(KScreenWidth-40*2)
make.height.equalToSuperview().offset(-12)
make.left.equalToSuperview().offset(8)
make.right.equalToSuperview().offset(-8)
make.top.equalToSuperview().offset(6)
......@@ -208,4 +209,16 @@ class YHAddFriendCardCell: UITableViewCell {
}
}
func getHeight(text:String, font:UIFont, width:CGFloat)->CGFloat {
let attributes = [NSAttributedString.Key.font: font] as [NSAttributedString.Key : Any]
let boundingSize = (text as NSString).boundingRect(
with: CGSize(width: width, height: .greatestFiniteMagnitude),
options: .usesLineFragmentOrigin,
attributes: attributes,
context: nil
).size
let textHeight = ceill(boundingSize.height)
return textHeight
}
}
......@@ -30,6 +30,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
var bottomRightLineView: UIView!
var fileImageView: UIImageView!
var fileNameLabel: UILabel!
var shareButton: UIButton!
var editButton: UIButton!
var submitButton: UIButton!
var lookButton: UIButton!
......@@ -109,6 +110,20 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
make.top.equalTo(52)
}
shareButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "share_mini_program"), for: .normal)
button.addTarget(self, action: #selector(shareButtonClick), for: .touchUpInside)
return button
}()
centerView.addSubview(shareButton)
shareButton.snp.makeConstraints { make in
make.top.equalTo(18)
make.right.equalTo(-24)
make.height.equalTo(20)
make.width.equalTo(80)
}
bottomView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
......@@ -265,6 +280,10 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
}
}
@objc func shareButtonClick() {
YHShareManager.shared.sendMiniProgram()
}
func updataButton() {
if isSign {
bottomLeftLineView.isHidden = true
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "share_mini_program@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "share_mini_program@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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