我的装扮-气泡,公屏消息增加气泡字段

This commit is contained in:
chenguilong
2022-03-19 00:44:11 +08:00
committed by fengshuo
parent b2eb18b3c8
commit e92c37c5eb
18 changed files with 353 additions and 8 deletions

View File

@@ -119,6 +119,8 @@
9B16A34827E17D9B00E13A98 /* XPRoomTrumpetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B16A34727E17D9B00E13A98 /* XPRoomTrumpetViewController.m */; }; 9B16A34827E17D9B00E13A98 /* XPRoomTrumpetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B16A34727E17D9B00E13A98 /* XPRoomTrumpetViewController.m */; };
9B16A34B27E1915A00E13A98 /* XPTrumpetPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */; }; 9B16A34B27E1915A00E13A98 /* XPTrumpetPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */; };
9B17F71827BD150600440843 /* SVGAParserManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B17F71727BD150600440843 /* SVGAParserManager.m */; }; 9B17F71827BD150600440843 /* SVGAParserManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B17F71727BD150600440843 /* SVGAParserManager.m */; };
9B1FC3D527E49A5D006EFFE0 /* ChatBubbleModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1FC3D427E49A5D006EFFE0 /* ChatBubbleModel.m */; };
9B1FC3D827E49C36006EFFE0 /* XPMineDressBubbleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1FC3D727E49C36006EFFE0 /* XPMineDressBubbleTableViewCell.m */; };
9B208A362779B50100F9E54A /* GiftNobleInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */; }; 9B208A362779B50100F9E54A /* GiftNobleInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */; };
9B2489BC27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2489BB27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.m */; }; 9B2489BC27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2489BB27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.m */; };
9B2A12D52783EEC700CED41B /* XPNobleCenterTableHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12D42783EEC700CED41B /* XPNobleCenterTableHeadView.m */; }; 9B2A12D52783EEC700CED41B /* XPNobleCenterTableHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12D42783EEC700CED41B /* XPNobleCenterTableHeadView.m */; };
@@ -776,6 +778,10 @@
9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTrumpetPresenter.m; sourceTree = "<group>"; }; 9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTrumpetPresenter.m; sourceTree = "<group>"; };
9B17F71627BD150600440843 /* SVGAParserManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAParserManager.h; sourceTree = "<group>"; }; 9B17F71627BD150600440843 /* SVGAParserManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAParserManager.h; sourceTree = "<group>"; };
9B17F71727BD150600440843 /* SVGAParserManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAParserManager.m; sourceTree = "<group>"; }; 9B17F71727BD150600440843 /* SVGAParserManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAParserManager.m; sourceTree = "<group>"; };
9B1FC3D327E49A5D006EFFE0 /* ChatBubbleModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChatBubbleModel.h; sourceTree = "<group>"; };
9B1FC3D427E49A5D006EFFE0 /* ChatBubbleModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatBubbleModel.m; sourceTree = "<group>"; };
9B1FC3D627E49C36006EFFE0 /* XPMineDressBubbleTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineDressBubbleTableViewCell.h; sourceTree = "<group>"; };
9B1FC3D727E49C36006EFFE0 /* XPMineDressBubbleTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineDressBubbleTableViewCell.m; sourceTree = "<group>"; };
9B208A342779B50100F9E54A /* GiftNobleInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftNobleInfoModel.h; sourceTree = "<group>"; }; 9B208A342779B50100F9E54A /* GiftNobleInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftNobleInfoModel.h; sourceTree = "<group>"; };
9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftNobleInfoModel.m; sourceTree = "<group>"; }; 9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftNobleInfoModel.m; sourceTree = "<group>"; };
9B2489BA27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVisitorEmptyTableViewCell.h; sourceTree = "<group>"; }; 9B2489BA27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVisitorEmptyTableViewCell.h; sourceTree = "<group>"; };
@@ -3219,6 +3225,8 @@
E82D5C75276AEB5100858D6D /* NameplateModel.m */, E82D5C75276AEB5100858D6D /* NameplateModel.m */,
9BBC028C2786FA060007C24B /* NobleCardModel.h */, 9BBC028C2786FA060007C24B /* NobleCardModel.h */,
9BBC028D2786FA060007C24B /* NobleCardModel.m */, 9BBC028D2786FA060007C24B /* NobleCardModel.m */,
9B1FC3D327E49A5D006EFFE0 /* ChatBubbleModel.h */,
9B1FC3D427E49A5D006EFFE0 /* ChatBubbleModel.m */,
); );
path = Model; path = Model;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -3247,6 +3255,8 @@
E82D5C6C276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m */, E82D5C6C276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m */,
9BBC028F2786FC570007C24B /* XPMineNobleCardTableViewCell.h */, 9BBC028F2786FC570007C24B /* XPMineNobleCardTableViewCell.h */,
9BBC02902786FC570007C24B /* XPMineNobleCardTableViewCell.m */, 9BBC02902786FC570007C24B /* XPMineNobleCardTableViewCell.m */,
9B1FC3D627E49C36006EFFE0 /* XPMineDressBubbleTableViewCell.h */,
9B1FC3D727E49C36006EFFE0 /* XPMineDressBubbleTableViewCell.m */,
); );
path = Cell; path = Cell;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -5008,6 +5018,7 @@
9B92A3662798132600AD168F /* XPSkillCardTypeView.m in Sources */, 9B92A3662798132600AD168F /* XPSkillCardTypeView.m in Sources */,
E8EE827D272B9A2300A17217 /* XPRoomSendTextView.m in Sources */, E8EE827D272B9A2300A17217 /* XPRoomSendTextView.m in Sources */,
9BD63FAE277EE97A006EB744 /* XPReleaseRadioPresenter.m in Sources */, 9BD63FAE277EE97A006EB744 /* XPReleaseRadioPresenter.m in Sources */,
9B1FC3D827E49C36006EFFE0 /* XPMineDressBubbleTableViewCell.m in Sources */,
9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */, 9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */,
E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */, E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */,
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */, E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */,
@@ -5041,6 +5052,7 @@
E8DACCFB2766EDC60052092C /* MicroGiftValueView.m in Sources */, E8DACCFB2766EDC60052092C /* MicroGiftValueView.m in Sources */,
E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */, E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */,
E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */, E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */,
9B1FC3D527E49A5D006EFFE0 /* ChatBubbleModel.m in Sources */,
E896EFA62771AEDD00AD2CC1 /* XPMineFansTableViewCell.m in Sources */, E896EFA62771AEDD00AD2CC1 /* XPMineFansTableViewCell.m in Sources */,
E8E7DAEB2745158500C631CC /* XPGiftUserInfoModel.m in Sources */, E8E7DAEB2745158500C631CC /* XPGiftUserInfoModel.m in Sources */,
E83DB487274670DA00D8CBD1 /* XPRoomGiftBroadCastModel.m in Sources */, E83DB487274670DA00D8CBD1 /* XPRoomGiftBroadCastModel.m in Sources */,

