Commit 445973ae authored by Steven杜宇's avatar Steven杜宇

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

parents 1dd75869 26ab1ad5
......@@ -46,13 +46,28 @@
[super fillWithData:data];
self.customData = data;
if (![data.title isKindOfClass:[NSNull class]] && data.title != nil) {
self.titleLabel.text = data.title;
} else {
self.titleLabel.text = @""; // 或者空字符串 @""
}
if (![data.desc isKindOfClass:[NSNull class]] && data.desc != nil) {
self.descLabel.text = data.desc;
} else {
self.descLabel.text = @""; // 或者空字符串 @""
}
if (![data.price isKindOfClass:[NSNull class]] && data.price != nil) {
self.priceLabel.text = data.price;
if (data.imageUrl == nil) {
} else {
self.priceLabel.text = @""; // 或者空字符串 @""
}
if (data.imageUrl == nil || [data.imageUrl isKindOfClass:[NSNull class]]) {
[self.iconView setImage:TUIChatBundleThemeImage(@"chat_custom_order_message_img", @"message_custom_order")];
} else {
[self.iconView setImage:[UIImage sd_imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:data.imageUrl]]]];
[self.iconView sd_setImageWithURL:[NSURL URLWithString:data.imageUrl]];
//[self.iconView setImage:[UIImage sd_imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:data.imageUrl]]]];
}
// tell constraints they need updating
[self setNeedsUpdateConstraints];
......
......@@ -47,7 +47,7 @@
@interface TUIBaseChatViewController : UIViewController
// 文件预览代理
@property(nonatomic, weak) id<TUICustomOpenFileDelegate> filePreviewDelegate;
@property(nonatomic, weak) id<TUIYHCustomCellClickDelegate> yhCustomCellClickDelegate;
@property(nonatomic, strong) TUIChatConversationModel *conversationData;
......
......@@ -41,6 +41,7 @@
#import "TUIVoiceMessageCellData.h"
#import "TUIChatShortcutMenuView.h"
#import "TUIFileViewController.h"
#import "TUIOrderCellData.h"
static UIView *gCustomTopView;
static UIView *gTopExentsionView;
......@@ -59,7 +60,7 @@ static CGRect gCustomTopViewRect;
TUINavigationControllerDelegate,
TUIChatMediaDataListener,
TIMInputViewMoreActionProtocol,
TUICustomOpenFileDelegate>
TUIYHCustomCellClickDelegate>
@property(nonatomic, strong) TUINaviBarIndicatorView *titleView;
@property(nonatomic, strong) TUIMessageMultiChooseView *multiChooseView;
......@@ -332,7 +333,7 @@ static CGRect gCustomTopViewRect;
vc.isMsgNeedReadReceipt = self.conversationData.msgNeedReadReceipt && [TUIChatConfig defaultConfig].msgNeedReadReceipt;
_messageController = vc;
_messageController.delegate = self;
_messageController.filePreviewDelegate = self;
_messageController.yhCustomCellClickDelegate = self;
[_messageController setConversation:self.conversationData];
CGFloat textViewHeight = TUIChatConfig.defaultConfig.enableMainPageInputBar? TTextView_Height:0;
......@@ -1558,10 +1559,10 @@ static CGRect gCustomTopViewRect;
return self.responseKeyboard;
}
#pragma mark - TUICustomOpenFileDelegate
#pragma mark - TUIYHCustomCellClickDelegate
- (void)didTapInFileCell:(TUIFileMessageCellData *)cellData {
if (self.filePreviewDelegate && [self.filePreviewDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.filePreviewDelegate didTapInFileCell: cellData];
if (self.yhCustomCellClickDelegate && [self.yhCustomCellClickDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.yhCustomCellClickDelegate didTapInFileCell: cellData];
} else {
TUIFileViewController *file = [[TUIFileViewController alloc] init];
file.data = cellData;
......@@ -1569,4 +1570,12 @@ static CGRect gCustomTopViewRect;
}
}
- (void)didTapCustomOrderCell:(TUIOrderCellData *)cellData {
if (self.yhCustomCellClickDelegate && [self.yhCustomCellClickDelegate respondsToSelector:@selector(didTapCustomOrderCell:)]) {
[self.yhCustomCellClickDelegate didTapCustomOrderCell: cellData];
} else {
[TUITool openLinkWithURL:[NSURL URLWithString:cellData.link]];
}
}
@end
......@@ -16,7 +16,7 @@
#import "TUIBaseMessageControllerDelegate.h"
#import "TUIChatConversationModel.h"
#import "TUIChatDefine.h"
#import "TUICustomOpenFileDelegate.h"
#import "TUIYHCustomCellClickDelegate.h"
NS_ASSUME_NONNULL_BEGIN
......@@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, weak) id<TUIBaseMessageControllerDelegate> delegate;
@property(nonatomic, weak) id<TUICustomOpenFileDelegate> filePreviewDelegate;
@property(nonatomic, weak) id<TUIYHCustomCellClickDelegate> yhCustomCellClickDelegate;
@property(nonatomic, assign) BOOL isInVC;
......
......@@ -1532,7 +1532,7 @@ ReceiveReadMsgWithGroupID:(NSString *)groupID
self.hasCoverPage = YES;
TUIRepliesDetailViewController *repliesDetailVC = [[TUIRepliesDetailViewController alloc] initWithCellData:data conversationData:self.conversationData];
repliesDetailVC.delegate = self.delegate;
repliesDetailVC.filePreviewDelegate = self.filePreviewDelegate;
repliesDetailVC.yhCustomCellClickDelegate = self.yhCustomCellClickDelegate;
[self.navigationController pushViewController:repliesDetailVC animated:YES];
repliesDetailVC.parentPageDataProvider = self.messageDataProvider;
__weak typeof(self) weakSelf = self;
......@@ -1856,8 +1856,8 @@ ReceiveReadMsgWithGroupID:(NSString *)groupID
[fileData downloadFile];
return;
}
if (self.filePreviewDelegate && [self.filePreviewDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.filePreviewDelegate didTapInFileCell: [cell fileData]];
if (self.yhCustomCellClickDelegate && [self.yhCustomCellClickDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.yhCustomCellClickDelegate didTapInFileCell: [cell fileData]];
} else {
TUIFileViewController *file = [[TUIFileViewController alloc] init];
file.data = [cell fileData];
......@@ -1871,7 +1871,7 @@ ReceiveReadMsgWithGroupID:(NSString *)groupID
mergeVc.mergerElem = cell.mergeData.mergerElem;
mergeVc.conversationData = self.conversationData;
mergeVc.parentPageDataProvider = self.messageDataProvider;
mergeVc.filePreviewDelegate = self.filePreviewDelegate;
mergeVc.yhCustomCellClickDelegate = self.yhCustomCellClickDelegate;
__weak typeof(self) weakSelf = self;
mergeVc.willCloseCallback = ^() {
[weakSelf.tableView reloadData];
......@@ -1887,10 +1887,14 @@ ReceiveReadMsgWithGroupID:(NSString *)groupID
}
- (void)showOrderMessage:(TUIOrderCell *)cell {
if (self.yhCustomCellClickDelegate && [self.yhCustomCellClickDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.yhCustomCellClickDelegate didTapCustomOrderCell: cell.customData];
} else {
TUIOrderCellData *cellData = cell.customData;
if (cellData.link) {
[TUITool openLinkWithURL:[NSURL URLWithString:cellData.link]];
}
}
}
- (void)showReplyMessage:(TUIReplyMessageCell *)cell {
......
......@@ -11,7 +11,7 @@
#import "TUIBaseMessageControllerDelegate.h"
#import "TUIChatConversationModel.h"
#import "TUIMessageDataProvider.h"
#import "TUICustomOpenFileDelegate.h"
#import "TUIYHCustomCellClickDelegate.h"
NS_ASSUME_NONNULL_BEGIN
......@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, copy) dispatch_block_t willCloseCallback;
@property(nonatomic, strong) TUIChatConversationModel *conversationData;
@property(nonatomic, strong) TUIMessageDataProvider *parentPageDataProvider;
@property(nonatomic, weak) id<TUICustomOpenFileDelegate> filePreviewDelegate;
@property(nonatomic, weak) id<TUIYHCustomCellClickDelegate> yhCustomCellClickDelegate;
@end
......
......@@ -475,8 +475,8 @@
}
- (void)showFileMessage:(TUIFileMessageCell *)cell {
if (self.filePreviewDelegate && [self.filePreviewDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.filePreviewDelegate didTapInFileCell: [cell fileData]];
if (self.yhCustomCellClickDelegate && [self.yhCustomCellClickDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.yhCustomCellClickDelegate didTapInFileCell: [cell fileData]];
} else {
TUIFileViewController *file = [[TUIFileViewController alloc] init];
file.data = [cell fileData];
......
......@@ -11,7 +11,7 @@
#import "TUIBaseMessageControllerDelegate.h"
#import "TUIChatConversationModel.h"
#import "TUIInputController.h"
#import "TUICustomOpenFileDelegate.h"
#import "TUIYHCustomCellClickDelegate.h"
@class TUIMessageDataProvider;
......@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, copy) dispatch_block_t willCloseCallback;
@property(nonatomic, strong) TUIInputController *inputController;
@property(nonatomic, strong) TUIMessageDataProvider *parentPageDataProvider;
@property(nonatomic, weak) id<TUICustomOpenFileDelegate> filePreviewDelegate;
@property(nonatomic, weak) id<TUIYHCustomCellClickDelegate> yhCustomCellClickDelegate;
@end
......
......@@ -646,8 +646,8 @@
}
- (void)showFileMessage:(TUIFileMessageCell *)cell {
if (self.filePreviewDelegate && [self.filePreviewDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.filePreviewDelegate didTapInFileCell: [cell fileData]];
if (self.yhCustomCellClickDelegate && [self.yhCustomCellClickDelegate respondsToSelector:@selector(didTapInFileCell:)]) {
[self.yhCustomCellClickDelegate didTapInFileCell: [cell fileData]];
} else {
TUIFileViewController *file = [[TUIFileViewController alloc] init];
file.data = [cell fileData];
......
//
// TUICustomOpenFileDelegate.h
// TUIYHCustomCellClickDelegate.h
// Pods
//
// Created by alexzzw on 2025/5/20.
......@@ -9,16 +9,17 @@
@import ImSDK_Plus;
@class TUIFileMessageCellData;
@class TUIOrderCellData;
NS_ASSUME_NONNULL_BEGIN
/////////////////////////////////////////////////////////////////////////////////
//
// TUICustomOpenFileDelegate
// TUIYHCustomCellClickDelegate
//
/////////////////////////////////////////////////////////////////////////////////
@protocol TUICustomOpenFileDelegate <NSObject>
@protocol TUIYHCustomCellClickDelegate <NSObject>
/**
* Callback for clicking file cell
......@@ -28,6 +29,14 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)didTapInFileCell:(TUIFileMessageCellData *)cellData;
/**
* Callback for clicking Custom cell
* You can use this callback to: preview file inside the app
*
* @param cellData include local file data
*/
- (void)didTapCustomOrderCell:(TUIOrderCellData *)cellData;
@end
NS_ASSUME_NONNULL_END
......
......@@ -47,10 +47,12 @@ platform :ios do
webFix = "develop_bugfix_web"
kjzf = "kjzf"
develop_fix_adopter = "develop_fix_adopter"
txim_add_card = "txim_add_card"
dev_1013 = "dev_1013"
#打包正使用的分支
myPack_branch = develop_fix_adopter
myPack_branch = dev_1013
# 打adhoc包 执行命令 fastlane galaxyTest
......
......@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 70;
objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
......@@ -1258,6 +1258,12 @@
04B30B7B2E86307C004E4B12 /* YHNameCardHomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B30B7A2E86307C004E4B12 /* YHNameCardHomePageViewController.swift */; };
04D4EC312E839C1000B0329B /* YHCircleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC302E839C1000B0329B /* YHCircleViewController.swift */; };
04D4EC332E839C2B00B0329B /* YHResourceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC322E839C2B00B0329B /* YHResourceViewController.swift */; };
04D4EC442E83D0D500B0329B /* YHCircleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC432E83D0D500B0329B /* YHCircleViewModel.swift */; };
04D4EC462E83D11500B0329B /* YHCircleCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC452E83D11500B0329B /* YHCircleCollectionViewCell.swift */; };
04D4EC482E83D17500B0329B /* YHCircleListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC472E83D17500B0329B /* YHCircleListModel.swift */; };
04D4EC4A2E83D21000B0329B /* YHCirclePublishViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC492E83D21000B0329B /* YHCirclePublishViewController.swift */; };
04D4EC4C2E83D27200B0329B /* YHCircleDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC4B2E83D27200B0329B /* YHCircleDetailViewController.swift */; };
04D4EC4E2E84F22500B0329B /* YHCircleHeaderReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D4EC4D2E84F22500B0329B /* YHCircleHeaderReusableView.swift */; };
04D6405A2E84DF07000162AF /* YHConnectListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D640592E84DF07000162AF /* YHConnectListViewController.swift */; };
04D6405E2E84E3B4000162AF /* YHConnectListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D6405D2E84E3B4000162AF /* YHConnectListCell.swift */; };
04D8FF552D9258AA00703C75 /* YHPlanScoreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D8FF542D9258AA00703C75 /* YHPlanScoreView.swift */; };
......@@ -2605,6 +2611,12 @@
04B30B7A2E86307C004E4B12 /* YHNameCardHomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNameCardHomePageViewController.swift; sourceTree = "<group>"; };
04D4EC302E839C1000B0329B /* YHCircleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleViewController.swift; sourceTree = "<group>"; };
04D4EC322E839C2B00B0329B /* YHResourceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResourceViewController.swift; sourceTree = "<group>"; };
04D4EC432E83D0D500B0329B /* YHCircleViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleViewModel.swift; sourceTree = "<group>"; };
04D4EC452E83D11500B0329B /* YHCircleCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleCollectionViewCell.swift; sourceTree = "<group>"; };
04D4EC472E83D17500B0329B /* YHCircleListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleListModel.swift; sourceTree = "<group>"; };
04D4EC492E83D21000B0329B /* YHCirclePublishViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCirclePublishViewController.swift; sourceTree = "<group>"; };
04D4EC4B2E83D27200B0329B /* YHCircleDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleDetailViewController.swift; sourceTree = "<group>"; };
04D4EC4D2E84F22500B0329B /* YHCircleHeaderReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleHeaderReusableView.swift; sourceTree = "<group>"; };
04D640592E84DF07000162AF /* YHConnectListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConnectListViewController.swift; sourceTree = "<group>"; };
04D6405D2E84E3B4000162AF /* YHConnectListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConnectListCell.swift; sourceTree = "<group>"; };
04D8FF542D9258AA00703C75 /* YHPlanScoreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPlanScoreView.swift; sourceTree = "<group>"; };
......@@ -2659,7 +2671,7 @@
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
043F0ED92E02A60C003354EB /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
043F0ED92E02A60C003354EB /* Exceptions for "yinheReplayExt" folder in "yinheReplayExt" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
......@@ -2669,7 +2681,18 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
043F0ECD2E02A60C003354EB /* yinheReplayExt */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (043F0ED92E02A60C003354EB /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = yinheReplayExt; sourceTree = "<group>"; };
043F0ECD2E02A60C003354EB /* yinheReplayExt */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
043F0ED92E02A60C003354EB /* Exceptions for "yinheReplayExt" folder in "yinheReplayExt" target */,
);
explicitFileTypes = {
};
explicitFolders = (
);
path = yinheReplayExt;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -6931,6 +6954,8 @@
isa = PBXGroup;
children = (
04D4EC302E839C1000B0329B /* YHCircleViewController.swift */,
04D4EC492E83D21000B0329B /* YHCirclePublishViewController.swift */,
04D4EC4B2E83D27200B0329B /* YHCircleDetailViewController.swift */,
);
path = C;
sourceTree = "<group>";
......@@ -6938,6 +6963,7 @@
04D4EC292E839B3000B0329B /* M */ = {
isa = PBXGroup;
children = (
04D4EC472E83D17500B0329B /* YHCircleListModel.swift */,
);
path = M;
sourceTree = "<group>";
......@@ -6945,6 +6971,8 @@
04D4EC2A2E839B3000B0329B /* V */ = {
isa = PBXGroup;
children = (
04D4EC4D2E84F22500B0329B /* YHCircleHeaderReusableView.swift */,
04D4EC452E83D11500B0329B /* YHCircleCollectionViewCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -6952,6 +6980,7 @@
04D4EC2B2E839B3000B0329B /* VM */ = {
isa = PBXGroup;
children = (
04D4EC432E83D0D500B0329B /* YHCircleViewModel.swift */,
);
path = VM;
sourceTree = "<group>";
......@@ -7395,14 +7424,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks.sh\"\n";
......@@ -7416,14 +7441,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources.sh\"\n";
......@@ -7507,6 +7528,7 @@
045C0FA62D12CA5F00BD2DC0 /* YHApproverInfoVerifyCell.swift in Sources */,
045C0FA72D12CA5F00BD2DC0 /* YHVisaRenewalTroubleshootingGuideVC.swift in Sources */,
045C0FA82D12CA5F00BD2DC0 /* YHPrincipleProfileListCell.swift in Sources */,
04D4EC462E83D11500B0329B /* YHCircleCollectionViewCell.swift in Sources */,
045C0FA92D12CA5F00BD2DC0 /* YHAdopterIncomeFileTableViewCell.swift in Sources */,
045C0FAA2D12CA5F00BD2DC0 /* YHAdopterMainTableViewCell.swift in Sources */,
045C0FAB2D12CA5F00BD2DC0 /* YHWorkResponsibilitiesTableViewCell.swift in Sources */,
......@@ -7751,6 +7773,7 @@
045C10802D12CA5F00BD2DC0 /* YHWorkExperiencePositionReasonTableViewCell.swift in Sources */,
045C10812D12CA5F00BD2DC0 /* YHServiceOrderListViewController.swift in Sources */,
04AE200F2D12CFAF00891D24 /* YHGCMineSchemeViewController.swift in Sources */,
04D4EC442E83D0D500B0329B /* YHCircleViewModel.swift in Sources */,
04AE20102D12CFAF00891D24 /* YHGCApplicationTypeController.swift in Sources */,
048D6ADD2D5EF0A900BC6F4C /* YHMemberCenterHeaderView.swift in Sources */,
04AE20112D12CFAF00891D24 /* YHGCApplicationTypeResultController.swift in Sources */,
......@@ -7978,6 +8001,7 @@
04AE20502D19425900891D24 /* YHGCCertificateListVC.swift in Sources */,
043671432D66DDB500E8D9BA /* YHMemberCenterInfo.swift in Sources */,
045C113D2D12CA5F00BD2DC0 /* YHMyFileListCell.swift in Sources */,
04D4EC482E83D17500B0329B /* YHCircleListModel.swift in Sources */,
045C113E2D12CA5F00BD2DC0 /* YHLookResignResultModel.swift in Sources */,
045C113F2D12CA5F00BD2DC0 /* YHIncomeTypeSelectCell.swift in Sources */,
045C11402D12CA5F00BD2DC0 /* YHWorkHighlightsTableViewCell.swift in Sources */,
......@@ -8124,6 +8148,7 @@
045C11B42D12CA5F00BD2DC0 /* YHComprehensiveEvaluationCell.swift in Sources */,
045C11B52D12CA5F00BD2DC0 /* YHAdopterOtherCardTableViewCell.swift in Sources */,
045C11B62D12CA5F00BD2DC0 /* YHSaveAndSubmitView.swift in Sources */,
04D4EC4A2E83D21000B0329B /* YHCirclePublishViewController.swift in Sources */,
045C11B72D12CA5F00BD2DC0 /* YHFileListItemView.swift in Sources */,
045C11B82D12CA5F00BD2DC0 /* YHCertificateSearchViewController.swift in Sources */,
045C11B92D12CA5F00BD2DC0 /* YHScoreTitleView.swift in Sources */,
......@@ -8250,6 +8275,7 @@
045C12202D12CA5F00BD2DC0 /* YHResignMaterialListVC.swift in Sources */,
045C12212D12CA5F00BD2DC0 /* YHResignUploadTravelPassportTableViewCell.swift in Sources */,
04F1924D2DE0125B004BDAAC /* YHNewsModel.swift in Sources */,
04D4EC4C2E83D27200B0329B /* YHCircleDetailViewController.swift in Sources */,
045C12222D12CA5F00BD2DC0 /* YHResignCertificatePassportTableViewCell.swift in Sources */,
045C12232D12CA5F00BD2DC0 /* YHIncomeRecordItemCell.swift in Sources */,
045C12242D12CA5F00BD2DC0 /* YHAdopterResidentViewController.swift in Sources */,
......@@ -8299,6 +8325,7 @@
045C12442D12CA5F00BD2DC0 /* YHWebModel.swift in Sources */,
045C12452D12CA5F00BD2DC0 /* YHHUDErrorView.swift in Sources */,
04B00FBF2D9A420F00F640C5 /* YHMakePlanSelectAlertView.swift in Sources */,
04D4EC4E2E84F22500B0329B /* YHCircleHeaderReusableView.swift in Sources */,
04B00FC02D9A420F00F640C5 /* YHMakePlanBottomView.swift in Sources */,
04B00FC12D9A420F00F640C5 /* YHMakePlanCell.swift in Sources */,
04B00FC22D9A420F00F640C5 /* YHMakePlanCardView.swift in Sources */,
......@@ -8780,7 +8807,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8792,7 +8819,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8810,7 +8837,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8822,7 +8849,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8840,7 +8867,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8852,7 +8879,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8870,7 +8897,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8882,7 +8909,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8959,7 +8986,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -8987,7 +9014,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9108,7 +9135,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9136,7 +9163,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9319,7 +9346,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9347,7 +9374,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9370,7 +9397,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9398,7 +9425,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......
......@@ -21,7 +21,14 @@ class YHNavigationController: UINavigationController {
override func popViewController(animated: Bool) -> UIViewController? {
printLog("popViewController")
return super.popViewController(animated: animated)
let popedVC = super.popViewController(animated: animated)
if let lastVC = viewControllers.last { // 回到腾讯TUI页面,显示NavigationBar
let className = String(describing: type(of: lastVC))
if className.hasPrefix("TUI") {
super.setNavigationBarHidden(false, animated: false)
}
}
return popedVC
}
override func setNavigationBarHidden(_ hidden: Bool, animated: Bool) {
......@@ -31,8 +38,15 @@ class YHNavigationController: UINavigationController {
// }
if let lastVC = viewControllers.last {
let className = String(describing: type(of: lastVC))
if !className.hasPrefix("TUI") { // 模糊匹配类名
super.setNavigationBarHidden(hidden, animated: animated)
if !className.hasPrefix("TUI") { // 模糊匹配类名,使得腾讯IM页面不用隐藏NavigationBar
var needAnimated = false
let lastSecondCount = viewControllers.count - 2
if lastSecondCount >= 0 {
let lastSecondVC = viewControllers[lastSecondCount]
let lastSecondVCClassName = String(describing: type(of: lastSecondVC))
needAnimated = lastSecondVCClassName.hasPrefix("TUI") // 当从TUI页面跳到普通页面需要缓慢隐藏,免得出现黑条
}
super.setNavigationBarHidden(hidden, animated: needAnimated)
}
}
}
......
//
// YHCircleDetailViewController.swift
// galaxy
//
// Created by alexzzw on 2025/9/24.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCircleDetailViewController: YHBaseViewController {
var circleModel: YHCircleListModel?
var block: ((YHCircleListModel) -> Void)?
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
title = "动态详情"
let label = UILabel()
label.text = "详情页面"
label.textAlignment = .center
label.textColor = .gray
view.addSubview(label)
label.snp.makeConstraints { make in
make.center.equalToSuperview()
}
}
}
//
// YHCirclePublishViewController.swift
// galaxy
//
// Created by alexzzw on 2025/9/24.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCirclePublishViewController: YHBaseViewController {
var completion: (() -> Void)?
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
gk_navigationBar.isHidden = true
title = "发布动态"
navigationItem.leftBarButtonItem = UIBarButtonItem(
title: "取消",
style: .plain,
target: self,
action: #selector(cancelButtonTapped)
)
navigationItem.rightBarButtonItem = UIBarButtonItem(
title: "发布",
style: .done,
target: self,
action: #selector(publishButtonTapped)
)
let label = UILabel()
label.text = "发布页面"
label.textAlignment = .center
label.textColor = .gray
view.addSubview(label)
label.snp.makeConstraints { make in
make.center.equalToSuperview()
}
}
@objc private func cancelButtonTapped() {
dismiss(animated: true)
}
@objc private func publishButtonTapped() {
completion?()
dismiss(animated: true)
}
}
......@@ -7,17 +7,340 @@
//
import UIKit
import ESPullToRefresh
import JXSegmentedView
class YHCircleViewController: YHBaseViewController {
/*
// MARK: - Navigation
lazy var viewModel: YHCircleViewModel = {
let viewModel = YHCircleViewModel()
return viewModel
}()
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
lazy var circleCollectView: UICollectionView = {
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
flowLayout.headerHeight = 112
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectionView.backgroundColor = .white
// collectionView.register(YHCircleCollectionViewCell.self, forCellWithReuseIdentifier: YHCircleCollectionViewCell.cellReuseIdentifier)
collectionView.register(YHHomeCollectionViewCell.self, forCellWithReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier)
collectionView.register(YHCircleHeaderReusableView.self, forSupplementaryViewOfKind: CollectionViewWaterfallElementKindSectionHeader, withReuseIdentifier: YHCircleHeaderReusableView.reuseIdentifier)
collectionView.delegate = self
collectionView.dataSource = self
collectionView.translatesAutoresizingMaskIntoConstraints = false
collectionView.alwaysBounceVertical = true
collectionView.showsHorizontalScrollIndicator = false
collectionView.showsVerticalScrollIndicator = false
return collectionView
}()
lazy var publishButton: UIButton = {
let btn = UIButton(type: .custom)
btn.backgroundColor = UIColor.brandGrayColor8
btn.setImage(UIImage(named: "circle_publish_icon"), for: .normal)
btn.setTitle("发布动态", for: .normal)
btn.setTitleColor(UIColor.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 15)
btn.layer.cornerRadius = 22
btn.addTarget(self, action: #selector(publishButtonClicked), for: .touchUpInside)
return btn
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
addDefaultData()
getData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if viewModel.arrCircleData?.isEmpty == true {
getData()
}
}
deinit {
NotificationCenter.default.removeObserver(self)
}
}
// MARK: - 私有方法
private extension YHCircleViewController {
func setupUI() {
gk_navigationBar.isHidden = true
view.addSubview(circleCollectView)
view.addSubview(publishButton)
circleCollectView.snp.makeConstraints { make in
make.top.left.right.bottom.equalToSuperview()
}
publishButton.snp.makeConstraints { make in
make.width.equalTo(134)
make.height.equalTo(44)
make.centerX.equalToSuperview()
make.bottom.equalTo(view.safeAreaLayoutGuide).offset(-30)
}
publishButton.iconInLeft(spacing: 6)
circleCollectView.es.addYHPullToRefresh {
self.getData()
}
circleCollectView.es.addInfiniteScrolling {
self.loadMoreData()
}
circleCollectView.es.stopPullToRefresh()
circleCollectView.es.stopLoadingMore()
}
func addDefaultData() {
getCacheDataForCircleData()
}
func getCacheDataForCircleData() {
let arrString = UserDefaults.standard.value(forKey: "circleFirstPageData")
if let tmp = arrString as? String, let dic = tmp.toArray() {
guard let result = [YHCircleListModel].deserialize(from: dic) else {
return
}
if let arrData = result as? [YHHomeListModel] {
for item in arrData {
item.calHeightParam()
}
self.viewModel.arrCircleData = arrData
self.circleCollectView.reloadData()
}
}
}
func getData() {
loadFirstData()
}
func loadFirstData() {
DispatchQueue.global().async {
self.viewModel.getCircleList(firstFlag: true) { [weak self] _, _ in
guard let self = self else { return }
if let arrData = self.viewModel.arrCircleData, arrData.count > 0 {
let arrString = arrData.toJSONString()
UserDefaults.standard.set(arrString, forKey: "circleFirstPageData")
UserDefaults.standard.synchronize()
}
DispatchQueue.main.async {
self.circleCollectView.es.stopPullToRefresh()
if self.viewModel.hasMoreForCircle == false {
self.circleCollectView.es.noticeNoMoreData()
self.circleCollectView.footer?.alpha = 1
}
self.circleCollectView.reloadData()
}
}
}
}
func loadMoreData() {
DispatchQueue.global().async {
self.viewModel.getCircleList(firstFlag: false) { [weak self] _, _ in
guard let self = self else { return }
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.35, execute: {
CATransaction.setDisableActions(true)
self.circleCollectView.reloadData()
CATransaction.commit()
self.circleCollectView.es.stopLoadingMore()
if self.viewModel.hasMoreForCircle == false {
self.circleCollectView.es.noticeNoMoreData()
self.circleCollectView.footer?.alpha = 1
}
})
}
}
}
@objc func publishButtonClicked() {
if !YHLoginManager.shared.isLogin() {
YHOneKeyLoginManager.shared.oneKeyLogin()
return
}
let publishVC = YHCirclePublishViewController()
publishVC.completion = { [weak self] in
self?.getData()
}
let nav = YHNavigationController(rootViewController: publishVC)
nav.modalPresentationStyle = .fullScreen
present(nav, animated: true)
}
*/
// MARK: - 头部按钮处理方法
func handleHeaderButtonTap(at index: Int) {
switch index {
case 0: // 找客户
handleFindCustomerAction()
case 1: // 找服务
handleFindServiceAction()
case 2: // 拓人脉
handleExpandNetworkAction()
case 3: // 办活动
handleOrganizeEventAction()
default:
break
}
}
private func handleFindCustomerAction() {
print("找客户按钮被点击")
// TODO: 跳转到找客户页面
// let findCustomerVC = YHFindCustomerViewController()
// navigationController?.pushViewController(findCustomerVC, animated: true)
}
private func handleFindServiceAction() {
print("找服务按钮被点击")
// TODO: 跳转到找服务页面
// let findServiceVC = YHFindServiceViewController()
// navigationController?.pushViewController(findServiceVC, animated: true)
}
private func handleExpandNetworkAction() {
print("拓人脉按钮被点击")
// TODO: 跳转到拓人脉页面
// let expandNetworkVC = YHExpandNetworkViewController()
// navigationController?.pushViewController(expandNetworkVC, animated: true)
}
private func handleOrganizeEventAction() {
print("办活动按钮被点击")
// TODO: 跳转到办活动页面
// let organizeEventVC = YHOrganizeEventViewController()
// navigationController?.pushViewController(organizeEventVC, animated: true)
}
}
// MARK: - UICollectionViewDelegate, UICollectionViewDataSource
extension YHCircleViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.viewModel.arrCircleData?.count ?? 0
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
guard let datas = self.viewModel.arrCircleData, datas.count > indexPath.row else {
return UICollectionViewCell()
}
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier, for: indexPath) as? YHHomeCollectionViewCell else {
return UICollectionViewCell()
}
cell.listModel = datas[indexPath.row]
// cell.clickHeartEvent = { [weak self] item in
// self?.viewModel.toggleLike(postId: item.id) { success, _ in
// if success {
// DispatchQueue.main.async {
// self?.circleCollectView.reloadItems(at: [indexPath])
// }
// }
// }
// }
return cell
}
// MARK: - Header View
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
if kind == CollectionViewWaterfallElementKindSectionHeader, let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: YHCircleHeaderReusableView.reuseIdentifier, for: indexPath) as? YHCircleHeaderReusableView {
headerView.delegate = self
return headerView
}
return UICollectionReusableView()
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let model = self.viewModel.arrCircleData?[indexPath.row] else { return }
let detailVC = YHCircleDetailViewController()
// detailVC.circleModel = model
// detailVC.block = { item in
// if let arr = self.viewModel.arrCircleData {
// for (index, targetItem) in arr.enumerated() {
// if targetItem.id == item.id {
// targetItem.is_like = item.is_like
// targetItem.like_count = item.like_count
// self.circleCollectView.reloadItems(at: [IndexPath(item: index, section: 0)])
// }
// }
// }
// }
self.navigationController?.pushViewController(detailVC, animated: true)
}
}
// MARK: - CollectionViewWaterfallLayoutDelegate
extension YHCircleViewController: CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
let count = self.viewModel.arrCircleData?.count ?? 0
if indexPath.row < count {
guard let model = self.viewModel.arrCircleData?[indexPath.row] else { return CGSize.zero }
return CGSize(width: model.img_width_cell, height: model.img_height_cell)
}
let width = (KScreenWidth - 47) / 2
return CGSize(width: width, height: 200.0)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
return CGSize(width: collectionView.bounds.width, height: 110)
}
}
// MARK: - UIScrollViewDelegate
extension YHCircleViewController {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let itemNumber = viewModel.preloadItemIndex
let section = 0
let itemIndex = itemNumber - 1
let indexPathToCheck = IndexPath(item: itemIndex, section: section)
if circleCollectView.indexPathsForVisibleItems.contains(indexPathToCheck) {
loadMoreData()
}
}
}
// MARK: - JXSegmentedListContainerViewListDelegate
extension YHCircleViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
// MARK: - YHCircleHeaderButtonsViewDelegate
extension YHCircleViewController: YHCircleHeaderButtonsViewDelegate {
func headerButtonsView(_ view: YHCircleHeaderButtonsView, didTapButtonAt index: Int) {
handleHeaderButtonTap(at: index)
}
}
//
// YHCircleListModel.swift
// galaxy
//
// Created by alexzzw on 2025/9/24.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import SmartCodable
// MARK: - 数据模型
class YHCircleListModel: SmartCodable {
required init() {}
var id: String = ""
var user_id: String = ""
var user_name: String = ""
var user_avatar: String = ""
var content: String = ""
var images: [String] = []
var like_count: Int = 0
var comment_count: Int = 0
var is_like: Bool = false
var create_time: String = ""
var location: String = ""
var type: Int = 1
var img_width_cell: CGFloat = 0
var img_height_cell: CGFloat = 0
func calHeightParam() {
let screenWidth = KScreenWidth
let cellWidth = (screenWidth - 47) / 2
var totalHeight: CGFloat = 60 + 20 + 44
if !content.isEmpty {
let font = UIFont.systemFont(ofSize: 14)
let maxSize = CGSize(width: cellWidth - 24, height: CGFloat.greatestFiniteMagnitude)
let textRect = content.boundingRect(
with: maxSize,
options: [.usesLineFragmentOrigin, .usesFontLeading],
attributes: [.font: font],
context: nil
)
totalHeight += ceil(textRect.height) + 12
}
if !images.isEmpty {
let imageHeight: CGFloat = 120
totalHeight += imageHeight + 12
}
self.img_width_cell = cellWidth
self.img_height_cell = max(totalHeight, 180)
}
}
//
// YHCircleViewModel.swift
// galaxy
//
// Created by alexzzw on 2025/9/24.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCircleViewModel: NSObject {
}
//
// YHCircleCollectionViewCell.swift
// galaxy
//
// Created by alexzzw on 2025/9/24.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
// MARK: - Cell实现
class YHCircleCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHCircleCollectionViewCell"
var likeBlock: ((YHCircleListModel) -> Void)?
var listModel: YHCircleListModel? {
didSet {
updateUI()
}
}
private lazy var containerView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 8
view.layer.shadowColor = UIColor.black.cgColor
view.layer.shadowOffset = CGSize(width: 0, height: 2)
view.layer.shadowRadius = 4
view.layer.shadowOpacity = 0.1
return view
}()
private lazy var avatarImageView: UIImageView = {
let iv = UIImageView()
iv.layer.cornerRadius = 15
iv.clipsToBounds = true
iv.contentMode = .scaleAspectFill
iv.backgroundColor = UIColor(hex: 0xF5F5F5)
return iv
}()
private lazy var nameLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 13)
label.textColor = UIColor.mainTextColor
return label
}()
private lazy var timeLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 11)
label.textColor = UIColor.yhGreyColor
return label
}()
private lazy var contentLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
return label
}()
private lazy var imageView: UIImageView = {
let iv = UIImageView()
iv.contentMode = .scaleAspectFill
iv.clipsToBounds = true
iv.layer.cornerRadius = 6
iv.backgroundColor = UIColor(hex: 0xF5F5F5)
return iv
}()
private lazy var likeButton: UIButton = {
let btn = UIButton(type: .custom)
btn.setImage(UIImage(named: "home_like_normal"), for: .normal)
btn.setImage(UIImage(named: "home_like_selected"), for: .selected)
btn.addTarget(self, action: #selector(likeButtonClicked), for: .touchUpInside)
return btn
}()
private lazy var likeCountLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 11)
label.textColor = UIColor.yhGreyColor
return label
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func setupUI() {
contentView.addSubview(containerView)
containerView.addSubview(avatarImageView)
containerView.addSubview(nameLabel)
containerView.addSubview(timeLabel)
containerView.addSubview(contentLabel)
containerView.addSubview(imageView)
containerView.addSubview(likeButton)
containerView.addSubview(likeCountLabel)
containerView.snp.makeConstraints { make in
make.edges.equalToSuperview().inset(4)
}
avatarImageView.snp.makeConstraints { make in
make.left.top.equalToSuperview().offset(10)
make.width.height.equalTo(30)
}
nameLabel.snp.makeConstraints { make in
make.left.equalTo(avatarImageView.snp.right).offset(8)
make.top.equalTo(avatarImageView)
make.right.equalToSuperview().offset(-10)
}
timeLabel.snp.makeConstraints { make in
make.left.equalTo(nameLabel)
make.bottom.equalTo(avatarImageView)
}
contentLabel.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(10)
make.top.equalTo(avatarImageView.snp.bottom).offset(8)
}
imageView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(10)
make.top.equalTo(contentLabel.snp.bottom).offset(8)
make.height.equalTo(100)
}
likeButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10)
make.bottom.equalToSuperview().offset(-10)
make.width.height.equalTo(16)
}
likeCountLabel.snp.makeConstraints { make in
make.left.equalTo(likeButton.snp.right).offset(4)
make.centerY.equalTo(likeButton)
}
}
private func updateUI() {
guard let model = listModel else { return }
nameLabel.text = model.user_name
timeLabel.text = model.create_time
contentLabel.text = model.content
// 设置头像
// avatarImageView.yh_setImage(with: model.user_avatar)
// 设置图片
if !model.images.isEmpty {
imageView.isHidden = false
// imageView.yh_setImage(with: model.images.first)
} else {
imageView.isHidden = true
}
// 设置点赞状态
likeButton.isSelected = model.is_like
likeCountLabel.text = model.like_count > 0 ? "\(model.like_count)" : ""
likeCountLabel.textColor = model.is_like ? UIColor.brandMainColor : UIColor.yhGreyColor
}
@objc private func likeButtonClicked() {
guard let model = listModel else { return }
likeBlock?(model)
}
}
//
// YHCircleHeaderButtonsView.swift
// galaxy
//
// Created by alexzzw on 2025/9/24.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHeaderButtonItemView: UIControl {
private lazy var iconView: UIImageView = {
let imageView = UIImageView()
return imageView
}()
private lazy var contentLabel: UILabel = {
let label = UILabel()
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = UIColor.brandGrayColor8
return label
}()
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor.brandGrayColor1
addSubview(iconView)
addSubview(contentLabel)
contentLabel.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-14)
make.left.right.equalToSuperview()
}
iconView.snp.makeConstraints { make in
make.bottom.equalTo(contentLabel.snp.top).offset(-6)
make.width.height.equalTo(24)
make.centerX.equalToSuperview()
}
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setup(text: String, iconString: String) {
contentLabel.text = text
iconView.image = UIImage(named: iconString)
}
}
// 按钮点击回调协议
protocol YHCircleHeaderButtonsViewDelegate: AnyObject {
func headerButtonsView(_ view: YHCircleHeaderButtonsView, didTapButtonAt index: Int)
}
class YHCircleHeaderButtonsView: UIView {
weak var delegate: YHCircleHeaderButtonsViewDelegate?
// 按钮数据模型
private let buttonData: [(title: String, imageName: String)] = [
("找客户", "icon_find_customer"),
("找服务", "icon_find_service"),
("拓人脉", "icon_expand_network"),
("办活动", "icon_organize_event")
]
// 按钮数组
private var buttons: [UIControl] = []
// 容器栈视图
private lazy var stackView: UIStackView = {
let stack = UIStackView()
stack.axis = .horizontal
stack.distribution = .fillEqually
stack.alignment = .fill
stack.spacing = 10
stack.translatesAutoresizingMaskIntoConstraints = false
return stack
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
setupUI()
}
private func setupUI() {
backgroundColor = .white
addSubview(stackView)
// 设置约束
stackView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(20)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-20)
}
// 创建按钮
createButtons()
}
private func createButtons() {
for (index, data) in buttonData.enumerated() {
let button = createButton(title: data.title, imageName: data.imageName, tag: index)
buttons.append(button)
stackView.addArrangedSubview(button)
}
}
private func createButton(title: String, imageName: String, tag: Int) -> UIControl {
let button = YHHeaderButtonItemView()
button.setup(text: title, iconString: imageName)
button.tag = tag
// 添加点击事件
button.addTarget(self, action: #selector(buttonTapped(_:)), for: .touchUpInside)
return button
}
@objc private func buttonTapped(_ sender: UIControl) {
// 调用代理方法
delegate?.headerButtonsView(self, didTapButtonAt: sender.tag)
}
}
// MARK: - UICollectionReusableView 版本(用于 CollectionView Header)
class YHCircleHeaderReusableView: UICollectionReusableView {
static let reuseIdentifier = "YHCircleHeaderReusableView"
weak var delegate: YHCircleHeaderButtonsViewDelegate?
private lazy var headerButtonsView: YHCircleHeaderButtonsView = {
let view = YHCircleHeaderButtonsView()
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
setupUI()
}
private func setupUI() {
backgroundColor = .white
addSubview(headerButtonsView)
headerButtonsView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
headerButtonsView.delegate = self
}
}
// MARK: - YHCircleHeaderButtonsViewDelegate
extension YHCircleHeaderReusableView: YHCircleHeaderButtonsViewDelegate {
func headerButtonsView(_ view: YHCircleHeaderButtonsView, didTapButtonAt index: Int) {
delegate?.headerButtonsView(view, didTapButtonAt: index)
}
}
//
// YHCircleViewModel.swift
// galaxy
//
// Created by alexzzw on 2025/9/24.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
// MARK: - ViewModel
class YHCircleViewModel {
var arrCircleData: [YHHomeListModel]? = []
var hasMoreForCircle = true
var preloadItemIndex = 10
private var currentPage = 1
func getCircleList(firstFlag: Bool, completion: @escaping (Bool, String?) -> Void) {
if firstFlag {
currentPage = 1
arrCircleData?.removeAll()
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
let mockData = self.generateMockCircleData(page: self.currentPage)
if firstFlag {
self.arrCircleData = mockData
} else {
self.arrCircleData?.append(contentsOf: mockData)
}
self.arrCircleData?.forEach { $0.calHeightParam() }
self.currentPage += 1
self.hasMoreForCircle = self.currentPage <= 5
completion(true, nil)
}
}
func toggleLike(postId: Int, completion: @escaping (Bool, String?) -> Void) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
if let index = self.arrCircleData?.firstIndex(where: { $0.id == postId }) {
let item = self.arrCircleData![index]
item.is_like.toggle()
item.like_count += item.is_like ? 1 : -1
completion(true, nil)
} else {
completion(false, "动态不存在")
}
}
}
private func generateMockCircleData(page: Int) -> [YHHomeListModel] {
let contents = [
"今天天气真不错,出来走走心情都变好了!",
"分享一下最近读的这本书,非常推荐给大家",
"周末和朋友们一起聚餐,开心~",
"工作虽然忙碌,但还是要保持积极的心态",
"旅行中遇到的美景,忍不住分享给大家",
"学习新技能的路上,每天都有新收获",
"美食当前,减肥明天再说吧"
]
let names = ["张小明", "李小红", "王小强", "赵小美", "孙小华", "周小军", "吴小芳"]
let locations = ["北京·朝阳区", "上海·浦东新区", "深圳·南山区", "杭州·西湖区", "成都·锦江区", ""]
return (0..<8).map { i in
let model = YHHomeListModel()
model.id = i
model.img_url = "https://picsum.photos/60/60?random=\(i)"
model.content = contents[i % contents.count]
model.like_count = Int.random(in: 0...99)
model.is_like = Bool.random()
return model
}
}
}
......@@ -14,6 +14,7 @@ import Lottie
class YHHomeCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHHomeCollectionViewCell"
var clickHeartEvent: (() -> Void)?
lazy var viewModel: YHHomeWebViewModel = {
let viewModel = YHHomeWebViewModel()
......@@ -238,6 +239,10 @@ extension YHHomeCollectionViewCell {
@objc func clickHeart() {
guard let listModel = listModel else { return }
if let clickHeartEvent = clickHeartEvent {
clickHeartEvent()
return
}
if YHLoginManager.shared.isLogin() {
if listModel.is_like == false {
......
......@@ -101,7 +101,7 @@ private extension YHPayMemberContentItem {
}
extension YHPayMemberContentItem {
func updateUI(title: String = "", detail: String = "", oneLine: Bool = true, showBtn: Bool = false) {
func updateUI(title: String = "", detail: String = "", oneLine: Bool = true, showBtn: Bool = false, needBold: Bool = false) {
urlPdf = detail
......@@ -112,6 +112,9 @@ extension YHPayMemberContentItem {
addSubview(titleLabel)
addSubview(detailLabel)
addSubview(fakeView)
titleLabel.font = needBold ? UIFont.PFSC_B(ofSize: 13) : UIFont.PFSC_R(ofSize: 13)
detailLabel.font = needBold ? UIFont.PFSC_B(ofSize: 13) : UIFont.PFSC_R(ofSize: 13)
titleLabel.text = title
let arr = detail.split(separator: "/")
if arr.count > 0 {
......
......@@ -72,7 +72,7 @@ extension YHPayMemberContentItems {
make.top.equalTo(kMargin)
make.left.right.equalToSuperview()
}
item.updateUI(title: "档案号:", detail: model.file_num, showBtn: true)
item.updateUI(title: "档案号:", detail: model.file_num, showBtn: true, needBold: true)
var lastView: UIView = item
......
......@@ -11,7 +11,7 @@ import UIKit
class YHVisaPaymentTipsCell: UITableViewCell {
static let cellReuseIdentifier = "YHVisaPaymentTipsCell"
static let cellH: CGFloat = 218.0 * (KScreenWidth - 16 * 2) / 343.0
static let cellH: CGFloat = 236.0 * (KScreenWidth - 16 * 2) / 343.0
lazy var whiteContentView: UIView = {
let view = UIView()
......
......@@ -122,7 +122,7 @@ extension YHHKVisaRenewalApplicationVC {
return
}
self.copyToPasteBoard(person.file_num, message: "已复制临时档案号")
}))
}, true))
// let dateString = self.getShortDate(person.birthday)
paymentMembers.append(.subInfo("申请人出生日期:", "\(person.birthday)", nil))
paymentMembers.append(.subInfo("缴费金额:", "\(person.fee_money)", nil, .bottom))
......@@ -287,9 +287,9 @@ extension YHHKVisaRenewalApplicationVC: UITableViewDelegate, UITableViewDataSour
cell.setupCellInfo(title: title)
return cell
}
case let .subInfo(title, detail, actionTitle, cellType, defaultMargin, showBottomLine, action):
case let .subInfo(title, detail, actionTitle, cellType, defaultMargin, showBottomLine, action, needBold):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHVisaRenewalPayInfoCell.cellReuseIdentifier) as? YHVisaRenewalPayInfoCell {
cell.setupCellInfo(title: title, detail: detail, rightButtonTitle: actionTitle, cellType: cellType, defaultMargin: defaultMargin, showBottomLine: showBottomLine)
cell.setupCellInfo(title: title, detail: detail, rightButtonTitle: actionTitle, cellType: cellType, defaultMargin: defaultMargin, showBottomLine: showBottomLine, needBold: needBold)
cell.rightButtonEvent = {
action?()
}
......
......@@ -285,7 +285,7 @@ extension YHHKVisaRenewalPaymentVC {
return
}
self.copyToPasteBoard(person.file_num, message: "已复制档案号")
}))
}, true))
paymentMembers.append(.subInfo("可缴费时间段:", "\(person.min_pay_time) - \(person.max_pay_time)", nil))
if person.fee_money.count > 0 {
paymentMembers.append(.subInfo("缴费金额:", "\(person.fee_money)", nil))
......@@ -306,7 +306,7 @@ extension YHHKVisaRenewalPaymentVC {
return
}
self.copyToPasteBoard(person.file_num, message: "已复制档案号")
}))
}, true))
if person.fee_money.count > 0 {
paymentMembers.append(.subInfo("缴费金额:", "\(person.fee_money)", nil))
......@@ -329,7 +329,7 @@ extension YHHKVisaRenewalPaymentVC {
return
}
self.copyToPasteBoard(person.file_num, message: "已复制档案号")
}))
}, true))
paymentMembers.append(.subInfo("可缴费时间段:", "\(person.min_pay_time) - \(person.max_pay_time)", nil))
if person.fee_money.count > 0 {
paymentMembers.append(.subInfo("缴费金额:", "\(person.fee_money)", nil))
......@@ -351,7 +351,7 @@ extension YHHKVisaRenewalPaymentVC {
paymentMembers.append(.occupyingSpace)
}
sections.append(confirmingPresenceSection)
let payMethodTips: ASAttributedString = .init(string: "提示:", .foreground(UIColor.yhOrangeColor)) + .init(string: "请先到下方“缴费成员”处") + .init(string: "复制档案号", .foreground(UIColor.yhOrangeColor)) + .init(string: "再缴费")
let payMethodTips: ASAttributedString = .init(string: "提示:", .foreground(UIColor.failColor)) + .init(string: "请先到下方“缴费成员”处", .foreground(UIColor.failColor)) + .init(string: "复制档案号", .foreground(UIColor.failColor)) + .init(string: "再缴费", .foreground(UIColor.failColor))
let webPageUrl = paymentListModel.payment_url
if webPageUrl.count > 0, URL(string: webPageUrl) != nil {
let payMethodSection: [YHVisaRenewalItemDetailType] = [.sectionHeader("港府官网缴费方式", "缴费遇到问题?", { [weak self] in
......@@ -545,9 +545,9 @@ extension YHHKVisaRenewalPaymentVC: UITableViewDelegate, UITableViewDataSource {
cell.setupCellInfo(title: title, status: status)
return cell
}
case let .subInfo(title, detail, actionTitle, cellType, defaultMargin, showBottomLine, action):
case let .subInfo(title, detail, actionTitle, cellType, defaultMargin, showBottomLine, action, needBold):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHVisaRenewalPayInfoCell.cellReuseIdentifier) as? YHVisaRenewalPayInfoCell {
cell.setupCellInfo(title: title, detail: detail, rightButtonTitle: actionTitle, cellType: cellType, defaultMargin: defaultMargin, showBottomLine: showBottomLine)
cell.setupCellInfo(title: title, detail: detail, rightButtonTitle: actionTitle, cellType: cellType, defaultMargin: defaultMargin, showBottomLine: showBottomLine, needBold: needBold)
cell.rightButtonEvent = {
action?()
}
......
......@@ -16,7 +16,7 @@ enum YHVisaRenewalItemDetailType {
case payMethodUrl(_ title: String, _ tips: String, _ url: String, _ action: (() -> Void)? = nil)
case payMethodQrcode(_ title: String, _ tips: String, _ qrcodeUrl: String)
case subHeader(_ title: String, _ status: YHVisaRenewalPaymentStatus)
case subInfo(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ defaultMargin: CGFloat? = nil, _ showBottomLine: Bool = false, _ action: (() -> Void)? = nil)
case subInfo(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ defaultMargin: CGFloat? = nil, _ showBottomLine: Bool = false, _ action: (() -> Void)? = nil, _ needBold: Bool = false)
case subContent(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ action: (() -> Void)? = nil)
case subRemark(_ remark: String)
case occupyingSpace
......@@ -27,7 +27,7 @@ enum YHVisaRenewalInfoItemDetailType {
case payMethodUrl(_ title: String, _ tips: String, _ url: String, _ action: (() -> Void)? = nil)
case payMethodQrcode(_ title: String, _ tips: String, _ qrcodeUrl: String)
case subHeader(_ title: String)
case subInfo(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ defaultMargin: CGFloat? = nil, _ showBottomLine: Bool = false, _ action: (() -> Void)? = nil)
case subInfo(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ defaultMargin: CGFloat? = nil, _ showBottomLine: Bool = false, _ action: (() -> Void)? = nil, _ needBold: Bool = false)
case subContent(_ title: String, _ detail: String, _ actionTitle: String? = nil, _ cellType: YHResignRoundCellType = .mid, _ action: (() -> Void)? = nil)
case occupyingSpace
}
......@@ -55,11 +55,13 @@ class YHVisaRenewalPayInfoCell: YHVisaRenewalPayInfoBaseCell {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String, rightButtonTitle: String? = nil, cellType: YHResignRoundCellType = .mid, defaultMargin: CGFloat? = nil, showBottomLine: Bool = false) {
func setupCellInfo(title: String, detail: String, rightButtonTitle: String? = nil, cellType: YHResignRoundCellType = .mid, defaultMargin: CGFloat? = nil, showBottomLine: Bool = false, needBold: Bool = false) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
updateInnerCellCorner(cellType)
bottomLineView.isHidden = !showBottomLine
infoTitleLabel.font = needBold ? .PFSC_B(ofSize: 13) : .PFSC_R(ofSize: 13)
infoDetailLabel.font = needBold ? .PFSC_B(ofSize: 13) : .PFSC_R(ofSize: 13)
var bottomMargin: CGFloat = cellType == .bottom ? 16 : 0
if let defaultMargin = defaultMargin {
......
......@@ -12,6 +12,7 @@ import TUIConversation
import TUIChat
import IQKeyboardManagerSwift
import GKNavigationBarSwift
import SafariServices
class YHMessageListVC: YHBaseViewController {
private let messageListManager = YHTUIMessageListManager.shared
......@@ -502,7 +503,7 @@ extension YHMessageListVC {
if let vc = vc as? TUIBaseChatViewController {
vc.navigationItem.rightBarButtonItem = nil
vc.navigationItem.rightBarButtonItems = nil
vc.filePreviewDelegate = self
vc.yhCustomCellClickDelegate = self
}
}
......@@ -585,7 +586,7 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
if let vc = vc as? TUIBaseChatViewController {
vc.navigationItem.rightBarButtonItem = nil
vc.navigationItem.rightBarButtonItems = nil
vc.filePreviewDelegate = self
vc.yhCustomCellClickDelegate = self
}
return
......@@ -721,7 +722,7 @@ extension YHMessageListVC: YHMessageListDelegate {
}
}
extension YHMessageListVC: TUICustomOpenFileDelegate {
extension YHMessageListVC: TUIYHCustomCellClickDelegate {
func didTap(inFileCell cellData: TUIFileMessageCellData) {
var isExist: ObjCBool = false
let path = cellData.getFilePath(&isExist)
......@@ -732,4 +733,66 @@ extension YHMessageListVC: TUICustomOpenFileDelegate {
cellData.downloadFile()
}
}
func didTapCustomOrderCell(_ cellData: TUIOrderCellData) {
let linkAddress = cellData.link ?? ""
guard linkAddress.count > 0, linkAddress.isValidHttpUrl || linkAddress.isValidHttpsUrl || linkAddress.isValidFileUrl, let url = URL(string: linkAddress) else {
handelMessageType(linkAddress)
return
}
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen
UIViewController.current?.present(safariViewController, animated: true, completion: nil)
}
private func handelMessageType(_ content: String?) {
if let dicData = content, dicData.count > 0, let data = dicData.data(using: .utf8) {
do {
if let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
// 转换成功,jsonObject 是一个字典
printLog("JSON字符串转换为字典成功: \(jsonObject)")
/*
"{\"order_id\":151824,\"type\":27}"
*/
if !jsonObject.isEmpty {
let msgType: String = jsonObject["msg_type"] as? String ?? ""
let navH5Url: String = jsonObject["nav_h5_url"] as? String ?? ""
let orderID: Int = jsonObject["order_id"] as? Int ?? -1
let type: Int = jsonObject["type"] as? Int ?? -1
let batchId: Int = jsonObject["batch_id"] as? Int ?? 0
if msgType == "card_msg", navH5Url.count > 0 {
let title = jsonObject["title"] as? String ?? ""
var url = ""
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
if navH5Url.contains("?") {
url = navH5Url + "&param=" + token
} else {
url = navH5Url + "?param=" + token
}
} else {
url = navH5Url
}
let vc = YHH5WebViewVC()
vc.isFullScreenFlag = false
vc.navTitle = title
vc.url = url
UIViewController.current?.navigationController?.pushViewController(vc)
} else if orderID > -1, type > -1 {
YHServiceOrderListViewController.jumpToMessageController(type: type, orderId: orderID, batchId)
}
} else {
printLog("ddddd")
}
} else {
printLog("JSON字符串不是有效的字典格式")
}
} catch {
printLog("JSON解析错误: \(error)")
}
}
}
}
......@@ -68,7 +68,9 @@ class YHAboutGalaxyViewController: YHBaseViewController {
label.lineBreakMode = .byTruncatingTail
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineSpacing = 5.0 // 设置行间距
let attributedString = NSMutableAttributedString(string: "专注海外服务17年,总部设立在深圳,现已分别在北京、上海、广州等地建立分公司,立足于香港身份规划服务,业务逐步多元化发展。".local)
let currentYear = Calendar.current.component(.year, from: Date())
let yearsOfService = currentYear - 2007
let attributedString = NSMutableAttributedString(string: "专注海外服务\(yearsOfService)年,总部设立在深圳,现已分别在北京、上海、广州等地建立分公司,立足于香港身份规划服务,业务逐步多元化发展。".local)
attributedString.addAttribute(.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attributedString.length))
label.attributedText = attributedString
return label
......
......@@ -168,7 +168,7 @@ class YHMemberCenterViewController: YHBaseViewController, UIGestureRecognizerDel
if isNeedLoading, let index = YHMembershipLevel.allCases.firstIndex(where: { data in
data.rawValue == memberCenterInfo.currentLevel
}) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.75) {
self.headerView.bannerView.scrollToItem(at: index, animated: false)
self.switchCard(YHMembershipLevel.allCases[index])
}
......
......@@ -342,6 +342,9 @@ extension YHShareManager {
components.iosBundleId = Bundle.main.bundleIdentifier
components.androidDeepLink = linkUrl // 安卓平台调用不过 所以需要单独写出来
components.androidPackageName = "com.galaxy.galaxyandroid"
components.harmonyOSDeepLink = linkUrl
components.harmonyOSFallbackUrl = YhConstant.DeepLink.fallbackLoadPage
components.harmonyOSPackageName = "com.galaxy.hklife"
let url = components.buildLongLink()
return url.absoluteString
......@@ -373,6 +376,9 @@ extension YHShareManager {
components.iosBundleId = Bundle.main.bundleIdentifier
components.androidDeepLink = linkUrl // 安卓平台调用不过 所以需要单独写出来
components.androidPackageName = "com.galaxy.galaxyandroid"
components.harmonyOSDeepLink = linkUrl
components.harmonyOSFallbackUrl = YhConstant.DeepLink.fallbackLoadPage
components.harmonyOSPackageName = "com.galaxy.hklife"
components.buildShortLink { shortLink, error in
callBack(shortLink?.url.absoluteString, error)
}
......
......@@ -226,6 +226,7 @@ extension YhConstant {
static let urlPreUrlFix = "https://yinheapp.drcn.agconnect.link"
static let url = "yinheapp://hkdiy-h5.galaxy-immi.com/galaxyapp"
static let compareUrl = "yinheapp://hkdiy-h5.galaxy-immi.com/galaxyapp?type="
static let fallbackLoadPage = "https://hkdiy-h5.galaxy-immi.com/superApp/loadPage"
}
......
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "circle_publish_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "circle_publish_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_expand_network@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_expand_network@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_find_customer@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_find_customer@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_find_service@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_find_service@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_organize_event@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_organize_event@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "签证缴费温馨提示@2x.png",
"filename" : "切图@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "签证缴费温馨提示@3x.png",
"filename" : "切图@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
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