Commit 4ca87c64 authored by pete谢兆麟's avatar pete谢兆麟

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

parents 9a21550c 18f40d48
...@@ -1187,6 +1187,12 @@ ...@@ -1187,6 +1187,12 @@
04AE205A2D1944D600891D24 /* YHGCMyFileListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AE20592D1944D600891D24 /* YHGCMyFileListViewController.swift */; }; 04AE205A2D1944D600891D24 /* YHGCMyFileListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AE20592D1944D600891D24 /* YHGCMyFileListViewController.swift */; };
04AE20632D1ADA8100891D24 /* YHGCPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AE20622D1ADA8100891D24 /* YHGCPreviewViewModel.swift */; }; 04AE20632D1ADA8100891D24 /* YHGCPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AE20622D1ADA8100891D24 /* YHGCPreviewViewModel.swift */; };
04AE20652D1BD9B500891D24 /* YHGCCertificateEntryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AE20642D1BD9B500891D24 /* YHGCCertificateEntryCell.swift */; }; 04AE20652D1BD9B500891D24 /* YHGCCertificateEntryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AE20642D1BD9B500891D24 /* YHGCCertificateEntryCell.swift */; };
04AFEF3F2D5D8F8A0007A011 /* YHMyNewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AFEF3E2D5D8F8A0007A011 /* YHMyNewViewController.swift */; };
04AFEF412D5D97140007A011 /* YHMySectionGroupCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AFEF402D5D97140007A011 /* YHMySectionGroupCell.swift */; };
04AFEF432D5D99420007A011 /* YHMyFunctionGroupItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AFEF422D5D99420007A011 /* YHMyFunctionGroupItemCell.swift */; };
04AFEF452D5DDCCB0007A011 /* YHMyFunctionGroup2Cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AFEF442D5DDCCB0007A011 /* YHMyFunctionGroup2Cell.swift */; };
04AFEF492D5DDE180007A011 /* YHMyFunctionGroupItem2Cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AFEF482D5DDE180007A011 /* YHMyFunctionGroupItem2Cell.swift */; };
04AFEF4B2D5DF3710007A011 /* YHMyUserInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AFEF4A2D5DF3710007A011 /* YHMyUserInfoView.swift */; };
04E4CF3E2D5C6D32004D4013 /* YHCountryMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */; }; 04E4CF3E2D5C6D32004D4013 /* YHCountryMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */; };
04E4CF402D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */; }; 04E4CF402D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */; };
04EA376D2BEA06EF00DBAF64 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376C2BEA06EF00DBAF64 /* WebKit.framework */; }; 04EA376D2BEA06EF00DBAF64 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376C2BEA06EF00DBAF64 /* WebKit.framework */; };
...@@ -2184,7 +2190,6 @@ ...@@ -2184,7 +2190,6 @@
045C0E7A2D12CA5E00BD2DC0 /* YHH5WebViewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHH5WebViewVC.swift; sourceTree = "<group>"; }; 045C0E7A2D12CA5E00BD2DC0 /* YHH5WebViewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHH5WebViewVC.swift; sourceTree = "<group>"; };
045C0E7B2D12CA5E00BD2DC0 /* YHJsApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHJsApi.swift; sourceTree = "<group>"; }; 045C0E7B2D12CA5E00BD2DC0 /* YHJsApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHJsApi.swift; sourceTree = "<group>"; };
045C0E7D2D12CA5E00BD2DC0 /* YHBasePlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBasePlayerViewController.swift; sourceTree = "<group>"; }; 045C0E7D2D12CA5E00BD2DC0 /* YHBasePlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBasePlayerViewController.swift; sourceTree = "<group>"; };
045C0E7E2D12CA5E00BD2DC0 /* YHFloatingWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFloatingWindow.swift; sourceTree = "<group>"; };
045C0E7F2D12CA5E00BD2DC0 /* YHLivePlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLivePlayerViewController.swift; sourceTree = "<group>"; }; 045C0E7F2D12CA5E00BD2DC0 /* YHLivePlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLivePlayerViewController.swift; sourceTree = "<group>"; };
045C0E802D12CA5E00BD2DC0 /* YHLivePlayerViewController+Api.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "YHLivePlayerViewController+Api.swift"; sourceTree = "<group>"; }; 045C0E802D12CA5E00BD2DC0 /* YHLivePlayerViewController+Api.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "YHLivePlayerViewController+Api.swift"; sourceTree = "<group>"; };
045C0E812D12CA5E00BD2DC0 /* YHLiveStateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLiveStateViewController.swift; sourceTree = "<group>"; }; 045C0E812D12CA5E00BD2DC0 /* YHLiveStateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLiveStateViewController.swift; sourceTree = "<group>"; };
...@@ -2413,6 +2418,12 @@ ...@@ -2413,6 +2418,12 @@
04AE20592D1944D600891D24 /* YHGCMyFileListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCMyFileListViewController.swift; sourceTree = "<group>"; }; 04AE20592D1944D600891D24 /* YHGCMyFileListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCMyFileListViewController.swift; sourceTree = "<group>"; };
04AE20622D1ADA8100891D24 /* YHGCPreviewViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCPreviewViewModel.swift; sourceTree = "<group>"; }; 04AE20622D1ADA8100891D24 /* YHGCPreviewViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCPreviewViewModel.swift; sourceTree = "<group>"; };
04AE20642D1BD9B500891D24 /* YHGCCertificateEntryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCCertificateEntryCell.swift; sourceTree = "<group>"; }; 04AE20642D1BD9B500891D24 /* YHGCCertificateEntryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCCertificateEntryCell.swift; sourceTree = "<group>"; };
04AFEF3E2D5D8F8A0007A011 /* YHMyNewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNewViewController.swift; sourceTree = "<group>"; };
04AFEF402D5D97140007A011 /* YHMySectionGroupCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySectionGroupCell.swift; sourceTree = "<group>"; };
04AFEF422D5D99420007A011 /* YHMyFunctionGroupItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFunctionGroupItemCell.swift; sourceTree = "<group>"; };
04AFEF442D5DDCCB0007A011 /* YHMyFunctionGroup2Cell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFunctionGroup2Cell.swift; sourceTree = "<group>"; };
04AFEF482D5DDE180007A011 /* YHMyFunctionGroupItem2Cell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFunctionGroupItem2Cell.swift; sourceTree = "<group>"; };
04AFEF4A2D5DF3710007A011 /* YHMyUserInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyUserInfoView.swift; sourceTree = "<group>"; };
04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCountryMessageView.swift; sourceTree = "<group>"; }; 04E4CF3D2D5C6D32004D4013 /* YHCountryMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCountryMessageView.swift; sourceTree = "<group>"; };
04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectPhoneCountryViewController.swift; sourceTree = "<group>"; }; 04E4CF3F2D5C83AE004D4013 /* YHSelectPhoneCountryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectPhoneCountryViewController.swift; sourceTree = "<group>"; };
04EA376C2BEA06EF00DBAF64 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 04EA376C2BEA06EF00DBAF64 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
...@@ -5432,7 +5443,6 @@ ...@@ -5432,7 +5443,6 @@
children = ( children = (
045C0E7D2D12CA5E00BD2DC0 /* YHBasePlayerViewController.swift */, 045C0E7D2D12CA5E00BD2DC0 /* YHBasePlayerViewController.swift */,
04307BAD2D1FFEA200ED8E8D /* YHLiveAppointmentViewController.swift */, 04307BAD2D1FFEA200ED8E8D /* YHLiveAppointmentViewController.swift */,
045C0E7E2D12CA5E00BD2DC0 /* YHFloatingWindow.swift */,
045C0E7F2D12CA5E00BD2DC0 /* YHLivePlayerViewController.swift */, 045C0E7F2D12CA5E00BD2DC0 /* YHLivePlayerViewController.swift */,
045C0E802D12CA5E00BD2DC0 /* YHLivePlayerViewController+Api.swift */, 045C0E802D12CA5E00BD2DC0 /* YHLivePlayerViewController+Api.swift */,
045C0E812D12CA5E00BD2DC0 /* YHLiveStateViewController.swift */, 045C0E812D12CA5E00BD2DC0 /* YHLiveStateViewController.swift */,
...@@ -5692,6 +5702,7 @@ ...@@ -5692,6 +5702,7 @@
045C0EDC2D12CA5E00BD2DC0 /* YHMyPermissionSettingVC.swift */, 045C0EDC2D12CA5E00BD2DC0 /* YHMyPermissionSettingVC.swift */,
045C0EDD2D12CA5E00BD2DC0 /* YHMySettingViewController.swift */, 045C0EDD2D12CA5E00BD2DC0 /* YHMySettingViewController.swift */,
045C0EDE2D12CA5E00BD2DC0 /* YHMyViewController.swift */, 045C0EDE2D12CA5E00BD2DC0 /* YHMyViewController.swift */,
04AFEF3E2D5D8F8A0007A011 /* YHMyNewViewController.swift */,
045C0EDF2D12CA5E00BD2DC0 /* YHTestViewController.swift */, 045C0EDF2D12CA5E00BD2DC0 /* YHTestViewController.swift */,
045C0EE02D12CA5E00BD2DC0 /* YHVideoPlaySettingVC.swift */, 045C0EE02D12CA5E00BD2DC0 /* YHVideoPlaySettingVC.swift */,
); );
...@@ -5763,8 +5774,13 @@ ...@@ -5763,8 +5774,13 @@
045C0EF52D12CA5E00BD2DC0 /* YHAboutUsCell.swift */, 045C0EF52D12CA5E00BD2DC0 /* YHAboutUsCell.swift */,
045C0EF62D12CA5E00BD2DC0 /* YHMyPermissionCell.swift */, 045C0EF62D12CA5E00BD2DC0 /* YHMyPermissionCell.swift */,
045C0EF72D12CA5E00BD2DC0 /* YHMySettingCell.swift */, 045C0EF72D12CA5E00BD2DC0 /* YHMySettingCell.swift */,
04AFEF402D5D97140007A011 /* YHMySectionGroupCell.swift */,
04AFEF442D5DDCCB0007A011 /* YHMyFunctionGroup2Cell.swift */,
04AFEF422D5D99420007A011 /* YHMyFunctionGroupItemCell.swift */,
04AFEF482D5DDE180007A011 /* YHMyFunctionGroupItem2Cell.swift */,
045C0EF82D12CA5E00BD2DC0 /* YHPersonalCenterCell.swift */, 045C0EF82D12CA5E00BD2DC0 /* YHPersonalCenterCell.swift */,
045C0EF92D12CA5E00BD2DC0 /* YHUserInfoHeaderView.swift */, 045C0EF92D12CA5E00BD2DC0 /* YHUserInfoHeaderView.swift */,
04AFEF4A2D5DF3710007A011 /* YHMyUserInfoView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -6943,6 +6959,7 @@ ...@@ -6943,6 +6959,7 @@
045C102A2D12CA5F00BD2DC0 /* YHEditViewModel.swift in Sources */, 045C102A2D12CA5F00BD2DC0 /* YHEditViewModel.swift in Sources */,
045C102B2D12CA5F00BD2DC0 /* YHAppVersionForceUpdateView.swift in Sources */, 045C102B2D12CA5F00BD2DC0 /* YHAppVersionForceUpdateView.swift in Sources */,
045C102C2D12CA5F00BD2DC0 /* YHMyPermissionCell.swift in Sources */, 045C102C2D12CA5F00BD2DC0 /* YHMyPermissionCell.swift in Sources */,
04AFEF3F2D5D8F8A0007A011 /* YHMyNewViewController.swift in Sources */,
045C102D2D12CA5F00BD2DC0 /* YHHKEventModel.swift in Sources */, 045C102D2D12CA5F00BD2DC0 /* YHHKEventModel.swift in Sources */,
045C102E2D12CA5F00BD2DC0 /* YHOfficailLetterColledtionCell.swift in Sources */, 045C102E2D12CA5F00BD2DC0 /* YHOfficailLetterColledtionCell.swift in Sources */,
045C102F2D12CA5F00BD2DC0 /* YHFormItemInputTextCell.swift in Sources */, 045C102F2D12CA5F00BD2DC0 /* YHFormItemInputTextCell.swift in Sources */,
...@@ -7067,6 +7084,7 @@ ...@@ -7067,6 +7084,7 @@
045C10942D12CA5F00BD2DC0 /* YHWorkItemListViewModel.swift in Sources */, 045C10942D12CA5F00BD2DC0 /* YHWorkItemListViewModel.swift in Sources */,
045C10952D12CA5F00BD2DC0 /* YHHomeInfoSectionCell.swift in Sources */, 045C10952D12CA5F00BD2DC0 /* YHHomeInfoSectionCell.swift in Sources */,
045C10962D12CA5F00BD2DC0 /* YHShareViewOnTablebarView.swift in Sources */, 045C10962D12CA5F00BD2DC0 /* YHShareViewOnTablebarView.swift in Sources */,
04AFEF432D5D99420007A011 /* YHMyFunctionGroupItemCell.swift in Sources */,
045C10972D12CA5F00BD2DC0 /* YHMaterialListCell.swift in Sources */, 045C10972D12CA5F00BD2DC0 /* YHMaterialListCell.swift in Sources */,
045C10982D12CA5F00BD2DC0 /* YHTravelDocsPreparationListModel.swift in Sources */, 045C10982D12CA5F00BD2DC0 /* YHTravelDocsPreparationListModel.swift in Sources */,
045C10992D12CA5F00BD2DC0 /* YHCertificateAppointOptionCell.swift in Sources */, 045C10992D12CA5F00BD2DC0 /* YHCertificateAppointOptionCell.swift in Sources */,
...@@ -7713,6 +7731,7 @@ ...@@ -7713,6 +7731,7 @@
045C12E42D12CA5F00BD2DC0 /* YHMsgViewModel.swift in Sources */, 045C12E42D12CA5F00BD2DC0 /* YHMsgViewModel.swift in Sources */,
045C12E52D12CA5F00BD2DC0 /* YHJsApi.swift in Sources */, 045C12E52D12CA5F00BD2DC0 /* YHJsApi.swift in Sources */,
045C12E62D12CA5F00BD2DC0 /* YHScoreResultView.swift in Sources */, 045C12E62D12CA5F00BD2DC0 /* YHScoreResultView.swift in Sources */,
04AFEF492D5DDE180007A011 /* YHMyFunctionGroupItem2Cell.swift in Sources */,
045C12E72D12CA5F00BD2DC0 /* YHAIChatShadowView.swift in Sources */, 045C12E72D12CA5F00BD2DC0 /* YHAIChatShadowView.swift in Sources */,
045C12E82D12CA5F00BD2DC0 /* YHSettingItem.swift in Sources */, 045C12E82D12CA5F00BD2DC0 /* YHSettingItem.swift in Sources */,
045C12E92D12CA5F00BD2DC0 /* YHBasicInfoFillCell.swift in Sources */, 045C12E92D12CA5F00BD2DC0 /* YHBasicInfoFillCell.swift in Sources */,
...@@ -7786,6 +7805,7 @@ ...@@ -7786,6 +7805,7 @@
045C13282D12CA5F00BD2DC0 /* YHResignDocumentSignatureModel.swift in Sources */, 045C13282D12CA5F00BD2DC0 /* YHResignDocumentSignatureModel.swift in Sources */,
045C13292D12CA5F00BD2DC0 /* YHAICardItemView.swift in Sources */, 045C13292D12CA5F00BD2DC0 /* YHAICardItemView.swift in Sources */,
045C132A2D12CA5F00BD2DC0 /* YHServiceSelectAlertView.swift in Sources */, 045C132A2D12CA5F00BD2DC0 /* YHServiceSelectAlertView.swift in Sources */,
04AFEF412D5D97140007A011 /* YHMySectionGroupCell.swift in Sources */,
045C132B2D12CA5F00BD2DC0 /* YHResignUploadDocListCell.swift in Sources */, 045C132B2D12CA5F00BD2DC0 /* YHResignUploadDocListCell.swift in Sources */,
045C132C2D12CA5F00BD2DC0 /* YHImageViewController.swift in Sources */, 045C132C2D12CA5F00BD2DC0 /* YHImageViewController.swift in Sources */,
045C132D2D12CA5F00BD2DC0 /* YHSelectCountryViewController.swift in Sources */, 045C132D2D12CA5F00BD2DC0 /* YHSelectCountryViewController.swift in Sources */,
...@@ -7880,6 +7900,7 @@ ...@@ -7880,6 +7900,7 @@
045C13812D12CA5F00BD2DC0 /* YHParentInfoVC.swift in Sources */, 045C13812D12CA5F00BD2DC0 /* YHParentInfoVC.swift in Sources */,
045C13822D12CA5F00BD2DC0 /* YHResignMaterialUploadVC.swift in Sources */, 045C13822D12CA5F00BD2DC0 /* YHResignMaterialUploadVC.swift in Sources */,
045C13832D12CA5F00BD2DC0 /* YHVisaRenewalGuideIndentCell.swift in Sources */, 045C13832D12CA5F00BD2DC0 /* YHVisaRenewalGuideIndentCell.swift in Sources */,
04AFEF4B2D5DF3710007A011 /* YHMyUserInfoView.swift in Sources */,
045C13842D12CA5F00BD2DC0 /* YHOtherInfoFillModel.swift in Sources */, 045C13842D12CA5F00BD2DC0 /* YHOtherInfoFillModel.swift in Sources */,
04AE20252D13B11200891D24 /* YHGCSpouseBasicInfoVC.swift in Sources */, 04AE20252D13B11200891D24 /* YHGCSpouseBasicInfoVC.swift in Sources */,
045C13852D12CA5F00BD2DC0 /* YHCertificateUploadVC.swift in Sources */, 045C13852D12CA5F00BD2DC0 /* YHCertificateUploadVC.swift in Sources */,
...@@ -7934,6 +7955,7 @@ ...@@ -7934,6 +7955,7 @@
045C13B22D12CA5F00BD2DC0 /* YHPersonInfoFillStepModel.swift in Sources */, 045C13B22D12CA5F00BD2DC0 /* YHPersonInfoFillStepModel.swift in Sources */,
045C13B32D12CA5F00BD2DC0 /* YHDocumentUploadTableViewCell.swift in Sources */, 045C13B32D12CA5F00BD2DC0 /* YHDocumentUploadTableViewCell.swift in Sources */,
045C13B42D12CA5F00BD2DC0 /* YHHKRequiredItemListCell.swift in Sources */, 045C13B42D12CA5F00BD2DC0 /* YHHKRequiredItemListCell.swift in Sources */,
04AFEF452D5DDCCB0007A011 /* YHMyFunctionGroup2Cell.swift in Sources */,
045C13B52D12CA5F00BD2DC0 /* YHFamilyInitialInfo.swift in Sources */, 045C13B52D12CA5F00BD2DC0 /* YHFamilyInitialInfo.swift in Sources */,
045C13B62D12CA5F00BD2DC0 /* YHPickPhoneAddressViewController.swift in Sources */, 045C13B62D12CA5F00BD2DC0 /* YHPickPhoneAddressViewController.swift in Sources */,
); );
......
//
// YHFloatingWindow.swift
// galaxy
//
// Created by alexzzw on 2024/11/29.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
//
// YHMyNewViewController.swift
// galaxy
//
// Created by Dufet on 2025/2/13.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum YHFunctionGroupType: Int {
case none = 0
case score = 1
case orderAndService = 2
case others = 3
}
class YHFunctionGroupInfo {
var type: YHFunctionGroupType = .none
var title: String = ""
var arr:[PersonalModuleItem] = []
init(type: YHFunctionGroupType, title: String, arr: [PersonalModuleItem]) {
self.type = type
self.title = title
self.arr = arr
}
}
class YHMyNewViewController: YHBaseViewController {
let likeViewModel: YHMyLikeViewModel = YHMyLikeViewModel()
let msgViewModel: YHMsgViewModel = YHMsgViewModel()
let loginViewModel = YHLoginViewModel()
let userViewModel = YHMatchUserViewModel()
var functionGroupArr:[YHFunctionGroupInfo] = []
private lazy var princleVM : YHPrincleViewModel = {
let vm = YHPrincleViewModel()
return vm
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame: CGRect.zero, style:.grouped)
tableView.contentInsetAdjustmentBehavior = .never
tableView.estimatedSectionHeaderHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.bounces = false
tableView.register(YHMySectionGroupCell.self, forCellReuseIdentifier: YHMySectionGroupCell.cellReuseIdentifier)
tableView.register(YHMyFunctionGroup2Cell.self, forCellReuseIdentifier: YHMyFunctionGroup2Cell.cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
tableView.tableHeaderView = self.userInfoView
return tableView
}()
lazy var userInfoView: YHMyUserInfoView = {
let v = YHMyUserInfoView.createView()
return v
}()
private lazy var settingBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "mine_btn_setting"), for: .normal)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
btn.addTarget(self, action: #selector(didClickSettingBtn(btn:)), for: .touchUpInside)
return btn
}()
private lazy var settingRedPointView: UIView = {
let view = UIView()
view.layer.cornerRadius = kCornerRadius3
view.backgroundColor = .failColor
view.isHidden = true
return view
}()
lazy var bgImgView:UIImageView = {
let imgView = UIImageView(image: UIImage(named: "mine_header_backImg"))
return imgView
}()
override func viewDidLoad() {
super.viewDidLoad()
gk_navigationBar.isHidden = true
view.backgroundColor = .init(UIColor(hex: 0xF9F9FB))
view.addSubview(bgImgView)
view.addSubview(tableView)
view.addSubview(settingBtn)
bgImgView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(bgImgView.snp.width)
}
tableView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.top.equalToSuperview().offset(k_Height_statusBar()+44)
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
settingBtn.snp.makeConstraints { make in
make.width.height.equalTo(24.0)
make.right.equalToSuperview().offset(-17)
make.top.equalTo(k_Height_statusBar()+10)
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadItems()
}
func checkLogin()->Bool {
if YHLoginManager.shared.isLogin() == false {
YHOneKeyLoginManager.shared.oneKeyLogin()
return false
}
return true
}
//uat 添加items
func loadItems() {
var scoreGroupArr:[PersonalModuleItem] = []
var serviceGroupArr:[PersonalModuleItem] = []
var otherGroupArr:[PersonalModuleItem] = []
// if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_MyCard) == 1 {
// let item = PersonalModuleItem(icon: "mine_item_card", title: "我的名片".local, type:.myCard)
// items.append(item)
// }
// 邀请好友和积分商城
do {
let item = PersonalModuleItem(icon: "mine_item_invite", title: "邀请好友".local, desc: "推荐好友享好礼", type:.scoreCenter)
scoreGroupArr.append(item)
}
if let configModel = YHConfigManager.shared.reqVM.configModel,configModel.is_integral_open {
if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_IntegralCenter) == 1 {
let item = PersonalModuleItem(icon: "mine_item_score", title: "积分商城".local, desc: "超值商品随心换", type:.scoreCenter)
scoreGroupArr.append(item)
}
}
// 订单与服务
if let configModel = YHConfigManager.shared.reqVM.configModel,configModel.is_integral_open {
let item = PersonalModuleItem(icon: "mine_item_myOrder", title: "我的订单".local, type:.myOrder)
serviceGroupArr.append(item)
}
if let configModel = YHConfigManager.shared.reqVM.configModel,configModel.is_integral_open {
let item = PersonalModuleItem(icon: "mine_item_service_center", title: "服务进度".local, type:.serviceStep)
serviceGroupArr.append(item)
}
if let configModel = YHConfigManager.shared.reqVM.configModel,configModel.is_integral_open {
let item = PersonalModuleItem(icon: "mine_item_cart", title: "购物车".local, type:.mycart)
serviceGroupArr.append(item)
}
if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_MyActivity) == 1 {
let item = PersonalModuleItem(icon: "mine_item_activity", title: "我的活动".local, type:.myActivity)
serviceGroupArr.append(item)
}
// 其他功能
do {
let item = PersonalModuleItem(icon: "mine_item_msg", title: "我的消息".local, type:.myMessage)
otherGroupArr.append(item)
}
if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_EvaluationCode) == 1 {
let item = PersonalModuleItem(icon: "mine_item_code", title: "我的测评码".local, type:.myTestCode)
otherGroupArr.append(item)
}
if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_AboutYinHeHarbour) == 1 {
let item = PersonalModuleItem(icon: "mine_item_appoint", title: "关于银河湾".local, type:.appointGalaxyBay)
otherGroupArr.append(item)
}
if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_AboutUS) == 1 {
let item = PersonalModuleItem(icon: "mine_item_about_us", title: "关于我们".local, type: .aboutUs)
otherGroupArr.append(item)
}
let scoreGroup = YHFunctionGroupInfo(type: .score, title: "", arr: scoreGroupArr)
let serviceGroup = YHFunctionGroupInfo(type: .orderAndService, title: "订单与服务", arr: serviceGroupArr)
let otherGroup = YHFunctionGroupInfo(type: .others, title: "其他功能", arr: otherGroupArr)
functionGroupArr.removeAll()
functionGroupArr.append(scoreGroup)
functionGroupArr.append(serviceGroup)
functionGroupArr.append(otherGroup)
tableView.reloadData()
}
@objc func didClickSettingBtn(btn: UIButton) {
if !checkLogin() { return }
let vc = YHMySettingViewController()
self.navigationController?.pushViewController(vc)
}
}
extension YHMyNewViewController : UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return functionGroupArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHMySectionGroupCell.cellReuseIdentifier, for: indexPath) as! YHMySectionGroupCell
if 0 <= indexPath.row, indexPath.row < functionGroupArr.count {
let group: YHFunctionGroupInfo = functionGroupArr[indexPath.row]
if group.type == .score {
let cell2 = tableView.dequeueReusableCell(withIdentifier: YHMyFunctionGroup2Cell.cellReuseIdentifier, for: indexPath) as! YHMyFunctionGroup2Cell
cell2.updateGroup(group)
return cell2
}
cell.updateGroup(group)
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
// func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// if (indexPath.row >= items.count) { return }
//
// if !checkLogin() {
// return
// }
//
// let item: PersonalModuleItem = items[indexPath.row]
// switch item.type {
// case .myCard://我的名片
// if let userId = YHLoginManager.shared.userModel?.id, !userId.isEmpty {
// let vc = YHNameCardViewController()
// vc.userId = userId
// self.navigationController?.pushViewController(vc)
// } else {
// YHHUD.show(.progress(message: "加载中..."))
// self.loginViewModel.getUserId {
// [weak self] uid in
// YHHUD.hide()
// guard let self = self else { return }
// if !uid.isEmpty {
// YHLoginManager.shared.userModel?.id = uid
// let vc = YHNameCardViewController()
// vc.userId = uid
// self.navigationController?.pushViewController(vc)
// }
// }
// }
// case .myMessage://我的消息
// printLog("我的消息")
// goToMessagePage()
//
// case .scoreCenter:////积分中心
// printLog("积分中心")
// if let param = YHLoginManager.shared.userModel?.token,param.count>5 {
// printLog(param)
// var url = YHBaseUrlManager.shared.curH5URL() + "superApp/integral"
// url = url + "?param=" + YHLoginManager.shared.h5Token
//
// let vc = YHH5WebViewVC()
// vc.title = "积分中心"
// vc.navTitle = "积分中心"
// vc.url = url
// vc.isFullScreenFlag = false
// vc.isSupportWebviewInterBackFlag = true
// self.navigationController?.pushViewController(vc)
// }
// case .myTestCode://我的测评码
// printLog("我的测评码")
// let vc = YHHomeWebViewController()
// vc.title = "香港身份测评码"
// vc.vcTitle = "香港身份测评码"
// vc.showSavePicBottomFlag = true
// vc.url = "https://cdn-public.galaxy-immi.com/app/cepingma.png"
// self.navigationController?.pushViewController(vc)
// case .appointGalaxyBay://预约银河湾
// printLog("预约银河湾")
// let vc = YHListViewController()
// self.navigationController?.pushViewController(vc)
// case .myActivity:
// printLog("我的活动")
// let vc = YHActivityListViewController()
// vc.type = 1
// self.navigationController?.pushViewController(vc)
// case .aboutUs:
// let vc = YHAboutGalaxyViewController()
// self.navigationController?.pushViewController(vc)
// case .myOrder:
//// 我的订单
// if let token = YHLoginManager.shared.userModel?.token,token.count > 5 {
// var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/order/my"
// url = url + "?param=" + YHLoginManager.shared.h5Token
// printLog("URL: \(url)")
// let vc = YHH5WebViewVC()
// vc.url = url
// vc.isFullScreenFlag = false
// vc.navTitle = "我的订单"
// vc.isSupportWebviewInterBackFlag = true
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// case .mycart:
//// 我的订单
// if let token = YHLoginManager.shared.userModel?.token,token.count > 5 {
// var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/goods/cart"
// url = url + "?param=" + YHLoginManager.shared.h5Token
// printLog("URL: \(url)")
// var tUrl = url
// if !url.contains("navigationH=") {
// tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
// if url.contains("?") {
// tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
// }
// }
// let vc = YHH5WebViewVC()
// vc.url = tUrl
// vc.isFullScreenFlag = false
// vc.navTitle = "购物车"
// vc.isSupportWebviewInterBackFlag = true
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// case .serviceStep:
// UIViewController.current?.tabBarController?.selectedIndex = 1
// default:
// printLog("不需要响应")
// }
// }
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 1.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
}
...@@ -42,12 +42,14 @@ enum YHPersonalModuleItemType: Int { ...@@ -42,12 +42,14 @@ enum YHPersonalModuleItemType: Int {
class PersonalModuleItem { class PersonalModuleItem {
var icon: String? var icon: String?
var title: String var title: String
var desc: String
var type:YHPersonalModuleItemType = .none var type:YHPersonalModuleItemType = .none
var isShowRedPoint:Bool = false var isShowRedPoint:Bool = false
init(icon: String? = nil, title: String, isShowRedPoint:Bool = false, type:YHPersonalModuleItemType) { init(icon: String? = nil, title: String, desc: String = "", isShowRedPoint:Bool = false, type:YHPersonalModuleItemType) {
self.icon = icon self.icon = icon
self.title = title self.title = title
self.desc = desc
self.isShowRedPoint = isShowRedPoint self.isShowRedPoint = isShowRedPoint
self.type = type self.type = type
} }
......
//
// YHMyFunctionGroup2Cell.swift
// galaxy
//
// Created by Dufet on 2025/2/13.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyFunctionGroup2Cell: UITableViewCell {
static let cellReuseIdentifier = "YHMyFunctionGroup2Cell"
static let itemHeight = 74.0
func updateGroup(_ group: YHFunctionGroupInfo) {
groupArr = group.arr
}
var groupArr: [PersonalModuleItem] = [] {
didSet {
let countPerRow = 2
let rowHeight = Self.itemHeight
var listHeight = rowHeight
if groupArr.count%countPerRow == 0 {
listHeight = rowHeight * Double(groupArr.count/countPerRow)
} else {
listHeight = rowHeight * Double(groupArr.count/countPerRow + 1)
}
collectionView.snp.updateConstraints { make in
make.height.equalTo(listHeight)
}
collectionView.reloadData()
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var collectionView: UICollectionView = {
let flowLayout = UICollectionViewFlowLayout()
flowLayout.minimumInteritemSpacing = 10.0
flowLayout.minimumLineSpacing = 0.0
flowLayout.scrollDirection = .vertical
let collectView = UICollectionView(frame:.zero, collectionViewLayout: flowLayout)
collectView.backgroundColor = .clear
collectView.delegate = self
collectView.dataSource = self
collectView.register(YHMyFunctionGroupItem2Cell.self, forCellWithReuseIdentifier: YHMyFunctionGroupItem2Cell.cellReuseIdentifier)
collectView.contentInset = .zero
collectView.showsVerticalScrollIndicator = false
collectView.contentInsetAdjustmentBehavior = .never
return collectView
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
self.selectionStyle = .none
self.backgroundColor = .clear
contentView.backgroundColor = .clear
contentView.addSubview(collectionView)
collectionView.snp.makeConstraints { make in
make.top.equalTo(16)
make.bottom.equalTo(-16)
make.left.right.equalToSuperview()
make.height.equalTo(Self.itemHeight)
}
}
}
extension YHMyFunctionGroup2Cell: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
// 返回单元格数量
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return groupArr.count
}
// 返回每个单元格的大小
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let width = floor((KScreenWidth-20.0*2.0-10.0)/2.0)
return CGSize(width: width, height: Self.itemHeight)
}
// 返回自定义单元格
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHMyFunctionGroupItem2Cell.cellReuseIdentifier, for: indexPath) as! YHMyFunctionGroupItem2Cell
if 0 <= indexPath.item && indexPath.item < groupArr.count {
let item: PersonalModuleItem = groupArr[indexPath.item]
cell.updateItem(item)
}
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
}
}
//
// YHMyFunctionGroupItem2Cell.swift
// galaxy
//
// Created by Dufet on 2025/2/13.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyFunctionGroupItem2Cell: UICollectionViewCell {
static let cellReuseIdentifier = "YHMyFunctionGroupItem2Cell"
func updateItem(_ item : PersonalModuleItem) {
titleLabel.text = item.title
descLabel.text = item.desc
if let icon = item.icon, !icon.isEmpty {
iconImgView.image = UIImage(named:icon)
} else {
iconImgView.image = nil
}
}
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 4.0
view.clipsToBounds = true
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_M(ofSize: 14)
return label
}()
lazy var descLabel: UILabel = {
let label = UILabel()
label.textColor = .init(UIColor(hex: 0x8993A2))
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
lazy var iconImgView: UIImageView = {
let v = UIImageView(image: UIImage(named: ""))
return v
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
func setupUI() {
self.contentView.addSubview(whiteView)
self.whiteView.addSubview(titleLabel)
self.whiteView.addSubview(descLabel)
self.whiteView.addSubview(iconImgView)
whiteView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
iconImgView.snp.makeConstraints { make in
make.left.equalTo(12)
make.width.height.equalTo(42)
make.centerY.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgView.snp.right).offset(8)
make.right.equalTo(-8)
make.top.equalTo(iconImgView)
make.right.equalTo(-8)
make.height.equalTo(20)
}
descLabel.snp.makeConstraints { make in
make.left.equalTo(titleLabel)
make.top.equalTo(titleLabel.snp.bottom).offset(2)
make.height.equalTo(17)
make.right.equalTo(-8)
}
}
}
//
// YHMySectionGroupItemCellCollectionViewCell.swift
// galaxy
//
// Created by Dufet on 2025/2/13.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyFunctionGroupItemCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHMyFunctionGroupItemCell"
func updateItem(_ item : PersonalModuleItem) {
titleLabel.text = item.title
if let icon = item.icon, !icon.isEmpty {
iconImgView.image = UIImage(named:icon)
} else {
iconImgView.image = nil
}
}
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
lazy var iconImgView: UIImageView = {
let v = UIImageView(image: UIImage(named: ""))
return v
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
func setupUI() {
self.contentView.addSubview(titleLabel)
self.contentView.addSubview(iconImgView)
iconImgView.snp.makeConstraints { make in
make.top.equalTo(20)
make.width.height.equalTo(24)
make.centerX.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(iconImgView.snp.bottom).offset(8)
make.height.equalTo(18)
make.left.right.equalToSuperview()
}
}
}
//
// YHMySectionGroupCell.swift
// galaxy
//
// Created by Dufet on 2025/2/13.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMySectionGroupCell: UITableViewCell {
static let cellReuseIdentifier = "YHMySectionGroupCell"
func updateGroup(_ group: YHFunctionGroupInfo) {
titleLabel.text = group.title
groupArr = group.arr
}
var groupArr: [PersonalModuleItem] = [] {
didSet {
let countPerRow = 4
let rowHeight = 90.0
var listHeight = rowHeight
if groupArr.count%countPerRow == 0 {
listHeight = rowHeight * Double(groupArr.count/countPerRow)
} else {
listHeight = rowHeight * Double(groupArr.count/countPerRow + 1)
}
collectionView.snp.updateConstraints { make in
make.height.equalTo(listHeight)
}
collectionView.reloadData()
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 4.0
view.clipsToBounds = true
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_M(ofSize: 14)
return label
}()
lazy var collectionView: UICollectionView = {
let flowLayout = UICollectionViewFlowLayout()
flowLayout.minimumInteritemSpacing = 0.0
flowLayout.minimumLineSpacing = 0.0
flowLayout.scrollDirection = .vertical
let collectView = UICollectionView(frame:.zero, collectionViewLayout: flowLayout)
collectView.backgroundColor = .clear
collectView.delegate = self
collectView.dataSource = self
collectView.register(YHMyFunctionGroupItemCell.self, forCellWithReuseIdentifier: YHMyFunctionGroupItemCell.cellReuseIdentifier)
collectView.contentInset = .zero
collectView.showsVerticalScrollIndicator = false
collectView.contentInsetAdjustmentBehavior = .never
return collectView
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
self.selectionStyle = .none
self.backgroundColor = .clear
contentView.backgroundColor = .clear
contentView.addSubview(whiteView)
whiteView.addSubview(titleLabel)
whiteView.addSubview(collectionView)
whiteView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalTo(-16)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(16)
make.height.equalTo(20)
}
collectionView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(0)
make.bottom.left.right.equalToSuperview()
make.height.equalTo(90)
}
}
}
extension YHMySectionGroupCell: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
// 返回单元格数量
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return groupArr.count
}
// 返回每个单元格的大小
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let width = floor((KScreenWidth-20.0*2.0)/4.0)
return CGSize(width: width, height: 90.0)
}
// 返回自定义单元格
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHMyFunctionGroupItemCell.cellReuseIdentifier, for: indexPath) as! YHMyFunctionGroupItemCell
if 0 <= indexPath.item && indexPath.item < groupArr.count {
let item: PersonalModuleItem = groupArr[indexPath.item]
cell.updateItem(item)
}
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
}
}
//
// YHMyUserInfoView.swift
// galaxy
//
// Created by Dufet on 2025/2/13.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyUserInfoView: UIView {
static let likeTag = 9527
static let collectTag = 9528
static let scanTag = 9529
var avatarClickBlock:(()->Void)?
var nickNameClickBlock:(()->Void)?
var likeClick:(()->Void)?
var collectClick:(()->Void)?
var recentScanClick:(()->Void)?
lazy var contentView: UIView = {
let view = UIView()
return view
}()
lazy var avarImgView:UIImageView = {
let imgView = UIImageView(image: UIImage(named: "mine_head_logout"))
imgView.isUserInteractionEnabled = true
let tap = UITapGestureRecognizer(target: self, action: #selector(didAvarImgViewTapped))
imgView.addGestureRecognizer(tap)
imgView.layer.cornerRadius = 27.0
imgView.contentMode = .scaleAspectFill
imgView.clipsToBounds = true
return imgView
}()
private lazy var userNameLabel:UILabel = {
let label = UILabel()
label.text = "登录/注册".local
label.textColor = .mainTextColor
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_M(ofSize: 21)
label.isUserInteractionEnabled = true
let tap = UITapGestureRecognizer(target: self, action: #selector(didNickNameTapped))
label.addGestureRecognizer(tap)
return label
}()
private lazy var likeLabel:UILabel = {
let label = UILabel()
label.text = "点赞 0".local
label.textColor = UIColor.mainTextColor50
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_R(ofSize: 13)
label.isUserInteractionEnabled = true
label.tag = Self.likeTag
let tap = UITapGestureRecognizer(target: self, action: #selector(tap(gestureRecognizer:)))
label.addGestureRecognizer(tap)
return label
}()
private lazy var collectLabel:UILabel = {
let label = UILabel()
label.text = "收藏 0".local
label.textColor = UIColor.mainTextColor50
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_R(ofSize: 13)
label.isUserInteractionEnabled = true
label.tag = Self.collectTag
let tap = UITapGestureRecognizer(target: self, action: #selector(tap(gestureRecognizer:)))
label.addGestureRecognizer(tap)
return label
}()
private lazy var scanLabel:UILabel = {
let label = UILabel()
label.text = "最近浏览 0".local
label.textColor = UIColor.mainTextColor50
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_R(ofSize: 13)
label.isUserInteractionEnabled = true
label.tag = Self.scanTag
let tap = UITapGestureRecognizer(target: self, action: #selector(tap(gestureRecognizer:)))
label.addGestureRecognizer(tap)
return label
}()
private lazy var line1View:UIView = {
let line = UIView()
line.backgroundColor = UIColor(hex:0x92959D, alpha: 0.2)
return line
}()
private lazy var line2View:UIView = {
let line = UIView()
line.backgroundColor = UIColor(hex:0x92959D, alpha: 0.2)
return line
}()
lazy var arrowImgView: UIImageView = {
let imgV = UIImageView()
imgV.image = UIImage(named: "form_right_arrow")
return imgV
}()
override init(frame: CGRect) {
super.init(frame: frame)
self.clipsToBounds = true
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
static func createView() -> YHMyUserInfoView {
let view = YHMyUserInfoView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height:107))
return view
}
private func createUI() {
self.addSubview(contentView)
contentView.addSubview(avarImgView)
contentView.addSubview(userNameLabel)
contentView.addSubview(likeLabel)
contentView.addSubview(collectLabel)
contentView.addSubview(scanLabel)
contentView.addSubview(line1View)
contentView.addSubview(line2View)
contentView.addSubview(arrowImgView)
contentView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(54)
make.top.equalTo(21)
make.bottom.equalTo(-31)
}
avarImgView.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 55, height: 55))
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(0)
}
userNameLabel.snp.makeConstraints { make in
make.left.equalTo(avarImgView.snp.right).offset(16)
make.top.equalTo(avarImgView)
make.right.equalTo(arrowImgView.snp.left)
make.height.equalTo(29.0)
}
likeLabel.snp.makeConstraints { make in
make.left.equalTo(userNameLabel)
make.right.equalTo(line1View.snp.left).offset(-12)
make.height.equalTo(17.0)
make.top.equalTo(userNameLabel.snp.bottom).offset(6)
}
likeLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
likeLabel.setContentHuggingPriority(.required, for: .horizontal)
line1View.snp.makeConstraints { make in
make.centerY.equalTo(likeLabel)
make.size.equalTo(CGSize(width: 1, height: 12))
}
collectLabel.snp.makeConstraints { make in
make.left.equalTo(line1View.snp.right).offset(12)
make.right.equalTo(line2View.snp.left).offset(-12)
make.height.equalTo(17.0)
make.top.equalTo(likeLabel)
}
collectLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
collectLabel.setContentHuggingPriority(.required, for: .horizontal)
line2View.snp.makeConstraints { make in
make.centerY.equalTo(likeLabel)
make.size.equalTo(CGSize(width: 1, height: 12))
}
scanLabel.snp.makeConstraints { make in
make.left.equalTo(line2View.snp.right).offset(12)
make.right.equalTo(arrowImgView.snp.left)
make.height.equalTo(17.0)
make.top.equalTo(likeLabel)
}
scanLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(20)
make.centerY.equalToSuperview()
make.right.equalTo(0)
}
update(count: 0, label: likeLabel)
update(count: 0, label: collectLabel)
update(count: 0, label: scanLabel)
}
func update(count: Int, label: UILabel) {
var text = ""
var count = "\(count) "
if label.tag == Self.likeTag {
text = "点赞"
} else if label.tag == Self.collectTag {
text = "收藏"
} else if label.tag == Self.scanTag {
text = "最近浏览"
}
let attrStr = NSMutableAttributedString(string: "")
let countAttrStr = NSAttributedString(
string: count,
attributes: [NSAttributedString.Key.foregroundColor: UIColor.mainTextColor,
NSAttributedString.Key.font: UIFont(name: "DINAlternate-Bold", size: 14)!])
let titleAttrStr = NSAttributedString(
string: text,
attributes: [NSAttributedString.Key.foregroundColor: UIColor.init(hex: 0x435163),
NSAttributedString.Key.font: UIFont.PFSC_R(ofSize: 12)])
attrStr.append(countAttrStr)
attrStr.append(titleAttrStr)
label.attributedText = attrStr
}
@objc func tap(gestureRecognizer:UITapGestureRecognizer) {
if let view = gestureRecognizer.view {
if view.tag == Self.likeTag {
self.likeClick?()
} else if view.tag == Self.collectTag {
self.collectClick?()
} else if view.tag == Self.scanTag {
self.recentScanClick?()
}
}
}
@objc func didAvarImgViewTapped() {
if let avatarClickBlock = avatarClickBlock {
avatarClickBlock()
}
}
@objc func didNickNameTapped() {
if let nickNameClickBlock = nickNameClickBlock {
nickNameClickBlock()
}
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "头部背景图@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "头部背景图@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033197226@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033197226@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033197220@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033197220@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