View File

@@ -100,6 +100,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *fromNick; @property (nonatomic,copy) NSString *fromNick;
@property (nonatomic,assign) UserEnterRoomFromType fromType; @property (nonatomic,assign) UserEnterRoomFromType fromType;
@property (nonatomic,copy) NSString *fromUid; @property (nonatomic,copy) NSString *fromUid;
///安卓房间公屏气泡
@property (nonatomic, copy) NSString *androidBubbleUrl;
///iOS房间公屏气泡
@property (nonatomic, copy) NSString *iosBubbleUrl;
@end @end

View File

@@ -34,6 +34,12 @@ NS_ASSUME_NONNULL_BEGIN
/// @param uid uid /// @param uid uid
+ (void)nobleCardList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize; + (void)nobleCardList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize;
/// 获取用户公屏气泡
/// @param completion 完成
/// @param page 分页
/// @param pageSize 页数
+ (void)chatBubbleList:(HttpRequestHelperCompletion)completion page:(NSString *)page pageSize:(NSString *)pageSize;
/// 使用头饰 /// 使用头饰
/// @param completion 完成 /// @param completion 完成
/// @param headwearId 头饰id 0 取消使用头饰 /// @param headwearId 头饰id 0 取消使用头饰

View File

@@ -42,6 +42,14 @@
[self makeRequest:@"userInfoCard/listByPage" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, ticket, uid, page, pageSize, nil]; [self makeRequest:@"userInfoCard/listByPage" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, ticket, uid, page, pageSize, nil];
} }
///
/// @param completion
/// @param page
/// @param pageSize
+ (void)chatBubbleList:(HttpRequestHelperCompletion)completion page:(NSString *)page pageSize:(NSString *)pageSize {
[self makeRequest:@"userChatBubble/listByPage" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, page, pageSize, nil];
}
/// 使 /// 使
/// @param completion /// @param completion
/// @param headwearId id 0 使 /// @param headwearId id 0 使

