消息模块——小秘书跳转

This commit is contained in:
fengshuo
2022-04-22 17:56:58 +08:00
parent 2446c58ddc
commit 139590292f
16 changed files with 244 additions and 52 deletions

View File

@@ -404,8 +404,6 @@
E84150C227747BF700A7F548 /* FirstRechargeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C127747BF700A7F548 /* FirstRechargeModel.m */; }; E84150C227747BF700A7F548 /* FirstRechargeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C127747BF700A7F548 /* FirstRechargeModel.m */; };
E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */; }; E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */; };
E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */; }; E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */; };
E84843AF27F59E7E0050D365 /* XPRoomPKResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */; };
E84843B227F5A0740050D365 /* XPRomPKResultTitleLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */; };
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */; }; E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */; };
E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E412727EE0A008818C6 /* XPRoomMessageHeaderView.m */; }; E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E412727EE0A008818C6 /* XPRoomMessageHeaderView.m */; };
E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E452727EF9D008818C6 /* XPRoomMessageParser.m */; }; E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E452727EF9D008818C6 /* XPRoomMessageParser.m */; };
@@ -738,6 +736,7 @@
E8EEB91D26FC9D58007C6EBA /* XPMineUserInfoDateView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8EEB91C26FC9D58007C6EBA /* XPMineUserInfoDateView.m */; }; E8EEB91D26FC9D58007C6EBA /* XPMineUserInfoDateView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8EEB91C26FC9D58007C6EBA /* XPMineUserInfoDateView.m */; };
E8F1558D28124D5200EE8C06 /* MessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F1558C28124D5200EE8C06 /* MessageConentAudioView.m */; }; E8F1558D28124D5200EE8C06 /* MessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F1558C28124D5200EE8C06 /* MessageConentAudioView.m */; };
E8F1559028125E2D00EE8C06 /* MessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F1558F28125E2D00EE8C06 /* MessageAudioCenter.m */; }; E8F1559028125E2D00EE8C06 /* MessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F1558F28125E2D00EE8C06 /* MessageAudioCenter.m */; };
E8F1559328129EBA00EE8C06 /* ContentSecretaryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F1559228129EBA00EE8C06 /* ContentSecretaryModel.m */; };
E8F9168427EC913C00F10D8F /* XPHomeLittleGameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168327EC913C00F10D8F /* XPHomeLittleGameViewController.m */; }; E8F9168427EC913C00F10D8F /* XPHomeLittleGameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168327EC913C00F10D8F /* XPHomeLittleGameViewController.m */; };
E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168627EC927C00F10D8F /* XPHomeLittleGamePesenter.m */; }; E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168627EC927C00F10D8F /* XPHomeLittleGamePesenter.m */; };
E8F9168B27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */; }; E8F9168B27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */; };
@@ -1547,10 +1546,6 @@
E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstRechargeRewardModel.m; sourceTree = "<group>"; }; E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstRechargeRewardModel.m; sourceTree = "<group>"; };
E841ED5F280FB0BD00904808 /* ContentLevelUpgradeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentLevelUpgradeModel.h; sourceTree = "<group>"; }; E841ED5F280FB0BD00904808 /* ContentLevelUpgradeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentLevelUpgradeModel.h; sourceTree = "<group>"; };
E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentLevelUpgradeModel.m; sourceTree = "<group>"; }; E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentLevelUpgradeModel.m; sourceTree = "<group>"; };
E84843AD27F59E7E0050D365 /* XPRoomPKResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKResultView.h; sourceTree = "<group>"; };
E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKResultView.m; sourceTree = "<group>"; };
E84843B027F5A0740050D365 /* XPRomPKResultTitleLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRomPKResultTitleLabel.h; sourceTree = "<group>"; };
E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRomPKResultTitleLabel.m; sourceTree = "<group>"; };
E84B0E3D2727EDF6008818C6 /* XPRoomMessageTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageTableViewCell.h; sourceTree = "<group>"; }; E84B0E3D2727EDF6008818C6 /* XPRoomMessageTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageTableViewCell.h; sourceTree = "<group>"; };
E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageTableViewCell.m; sourceTree = "<group>"; }; E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageTableViewCell.m; sourceTree = "<group>"; };
E84B0E402727EE0A008818C6 /* XPRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageHeaderView.h; sourceTree = "<group>"; }; E84B0E402727EE0A008818C6 /* XPRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageHeaderView.h; sourceTree = "<group>"; };
@@ -2220,6 +2215,8 @@
E8F1558C28124D5200EE8C06 /* MessageConentAudioView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageConentAudioView.m; sourceTree = "<group>"; }; E8F1558C28124D5200EE8C06 /* MessageConentAudioView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageConentAudioView.m; sourceTree = "<group>"; };
E8F1558E28125E2D00EE8C06 /* MessageAudioCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageAudioCenter.h; sourceTree = "<group>"; }; E8F1558E28125E2D00EE8C06 /* MessageAudioCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageAudioCenter.h; sourceTree = "<group>"; };
E8F1558F28125E2D00EE8C06 /* MessageAudioCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageAudioCenter.m; sourceTree = "<group>"; }; E8F1558F28125E2D00EE8C06 /* MessageAudioCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageAudioCenter.m; sourceTree = "<group>"; };
E8F1559128129EBA00EE8C06 /* ContentSecretaryModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentSecretaryModel.h; sourceTree = "<group>"; };
E8F1559228129EBA00EE8C06 /* ContentSecretaryModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentSecretaryModel.m; sourceTree = "<group>"; };
E8F9168227EC913C00F10D8F /* XPHomeLittleGameViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeLittleGameViewController.h; sourceTree = "<group>"; }; E8F9168227EC913C00F10D8F /* XPHomeLittleGameViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeLittleGameViewController.h; sourceTree = "<group>"; };
E8F9168327EC913C00F10D8F /* XPHomeLittleGameViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeLittleGameViewController.m; sourceTree = "<group>"; }; E8F9168327EC913C00F10D8F /* XPHomeLittleGameViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeLittleGameViewController.m; sourceTree = "<group>"; };
E8F9168527EC927C00F10D8F /* XPHomeLittleGamePesenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeLittleGamePesenter.h; sourceTree = "<group>"; }; E8F9168527EC927C00F10D8F /* XPHomeLittleGamePesenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeLittleGamePesenter.h; sourceTree = "<group>"; };
@@ -4282,6 +4279,8 @@
E83ABF02280EC90C00322EE4 /* ContentApplicationShareModel.m */, E83ABF02280EC90C00322EE4 /* ContentApplicationShareModel.m */,
E841ED5F280FB0BD00904808 /* ContentLevelUpgradeModel.h */, E841ED5F280FB0BD00904808 /* ContentLevelUpgradeModel.h */,
E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */, E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */,
E8F1559128129EBA00EE8C06 /* ContentSecretaryModel.h */,
E8F1559228129EBA00EE8C06 /* ContentSecretaryModel.m */,
); );
path = SessionContent; path = SessionContent;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -6402,8 +6401,6 @@
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */, E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */,
E855516128059228005F293F /* XPMineGuildIncomeDetailViewController.m in Sources */, E855516128059228005F293F /* XPMineGuildIncomeDetailViewController.m in Sources */,
E8A1E45B27620F4900B294CA /* XPRoomHalfWebView.m in Sources */, E8A1E45B27620F4900B294CA /* XPRoomHalfWebView.m in Sources */,
9B7D80562753C595003DAC0C /* SendMessageView.m in Sources */,
E8A88D3027E85EEA00CA8837 /* RoomPKInfoModel.m in Sources */,
E8A86E0527BA38DB001C21F9 /* NSString+RW.m in Sources */, E8A86E0527BA38DB001C21F9 /* NSString+RW.m in Sources */,
E800162C2803FE4900D6D17A /* GuildIncomeRecordModel.m in Sources */, E800162C2803FE4900D6D17A /* GuildIncomeRecordModel.m in Sources */,
E83ABF03280EC90C00322EE4 /* ContentApplicationShareModel.m in Sources */, E83ABF03280EC90C00322EE4 /* ContentApplicationShareModel.m in Sources */,
@@ -6702,7 +6699,6 @@
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */, 18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
E8AEAEF927141CA30017FCE0 /* RoomHeaderView.m in Sources */, E8AEAEF927141CA30017FCE0 /* RoomHeaderView.m in Sources */,
9B1B729828002147003FACE9 /* XPMineFansTeamPresenter.m in Sources */, 9B1B729828002147003FACE9 /* XPMineFansTeamPresenter.m in Sources */,
E8A88D2A27E81C8600CA8837 /* XPRoomPKUserCollectionViewCell.m in Sources */,
E8D55CA0281186D6006935A5 /* SessionAudioRecordView.m in Sources */, E8D55CA0281186D6006935A5 /* SessionAudioRecordView.m in Sources */,
9B7B606627BBA0EE0070BB72 /* XPAnchorAttentSendInfo.m in Sources */, 9B7B606627BBA0EE0070BB72 /* XPAnchorAttentSendInfo.m in Sources */,
E81C1B29277069DD0020D1E4 /* XPArrangeMicEmptyTableViewCell.m in Sources */, E81C1B29277069DD0020D1E4 /* XPArrangeMicEmptyTableViewCell.m in Sources */,
@@ -6810,6 +6806,7 @@
9B0997A327F19DE500EB8F14 /* QGHWDShaders.metal in Sources */, 9B0997A327F19DE500EB8F14 /* QGHWDShaders.metal in Sources */,
187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */, 187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */,
E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */, E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */,
E8F1559328129EBA00EE8C06 /* ContentSecretaryModel.m in Sources */,
9BBC02912786FC570007C24B /* XPMineNobleCardTableViewCell.m in Sources */, 9BBC02912786FC570007C24B /* XPMineNobleCardTableViewCell.m in Sources */,
E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */, E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */,
E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */, E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */,

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "message_content_upgrade_charm@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "message_content_upgrade_charm@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "message_content_upgrade_expre@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "message_content_upgrade_expre@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,50 @@
//
// ContentSecretaryModel.h
// xplan-ios
//
// Created by 冯硕 on 2022/4/22.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, SecretaryRouterType) {
///房间
SecretaryRouterType_Room = 1,
///跳转网页
SecretaryRouterType_H5 = 2,
///钱包页
SecretaryRouterType_Purse = 3,
///充值页
SecretaryRouterType_Recharge = 5,
///用户信息
SecretaryRouterType_UserInfo = 6,
///座驾
SecretaryRouterType_Car = 7,
///头饰
SecretaryRouterType_Headwear = 8,
///铭牌
SecretaryRouterType_Nameplate = 9,
///设置密码
SecretaryRouterType_Set_Password = 53,
///贵族中心
SecretaryRouterType_Nobel_Center = 54,
///资料卡装扮
SecretaryRouterType_User_Card = 55,
///贵族气泡
SecretaryRouterType_Nobel_Bubble = 56,
};
@interface ContentSecretaryModel : NSObject
///最近回话列表需要显示的内容 推送的内容
@property (nonatomic,copy) NSString *msg;
///私聊消息需要显示的内容
@property (nonatomic,copy) NSString *title;
///跳转的类型
@property (nonatomic,assign) SecretaryRouterType routerType;
///(转跳当前界面需要传的参)
@property (nonatomic,strong) NSString *routerValue;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// ContentSecretaryModel.m
// xplan-ios
//
// Created by on 2022/4/22.
//
#import "ContentSecretaryModel.h"
@implementation ContentSecretaryModel
@end

