Commit d7c61350 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:
  6666
  //  匹配动画优化
parents 1895b248 e3503d30
...@@ -35,6 +35,8 @@ class YHMatchUserViewController: YHBaseViewController { ...@@ -35,6 +35,8 @@ class YHMatchUserViewController: YHBaseViewController {
return btn return btn
}() }()
var isBottomBtnEnabled = true
lazy var headLottieView: LottieAnimationView = { lazy var headLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_head") let view = LottieAnimationView(name: "people_head")
view.loopMode = .loop view.loopMode = .loop
...@@ -226,6 +228,12 @@ extension YHMatchUserViewController: JXSegmentedListContainerViewListDelegate { ...@@ -226,6 +228,12 @@ extension YHMatchUserViewController: JXSegmentedListContainerViewListDelegate {
extension YHMatchUserViewController: YHMatchProtocol { extension YHMatchUserViewController: YHMatchProtocol {
func startMatchUsers() { func startMatchUsers() {
if !self.isBottomBtnEnabled {
return
}
self.isBottomBtnEnabled = false
self.headLottieView.isHidden = true self.headLottieView.isHidden = true
self.launchLottieView.isHidden = false self.launchLottieView.isHidden = false
self.launchLottieView.loopMode = .playOnce self.launchLottieView.loopMode = .playOnce
...@@ -236,7 +244,9 @@ extension YHMatchUserViewController: YHMatchProtocol { ...@@ -236,7 +244,9 @@ extension YHMatchUserViewController: YHMatchProtocol {
self.rotateLottieView.isHidden = false self.rotateLottieView.isHidden = false
self.rotateLottieView.loopMode = .loop self.rotateLottieView.loopMode = .loop
self.rotateLottieView.play() self.rotateLottieView.play()
self.requestMatchUserList() DispatchQueue.global().asyncAfter(deadline: .now()+2.0, execute: {
self.requestMatchUserList()
})
} }
} }
} }
...@@ -245,7 +255,7 @@ extension YHMatchUserViewController { ...@@ -245,7 +255,7 @@ extension YHMatchUserViewController {
func requestMatchUserList() { func requestMatchUserList() {
self.viewModel.getMatchUserlist { self.viewModel.getMatchUserlist {
success, error in success, error in
self.isBottomBtnEnabled = true
if success, self.viewModel.matchUserArr.count > 0 { if success, self.viewModel.matchUserArr.count > 0 {
let vc = YHMatchResultListViewController() let vc = YHMatchResultListViewController()
vc.delegate = self vc.delegate = self
......
...@@ -205,7 +205,7 @@ class YHEditViewModel: YHBaseViewModel { ...@@ -205,7 +205,7 @@ class YHEditViewModel: YHBaseViewModel {
} }
func requestSaveTopics(topics: [String], draft_topics: [String], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) { func requestSaveTopics(topics: [String], draft_topics: [String], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
let interest: [String: Any] = ["topics": topics, "is_update": true, "draft_topics": draft_topics] let interest: [String: Any] = ["is_update": true, "topics": topics, "draft_topics": draft_topics]
let params: [String: Any] = ["interest": interest] let params: [String: Any] = ["interest": interest]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.People.cardSave let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.People.cardSave
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
......
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