View File

@@ -0,0 +1,16 @@
//
// ChatBubbleModel.h
// xplan-ios
//
// Created by GreenLand on 2022/3/18.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ChatBubbleModel : NSObject
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// ChatBubbleModel.m
// xplan-ios
//
// Created by GreenLand on 2022/3/18.
//
#import "ChatBubbleModel.h"
@implementation ChatBubbleModel
@end

View File

@@ -18,6 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)getUserNameplateList; - (void)getUserNameplateList;
/// 获取用户贵族资料卡列表 /// 获取用户贵族资料卡列表
- (void)getUserNobleCardList; - (void)getUserNobleCardList;
/// 获取用户公屏聊天气泡列表
- (void)getUserChatBubbleList;
/// 使用头饰 /// 使用头饰
/// @param headwearId 头饰的id 不使用的时候传0 /// @param headwearId 头饰的id 不使用的时候传0
- (void)useHeader:(NSString *)headwearId; - (void)useHeader:(NSString *)headwearId;

View File

@@ -14,6 +14,7 @@
#import "CarModel.h" #import "CarModel.h"
#import "NameplateModel.h" #import "NameplateModel.h"
#import "NobleCardModel.h" #import "NobleCardModel.h"
#import "ChatBubbleModel.h"
@implementation XPMineDressUpPresenter @implementation XPMineDressUpPresenter
@@ -58,6 +59,14 @@
}] ticket:ticket uid:uid page:@"1" pageSize:@"500"]; }] ticket:ticket uid:uid page:@"1" pageSize:@"500"];
} }
///
- (void)getUserChatBubbleList {
[Api chatBubbleList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
NSArray * array = [ChatBubbleModel modelsWithArray:data.data];
[[self getView] getUserChatBubbleListSuccess:array];
}] page:@"1" pageSize:@"500"];
}
/// 使 /// 使
/// @param headwearId id 使0 /// @param headwearId id 使0
- (void)useHeader:(NSString *)headwearId { - (void)useHeader:(NSString *)headwearId {

View File

@@ -18,6 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)getUserNameplateListSuccess:(NSArray *)array; - (void)getUserNameplateListSuccess:(NSArray *)array;
///获取用户贵族资料卡成功 ///获取用户贵族资料卡成功
- (void)getUserNobleCardListSuccess:(NSArray *)array; - (void)getUserNobleCardListSuccess:(NSArray *)array;
///获取用户公屏气泡成功
- (void)getUserChatBubbleListSuccess:(NSArray *)array;
///使用头饰成功 ///使用头饰成功
- (void)useHeadwearSuccess:(NSString *)headWearId; - (void)useHeadwearSuccess:(NSString *)headWearId;
///使用座驾成功 ///使用座驾成功

View File

@@ -0,0 +1,29 @@
//
// XPMineDressBubbleTableViewCell.h
// xplan-ios
//
// Created by GreenLand on 2022/3/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class ChatBubbleModel, XPMineDressBubbleTableViewCell;
@protocol XPMineDressBubbleTableViewCellDelegate <NSObject>
///使用铭牌
- (void)xPMineNameplateTableViewCell:(XPMineDressBubbleTableViewCell *)view nameplateId:(NSString *)nameplateId;
@end
@interface XPMineDressBubbleTableViewCell : UITableViewCell
@property (nonatomic, strong) ChatBubbleModel *bubbleModel;
@property (nonatomic,weak) id<XPMineDressBubbleTableViewCellDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,201 @@
//
// XPMineDressBubbleTableViewCell.m
// xplan-ios
//
// Created by GreenLand on 2022/3/18.
//
#import "XPMineDressBubbleTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "NetImageView.h"
#import "UIImage+Utils.h"
///Model
#import "NameplateModel.h"
@interface XPMineDressBubbleTableViewCell()
///
@property (nonatomic, strong) NetImageView *namePlateImageView;
///
@property (nonatomic, strong) UILabel *titleLabel;
///
@property (nonatomic,strong) UIStackView *timeStackView;
///icon
@property (nonatomic, strong) UIImageView *timeImageView;
///
@property (nonatomic, strong) UILabel *timeLabel;
///使
@property (nonatomic,strong) UIButton *useButton;
///线
@property (nonatomic,strong) UIView * lineView;
@end
@implementation XPMineDressBubbleTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];;
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.namePlateImageView];
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.timeStackView];
[self.contentView addSubview:self.useButton];
[self.contentView addSubview:self.lineView];
[self.timeStackView addArrangedSubview:self.timeImageView];
[self.timeStackView addArrangedSubview:self.timeLabel];
}
- (void)initSubViewConstraints {
[self.namePlateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(60);
make.width.mas_equalTo(100);
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.contentView).offset(20);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.namePlateImageView.mas_right).offset(10);
make.bottom.mas_equalTo(self.namePlateImageView.mas_centerY).offset(-3);
}];
[self.timeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.width.mas_equalTo(11);
}];
[self.timeStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.titleLabel);
make.top.mas_equalTo(self.namePlateImageView.mas_centerY).offset(3);
}];
[self.useButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self);
make.right.mas_equalTo(self.contentView).offset(-15);
make.height.mas_equalTo(33);
make.width.mas_equalTo(85);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.contentView).offset(105);
make.height.mas_equalTo(0.5);
make.bottom.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.contentView).offset(-15);
}];
}
#pragma mark - private
- (void)setBubbleModel:(ChatBubbleModel *)bubbleModel {
_bubbleModel = bubbleModel;
// if (bubbleModel) {
// self.titleLabel.text = _nameplateModel.nameplateName;
// self.timeImageView.hidden = _nameplateModel.isExpired;
// self.useButton.hidden = _nameplateModel.isExpired;
// if (!_nameplateModel.isExpired) {
// self.timeLabel.text = [NSString stringWithFormat:@"剩余%@天", _nameplateModel.expireDays];
// } else {
// self.timeLabel.text = @"已过期";
// }
// self.namePlateImageView.imageUrl = _nameplateModel.nameplateImage;
// if (_nameplateModel.isUsing) {
// [_useButton setTitle:@"取消使用" forState:UIControlStateNormal];
// [_useButton setTitleColor:[ThemeColor cancelButtonTextColor] forState:UIControlStateNormal];
// [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor cancelButtonGradientStartColor], [ThemeColor cancelButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
// } else {
// [_useButton setTitle:@"使用" forState:UIControlStateNormal];
// [_useButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
// [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
// }
// }
}
#pragma mark - Event Response
- (void)useButtonAction:(UIButton *)sender {
// if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineNameplateTableViewCell:nameplateId:)]) {
// NSString * nameplateId = self.nameplateModel.nId;;
// if (self.nameplateModel.isUsing) {
// nameplateId = @"0";
// }
// [self.delegate xPMineNameplateTableViewCell:self nameplateId:nameplateId];
// }
}
#pragma mark - Getter && Setter
- (NetImageView *)namePlateImageView {
if (!_namePlateImageView) {
_namePlateImageView = [[NetImageView alloc] init];
_namePlateImageView.image = [UIImageConstant defaultAvatarPlaceholder];
_namePlateImageView.contentMode = UIViewContentModeScaleAspectFit;
_namePlateImageView.backgroundColor = [ThemeColor appCellBackgroundColor];
_namePlateImageView.layer.masksToBounds = YES;
_namePlateImageView.layer.cornerRadius = 12;
}
return _namePlateImageView;;
}
- (UIStackView *)timeStackView {
if (!_timeStackView) {
_timeStackView = [[UIStackView alloc] init];
_timeStackView.axis = UILayoutConstraintAxisHorizontal;
_timeStackView.distribution = UIStackViewDistributionFill;
_timeStackView.alignment = UIStackViewAlignmentCenter;
_timeStackView.spacing = 2;
}
return _timeStackView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.font = [UIFont systemFontOfSize:15];
_titleLabel.textColor = [ThemeColor mainTextColor];
}
return _titleLabel;
}
- (UIButton *)useButton {
if (!_useButton) {
_useButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_useButton setTitle:@"使用" forState:UIControlStateNormal];
[_useButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_useButton addTarget:self action:@selector(useButtonAction:) forControlEvents:UIControlEventTouchUpInside];
_useButton.layer.masksToBounds = YES;
_useButton.layer.cornerRadius = 33/2;
_useButton.titleLabel.font = [UIFont systemFontOfSize:14];
[_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
}
return _useButton;
}
- (UIImageView *)timeImageView {
if (!_timeImageView) {
_timeImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_dressup_time"]];
}
return _timeImageView;
}
- (UILabel *)timeLabel {
if (!_timeLabel) {
_timeLabel = [[UILabel alloc] init];
_timeLabel.font = [UIFont systemFontOfSize:12];
_timeLabel.textColor = [ThemeColor secondTextColor];
}
return _timeLabel;
}
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [ThemeColor dividerColor];
}
return _lineView;
}
@end