View File

@@ -39,7 +39,7 @@
AttachmentModel *attachment = (AttachmentModel *) obj.attachment; AttachmentModel *attachment = (AttachmentModel *) obj.attachment;
if (attachment.first == CustomMessageType_Secretary) { if (attachment.first == CustomMessageType_Secretary) {
if (attachment.second == Custom_Message_Sub_Secretary_Router) { if (attachment.second == Custom_Message_Sub_Secretary_Router) {
text = attachment.data[@"msg"]; text = attachment.data[@"title"];
} }
} else if(attachment.first == CustomMessageType_Gift) { } else if(attachment.first == CustomMessageType_Gift) {
if (attachment.second == Custom_Message_Sub_Gift_Send) { if (attachment.second == Custom_Message_Sub_Gift_Send) {

View File

@@ -113,7 +113,7 @@
- (UILabel *)timeLabel { - (UILabel *)timeLabel {
if (!_timeLabel) { if (!_timeLabel) {
_timeLabel = [[UILabel alloc] init]; _timeLabel = [[UILabel alloc] init];
_timeLabel.font = [UIFont systemFontOfSize:16]; _timeLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_timeLabel.textColor = [ThemeColor mainTextColor]; _timeLabel.textColor = [ThemeColor mainTextColor];
} }
return _timeLabel; return _timeLabel;

View File

@@ -35,7 +35,7 @@
@implementation MessageContentLevelUpgradeView @implementation MessageContentLevelUpgradeView
+ (CGFloat)measureHeight:(NIMMessage *)message { + (CGFloat)measureHeight:(NIMMessage *)message {
return (101 + CONTENT_PADDING_V_TOTAL); return (116 + CONTENT_PADDING_V_TOTAL + MESSAGE_PADDING);
} }
- (void)render:(NIMMessage *)message { - (void)render:(NIMMessage *)message {
@@ -62,13 +62,14 @@
- (void)initSubViewConstraints { - (void)initSubViewConstraints {
[super initSubViewConstraints]; [super initSubViewConstraints];
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) { [self.backView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(220, 101)); make.edges.mas_equalTo(self).insets(UIEdgeInsetsMake(MESSAGE_PADDING, MESSAGE_PADDING, 0, MESSAGE_PADDING));
make.size.mas_equalTo(CGSizeMake(220, 116));
}]; }];
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(50, 50)); make.size.mas_equalTo(CGSizeMake(64,64));
make.left.mas_equalTo(self.backView); make.left.mas_equalTo(self.backView);
make.top.mas_equalTo(self.backView); make.top.mas_equalTo(self.backView);
}]; }];
@@ -76,12 +77,12 @@
[self.levelLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.levelLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.logoImageView.mas_right).offset(10); make.left.mas_equalTo(self.logoImageView.mas_right).offset(10);
make.right.mas_equalTo(self.backView); make.right.mas_equalTo(self.backView);
make.top.mas_equalTo(self.logoImageView); make.top.mas_equalTo(self.logoImageView).offset(10);
}]; }];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) { [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backView); make.left.right.mas_equalTo(self.backView);
make.height.mas_equalTo(1); make.height.mas_equalTo(0.5);
make.top.mas_equalTo(self.logoImageView.mas_bottom).offset(10); make.top.mas_equalTo(self.logoImageView.mas_bottom).offset(10);
}]; }];
@@ -107,7 +108,6 @@
- (UIImageView *)logoImageView { - (UIImageView *)logoImageView {
if (!_logoImageView) { if (!_logoImageView) {
_logoImageView = [[UIImageView alloc] init]; _logoImageView = [[UIImageView alloc] init];
_logoImageView.backgroundColor = [UIColor redColor];
} }
return _logoImageView; return _logoImageView;
} }
@@ -115,7 +115,7 @@
- (UILabel *)levelLabel { - (UILabel *)levelLabel {
if (!_levelLabel) { if (!_levelLabel) {
_levelLabel = [[UILabel alloc] init]; _levelLabel = [[UILabel alloc] init];
_levelLabel.font = [UIFont systemFontOfSize:14]; _levelLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_levelLabel.textColor = [ThemeColor mainTextColor]; _levelLabel.textColor = [ThemeColor mainTextColor];
_levelLabel.numberOfLines = 2; _levelLabel.numberOfLines = 2;
} }
@@ -126,8 +126,8 @@
if (!_checkButton) { if (!_checkButton) {
_checkButton = [UIButton buttonWithType:UIButtonTypeCustom]; _checkButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_checkButton setTitle:@"立即查看" forState:UIControlStateNormal]; [_checkButton setTitle:@"立即查看" forState:UIControlStateNormal];
[_checkButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal]; [_checkButton setTitleColor:UIColorFromRGB(0x4C5AF1) forState:UIControlStateNormal];
_checkButton.titleLabel.font = [UIFont systemFontOfSize:12]; _checkButton.titleLabel.font = [UIFont systemFontOfSize:14];
[_checkButton addTarget:self action:@selector(checkButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [_checkButton addTarget:self action:@selector(checkButtonAction:) forControlEvents:UIControlEventTouchUpInside];
} }
return _checkButton; return _checkButton;

View File

@@ -18,7 +18,6 @@
///View ///View
#import "XPRoomViewController.h" #import "XPRoomViewController.h"
#define MESSAGE_PADDING 10
@interface MessageContentOpenLiveView () @interface MessageContentOpenLiveView ()
/// ///
@@ -33,7 +32,7 @@
@implementation MessageContentOpenLiveView @implementation MessageContentOpenLiveView
+ (CGFloat)measureHeight:(NIMMessage *)message { + (CGFloat)measureHeight:(NIMMessage *)message {
return (50 + CONTENT_PADDING_V_TOTAL); return (50 + CONTENT_PADDING_V_TOTAL + MESSAGE_PADDING * 2);
} }
- (void)render:(NIMMessage *)message { - (void)render:(NIMMessage *)message {
@@ -73,7 +72,7 @@
[super initSubViewConstraints]; [super initSubViewConstraints];
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) { [self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self).insets(UIEdgeInsetsMake(MESSAGE_PADDING, MESSAGE_PADDING, MESSAGE_PADDING, MESSAGE_PADDING)); make.edges.mas_equalTo(self).insets(UIEdgeInsetsMake(MESSAGE_PADDING, MESSAGE_PADDING, MESSAGE_PADDING, MESSAGE_PADDING));
make.size.mas_equalTo(CGSizeMake(180, 50)); make.size.mas_equalTo(CGSizeMake(200, 50));
}]; }];
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -6,30 +6,33 @@
// //
#import "MessageContentTextClickable.h" #import "MessageContentTextClickable.h"
#import "ThemeColor.h" ///Third
#import "AttachmentModel.h"
#import "XPWebViewController.h"
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h>
#define MESSAGE_TEXT_PADDING 10 ///Tool
#import "ThemeColor.h"
#import "NSObject+MJExtension.h"
#import "XCCurrentVCStackManager.h"
///Model
#import "AttachmentModel.h"
#import "ContentSecretaryModel.h"
///View
#import "XPRoomViewController.h"
#import "XPWebViewController.h"
#import "XPMineRechargeViewController.h"
#import "XPMineUserInfoViewController.h"
#import "XPMineDressUpViewController.h"
#import "XPNobleCenterViewController.h"
///P
#import "RoomHostDelegate.h"
@interface MessageContentTextClickable() @interface MessageContentTextClickable()
/** /**
*/ */
@property (nonatomic, strong) UILabel * messageText; @property (nonatomic, strong) UILabel * messageText;
///
/** @property (nonatomic,strong) ContentSecretaryModel *contentInfo;
*/
@property (nonatomic, assign) int type;
@property (nonatomic, strong) NSString * value;
@end @end
@implementation MessageContentTextClickable @implementation MessageContentTextClickable
@@ -49,11 +52,11 @@
messageText = @"未知消息类型"; messageText = @"未知消息类型";
} }
CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_TEXT_PADDING * 2, MAXFLOAT); CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_PADDING * 2, MAXFLOAT);
CGFloat msgHeight = [messageText boundingRectWithSize:dstRect options:NSStringDrawingUsesLineFragmentOrigin attributes:[MessageContentTextClickable messageTextAttibutes] context:nil].size.height; CGFloat msgHeight = [messageText boundingRectWithSize:dstRect options:NSStringDrawingUsesLineFragmentOrigin attributes:[MessageContentTextClickable messageTextAttibutes] context:nil].size.height;
return msgHeight + MESSAGE_TEXT_PADDING * 2 + CONTENT_PADDING_V_TOTAL; return msgHeight + MESSAGE_PADDING * 2 + CONTENT_PADDING_V_TOTAL;
} }
+ (NSDictionary<NSAttributedStringKey, id> *)messageTextAttibutes { + (NSDictionary<NSAttributedStringKey, id> *)messageTextAttibutes {
@@ -87,9 +90,8 @@
AttachmentModel *attachment = (AttachmentModel *) obj.attachment; AttachmentModel *attachment = (AttachmentModel *) obj.attachment;
if (attachment.first == CustomMessageType_Secretary) { if (attachment.first == CustomMessageType_Secretary) {
if (attachment.second == Custom_Message_Sub_Secretary_Router) { if (attachment.second == Custom_Message_Sub_Secretary_Router) {
messageText = attachment.data[@"msg"]; self.contentInfo = [ContentSecretaryModel modelWithJSON:attachment.data];
self.type = [attachment.data[@"routerType"] intValue]; messageText = self.contentInfo.msg;
self.value = attachment.data[@"routerValue"];
} }
} }
} }
@@ -101,16 +103,95 @@
} }
- (void)event:(UITapGestureRecognizer *)gesture { - (void)event:(UITapGestureRecognizer *)gesture {
switch (self.type) { SecretaryRouterType type = self.contentInfo.routerType;
case Custom_Message_Router_H5: { NSString * value = self.contentInfo.routerValue;
if (self.value) { switch (type) {
case SecretaryRouterType_H5: {
if (value.length) {
XPWebViewController * webVC =[[XPWebViewController alloc] init]; XPWebViewController * webVC =[[XPWebViewController alloc] init];
webVC.url = self.value; webVC.url = value;
[self.nim_viewController.navigationController pushViewController:webVC animated:YES]; [self.nim_viewController.navigationController pushViewController:webVC animated:YES];
} }
} }
break; break;
case SecretaryRouterType_Room:
{
if (value.length > 0) {
UIViewController * controllerView = [XCCurrentVCStackManager shareManager].getCurrentVC;
//退 TODO
[controllerView.navigationController.viewControllers enumerateObjectsUsingBlock:^(__kindof UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj isKindOfClass:[XPRoomViewController class]]) {
[controllerView.navigationController popToRootViewControllerAnimated:NO];
XPRoomViewController<RoomHostDelegate> * rooomVC = obj;
[rooomVC exitRoom];
*stop = YES;
}
}];
[XPRoomViewController openRoom:value viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
}
}
break;
case SecretaryRouterType_Purse:
case SecretaryRouterType_Recharge:
{
XPMineRechargeViewController * rechargeVC = [[XPMineRechargeViewController alloc] init];
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:rechargeVC animated:YES];
}
break;
case SecretaryRouterType_UserInfo:
{
if (value.length > 0) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = value.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}
}
case SecretaryRouterType_Car:
{
XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init];
dressUpVC.currentIndex = 1;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:dressUpVC animated:YES];
}
break;
case SecretaryRouterType_Headwear:
{
XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init];
dressUpVC.currentIndex = 0;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:dressUpVC animated:YES];
}
break;
case SecretaryRouterType_Nameplate:
{
XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init];
dressUpVC.currentIndex = 2;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:dressUpVC animated:YES];
}
break;
case SecretaryRouterType_Nobel_Bubble:
{
XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init];
dressUpVC.currentIndex = 4;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:dressUpVC animated:YES];
}
break;
case SecretaryRouterType_User_Card:
{
XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init];
dressUpVC.currentIndex = 3;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:dressUpVC animated:YES];
}
break;
case SecretaryRouterType_Nobel_Center:
{
XPNobleCenterViewController * nobelCenterVC = [[XPNobleCenterViewController alloc] init];
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:nobelCenterVC animated:YES];
}
break;
case SecretaryRouterType_Set_Password:
{
}
break;
default: default:
break; break;
} }
@@ -119,7 +200,7 @@
- (UILabel *)messageText { - (UILabel *)messageText {
if (!_messageText) { if (!_messageText) {
_messageText = [[UILabel alloc]initWithFrame:CGRectZero]; _messageText = [[UILabel alloc]initWithFrame:CGRectZero];
_messageText.preferredMaxLayoutWidth = CONTENT_WIDTH_MAX - MESSAGE_TEXT_PADDING * 2; _messageText.preferredMaxLayoutWidth = CONTENT_WIDTH_MAX - MESSAGE_PADDING * 2;
_messageText.textColor = ThemeColor.mainTextColor; _messageText.textColor = ThemeColor.mainTextColor;
_messageText.numberOfLines = 0; _messageText.numberOfLines = 0;
} }

View File

@@ -10,6 +10,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface XPMineDressUpViewController : BaseViewController @interface XPMineDressUpViewController : BaseViewController
///当前的index @[@"头饰", @"座驾", @"铭牌", @"资料卡", @"聊天气泡"]
@property (nonatomic,assign) NSInteger currentIndex;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -153,6 +153,12 @@
} }
#pragma mark - Getters And Setters #pragma mark - Getters And Setters
- (void)setCurrentIndex:(NSInteger)currentIndex {
if (currentIndex < self.titles.count) {
[self.titleView setDefaultSelectedIndex:currentIndex];
}
}
- (JXCategoryTitleView *)titleView { - (JXCategoryTitleView *)titleView {
if (!_titleView) { if (!_titleView) {
_titleView = [[JXCategoryTitleView alloc] init]; _titleView = [[JXCategoryTitleView alloc] init];