View File

@@ -14,6 +14,7 @@ typedef NS_ENUM(NSInteger, DressUpListType) {
DressUpListType_Car, DressUpListType_Car,
DressUpListType_Nameplate, DressUpListType_Nameplate,
DressUpListType_Noble, DressUpListType_Noble,
DressUpListType_Bubble,
}; };
@interface XPMineDressUpListViewController : MvpViewController<JXCategoryListContentViewDelegate> @interface XPMineDressUpListViewController : MvpViewController<JXCategoryListContentViewDelegate>

View File

@@ -16,6 +16,7 @@
#import "XPMineNameplateTableViewCell.h" #import "XPMineNameplateTableViewCell.h"
#import "XPMineDressEmptyTableViewCell.h" #import "XPMineDressEmptyTableViewCell.h"
#import "XPMineNobleCardTableViewCell.h" #import "XPMineNobleCardTableViewCell.h"
#import "XPMineDressBubbleTableViewCell.h"
///P ///P
#import "XPMineDressUpPresenter.h" #import "XPMineDressUpPresenter.h"
#import "XPMineDressUpProtocol.h" #import "XPMineDressUpProtocol.h"
@@ -88,6 +89,11 @@
[self.tableView reloadData]; [self.tableView reloadData];
} }
- (void)getUserChatBubbleListSuccess:(NSArray *)array {
self.datasource = array;
[self.tableView reloadData];
}
- (void)useHeadwearSuccess:(NSString *)headWearId { - (void)useHeadwearSuccess:(NSString *)headWearId {
[self.presenter getUserHeadwearList]; [self.presenter getUserHeadwearList];
[self showSuccessToast:headWearId.integerValue == 0 ? @"取消使用头饰成功" : @"头饰使用成功"]; [self showSuccessToast:headWearId.integerValue == 0 ? @"取消使用头饰成功" : @"头饰使用成功"];
@@ -153,6 +159,14 @@
cell.nobleCardModel = [self.datasource objectAtIndex:indexPath.row]; cell.nobleCardModel = [self.datasource objectAtIndex:indexPath.row];
cell.delegate = self; cell.delegate = self;
return cell; return cell;
} else if (self.type == DressUpListType_Bubble) {
XPMineDressBubbleTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDressBubbleTableViewCell class])];
if (cell == nil) {
cell = [[XPMineDressBubbleTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineDressBubbleTableViewCell class])];
}
// cell.nameplateModel = [self.datasource objectAtIndex:indexPath.row];
// cell.delegate = self;
return cell;
} else { } else {
XPMineNameplateTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])]; XPMineNameplateTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])];
if (cell == nil) { if (cell == nil) {
@@ -161,7 +175,7 @@
cell.nameplateModel = [self.datasource objectAtIndex:indexPath.row]; cell.nameplateModel = [self.datasource objectAtIndex:indexPath.row];
cell.delegate = self; cell.delegate = self;
return cell; return cell;
} }
} }
XPMineDressEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])]; XPMineDressEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
@@ -187,6 +201,9 @@
break; break;
case DressUpListType_Noble: case DressUpListType_Noble:
[self.presenter getUserNobleCardList]; [self.presenter getUserNobleCardList];
break;
case DressUpListType_Bubble:
[self.presenter getUserChatBubbleList];
break; break;
default: default:
break; break;
@@ -207,6 +224,7 @@
[_tableView registerClass:[XPMineCarTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])]; [_tableView registerClass:[XPMineCarTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])];
[_tableView registerClass:[XPMineHeadwearTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])]; [_tableView registerClass:[XPMineHeadwearTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])];
[_tableView registerClass:[XPMineNobleCardTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineNobleCardTableViewCell class])]; [_tableView registerClass:[XPMineNobleCardTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineNobleCardTableViewCell class])];
[_tableView registerClass:[XPMineDressBubbleTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDressBubbleTableViewCell class])];
[_tableView registerClass:[XPMineDressEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])]; [_tableView registerClass:[XPMineDressEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
} }
return _tableView; return _tableView;

View File

@@ -35,6 +35,8 @@
@property (nonatomic,strong) XPMineDressUpListViewController *nameplateView; @property (nonatomic,strong) XPMineDressUpListViewController *nameplateView;
/// ///
@property (nonatomic, strong) XPMineDressUpListViewController *nobleView; @property (nonatomic, strong) XPMineDressUpListViewController *nobleView;
///
@property (nonatomic, strong) XPMineDressUpListViewController *bubbleView;
/// ///
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView; @property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
/// ///
@@ -122,8 +124,10 @@
return self.carView; return self.carView;
} else if (index == 2) { } else if (index == 2) {
return self.nameplateView; return self.nameplateView;
} else if (index == 3) {
return self.nobleView;
} }
return self.nobleView; return self.bubbleView;
} }
// //
@@ -181,7 +185,7 @@
} }
- (NSArray<NSString *> *)titles { - (NSArray<NSString *> *)titles {
return @[@"头饰", @"座驾", @"铭牌", @"资料卡"]; return @[@"头饰", @"座驾", @"铭牌", @"资料卡", @"聊天气泡"];
} }
- (XPMineDressUpListViewController *)headwearView { - (XPMineDressUpListViewController *)headwearView {
@@ -216,6 +220,14 @@
return _nobleView; return _nobleView;
} }
- (XPMineDressUpListViewController *)bubbleView {
if (!_bubbleView) {
_bubbleView = [[XPMineDressUpListViewController alloc] init];
_bubbleView.type = DressUpListType_Bubble;
}
return _bubbleView;
}
- (SDCycleScrollView *)cycleScrollView { - (SDCycleScrollView *)cycleScrollView {
if (!_cycleScrollView) { if (!_cycleScrollView) {
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil]; _cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];

View File

@@ -68,7 +68,9 @@
extModel.experUrl = userInfo.userLevelVo.experUrl; extModel.experUrl = userInfo.userLevelVo.experUrl;
extModel.newUser = userInfo.newUser; extModel.newUser = userInfo.newUser;
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon; extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
NIMMessage * message = [[NIMMessage alloc] init]; NIMMessage * message = [[NIMMessage alloc] init];
message.text = self.inputMessage; message.text = self.inputMessage;
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid]; NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid];

View File

@@ -38,7 +38,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *inRoomNameplateWord; @property (nonatomic,copy) NSString *inRoomNameplateWord;
///贵族icon ///贵族icon
@property (nonatomic, copy) NSString *vipIcon; @property (nonatomic, copy) NSString *vipIcon;
///安卓房间公屏气泡
@property (nonatomic, copy) NSString *androidBubbleUrl;
///iOS房间公屏气泡
@property (nonatomic, copy) NSString *iosBubbleUrl;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface XPRoomMessageTableViewCell : UITableViewCell @interface XPRoomMessageTableViewCell : UITableViewCell
@property (nonatomic,strong) NSAttributedString *attributedString; @property (nonatomic,strong) NSAttributedString *attributedString;
///气泡url
@property (nonatomic, copy) NSString *bubbleImageUrl;
@end @end

View File

@@ -9,6 +9,7 @@
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import "XPNetImageYYLabel.h" #import "XPNetImageYYLabel.h"
#import "NetImageView.h"
///Tool ///Tool
#import "XPMacro.h" #import "XPMacro.h"
#import "ThemeColor+Room.h" #import "ThemeColor+Room.h"
@@ -18,7 +19,7 @@
@interface XPRoomMessageTableViewCell () @interface XPRoomMessageTableViewCell ()
/// ///
@property (nonatomic,strong) UIImageView *bubbleImageView; @property (nonatomic,strong) NetImageView *bubbleImageView;
/// ///
@property (nonatomic,strong) XPNetImageYYLabel *contentLabel; @property (nonatomic,strong) XPNetImageYYLabel *contentLabel;
@end @end
@@ -60,9 +61,14 @@
self.contentLabel.attributedText = attribute; self.contentLabel.attributedText = attribute;
} }
- (UIImageView *)bubbleImageView { - (void)setBubbleImageUrl:(NSString *)bubbleImageUrl {
_bubbleImageUrl = bubbleImageUrl;
self.bubbleImageView.imageUrl = bubbleImageUrl;
}
- (NetImageView *)bubbleImageView {
if (!_bubbleImageView) { if (!_bubbleImageView) {
_bubbleImageView = [[UIImageView alloc] init]; _bubbleImageView = [[NetImageView alloc] init];
_bubbleImageView.userInteractionEnabled = YES; _bubbleImageView.userInteractionEnabled = YES;
_bubbleImageView.layer.masksToBounds = YES; _bubbleImageView.layer.masksToBounds = YES;
_bubbleImageView.layer.cornerRadius = 7; _bubbleImageView.layer.cornerRadius = 7;