feat: 更新 VIP 页面内容 | 更新一级页面 UI
BIN
YuMi/Assets.xcassets/Login/ms_login_choose_phone_icon.imageset/1.png
vendored
Normal file
After Width: | Height: | Size: 2.0 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "路径 6@2x@3x.png",
|
||||
"filename" : "1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "me_bg_guild@3x.png",
|
||||
"filename" : "组 8153@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 54 KiB |
BIN
YuMi/Assets.xcassets/MineInfo/me_bg_guild.imageset/组 8153@3x.png
vendored
Normal file
After Width: | Height: | Size: 34 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "me_bg_vip@3x.png",
|
||||
"filename" : "组 8152@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 48 KiB |
BIN
YuMi/Assets.xcassets/MineInfo/me_bg_vip.imageset/组 8152@3x.png
vendored
Normal file
After Width: | Height: | Size: 35 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "me_bg_wallet@3x.png",
|
||||
"filename" : "组 8151@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 46 KiB |
BIN
YuMi/Assets.xcassets/MineInfo/me_bg_wallet.imageset/组 8151@3x.png
vendored
Normal file
After Width: | Height: | Size: 35 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_add_coin@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_add_coin@3x.png",
|
||||
"filename" : "组 2214@2x@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.9 KiB |
BIN
YuMi/Assets.xcassets/RoomGame/ms_room_game_add_coin.imageset/组 2214@2x@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.8 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_avatar_border@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_avatar_border@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 1.3 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_rank_coin@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_rank_coin@3x.png",
|
||||
"filename" : "搜索@3x-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 5.1 KiB |
BIN
YuMi/Assets.xcassets/RoomGame/ms_room_game_rank_coin.imageset/搜索@3x-2.png
vendored
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
YuMi/Assets.xcassets/RoomGame/ms_room_game_top_icon.imageset/1@3x.png
vendored
Normal file
After Width: | Height: | Size: 51 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_top_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_top_icon@3x.png",
|
||||
"filename" : "1@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 31 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_home_heat_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_home_heat_icon@3x.png",
|
||||
"filename" : "组 7967@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
BIN
YuMi/Assets.xcassets/low/ms_home_heat_icon.imageset/组 7967@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.7 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "搜索2@3x.png",
|
||||
"filename" : "搜索@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
BIN
YuMi/Assets.xcassets/low/navigation/home_nav_search.imageset/搜索@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.1 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "矩形 6@3x-2.png",
|
||||
"filename" : "top@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
BIN
YuMi/Assets.xcassets/low/newhome/home_top_bg.imageset/top@3x.png
vendored
Normal file
After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 46 KiB |
BIN
YuMi/Assets.xcassets/main/home_rank_Headdress_first.imageset/6@3x.png
vendored
Normal file
After Width: | Height: | Size: 18 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Headdress_first@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Headdress_first@3x.png",
|
||||
"filename" : "6@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 30 KiB |
BIN
YuMi/Assets.xcassets/main/home_rank_Headdress_second.imageset/2@3x.png
vendored
Normal file
After Width: | Height: | Size: 8.2 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Headdress_second@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Headdress_second@3x.png",
|
||||
"filename" : "2@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 15 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Headdress_third@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Headdress_third@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 16 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Heads_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_rank_Heads_bg@3x.png",
|
||||
"filename" : "排行榜@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 64 KiB |
BIN
YuMi/Assets.xcassets/main/home_rank_Heads_bg.imageset/排行榜@3x.png
vendored
Normal file
After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 465 B |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "矩形 1979@3x.png",
|
||||
"filename" : "tab_bar_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/main/tab_bar_bg.imageset/tab_bar_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "游戏@3x.png",
|
||||
"filename" : "游戏@3x_副本.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.9 KiB |
BIN
YuMi/Assets.xcassets/main/tab_gameHome_game_selected.imageset/游戏@3x_副本.png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "论坛@3x.png",
|
||||
"filename" : "首页@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
YuMi/Assets.xcassets/main/tab_gameHome_normal.imageset/首页@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.9 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "论坛@3x.png",
|
||||
"filename" : "首页@3x_副本.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.5 KiB |
BIN
YuMi/Assets.xcassets/main/tab_gameHome_selected.imageset/首页@3x_副本.png
vendored
Normal file
After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "消息@3x.png",
|
||||
"filename" : "消息@3x_副本.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.4 KiB |
BIN
YuMi/Assets.xcassets/main/tab_message_selected.imageset/消息@3x_副本.png
vendored
Normal file
After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "我的@3x.png",
|
||||
"filename" : "我的@3x_副本.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
BIN
YuMi/Assets.xcassets/main/tab_mine_selected.imageset/我的@3x_副本.png
vendored
Normal file
After Width: | Height: | Size: 6.5 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "论坛@3x.png",
|
||||
"filename" : "发现@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
BIN
YuMi/Assets.xcassets/main/tab_monents_normal.imageset/发现@3x.png
vendored
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.3 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "论坛@3x-2.png",
|
||||
"filename" : "发现@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
BIN
YuMi/Assets.xcassets/main/tab_monents_select.imageset/发现@3x.png
vendored
Normal file
After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 11 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_right_arrow@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_right_arrow@3x.png",
|
||||
"filename" : "跳转@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 399 B |
BIN
YuMi/Assets.xcassets/utils/common_right_arrow.imageset/跳转@3x.png
vendored
Normal file
After Width: | Height: | Size: 325 B |
@@ -60,7 +60,8 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(getTabBarItemBadge:) name:@"kGetTabBarItemBadge" object:nil];
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
self.view.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#FCF4DF"];
|
||||
|
||||
self.headView = [UIView new];
|
||||
|
||||
[self.view addSubview:self.headBgImageView];
|
||||
@@ -69,7 +70,7 @@
|
||||
- (void)initSubViewConstraints {
|
||||
[self.headBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.top.trailing.equalTo(self.view);
|
||||
make.height.mas_equalTo(kGetScaleWidth(223));
|
||||
make.height.mas_equalTo(kGetScaleWidth(140));
|
||||
}];
|
||||
|
||||
[self.pagingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -156,11 +157,11 @@
|
||||
_titleView = [[JXCategoryTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.backgroundColor = [UIColor clearColor];
|
||||
_titleView.titleColor = UIColorFromRGB(0x6D6B89);
|
||||
_titleView.titleSelectedColor = UIColorFromRGB(0x1F1A4E);
|
||||
_titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
|
||||
_titleView.titleSelectedFont = [UIFont boldSystemFontOfSize:22];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.titleColor = UIColorFromRGB(0x313131);
|
||||
_titleView.titleSelectedColor = UIColorFromRGB(0x313131);
|
||||
_titleView.titleFont = kFontRegular(16);
|
||||
_titleView.titleSelectedFont = kFontSemibold(20);
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleBottom;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.averageCellSpacingEnabled = NO;
|
||||
@@ -169,15 +170,6 @@
|
||||
_titleView.cellSpacing = 20;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
|
||||
|
||||
JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
lineView.indicatorImageViewSize = CGSizeMake(24, 7);
|
||||
// lineView.verticalMargin = 10;
|
||||
lineView.indicatorImageView.layer.masksToBounds = YES;
|
||||
lineView.indicatorImageView.layer.cornerRadius = 3;
|
||||
lineView.indicatorImageView.image = [UIImage imageNamed:@"ms_login_choose_phone_icon"];
|
||||
lineView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_titleView.indicators = @[lineView];
|
||||
|
||||
[_titleView addSubview:self.allCleanBtn];
|
||||
[self.allCleanBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
@@ -30,6 +30,8 @@
|
||||
|
||||
@property (nonatomic,strong) UIView *divider;
|
||||
|
||||
@property (nonatomic, strong) UIView *container;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SessionListCell
|
||||
@@ -75,6 +77,7 @@
|
||||
}
|
||||
NSString *messageTitle = [NIMMessageUtils messageContent:recent.lastMessage];
|
||||
NSMutableAttributedString *messageAtt = [[QEmotionHelper sharedEmotionHelper]attributedStringByText:messageTitle font:self.messageLabel.font];
|
||||
[messageAtt addAttributes:@{NSForegroundColorAttributeName: UIColorFromRGB(0x7b7b7d)} range:NSMakeRange(0, messageAtt.length)];
|
||||
self.messageLabel.attributedText = messageAtt;
|
||||
|
||||
|
||||
@@ -101,17 +104,37 @@
|
||||
}
|
||||
|
||||
- (void)initView {
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.nameLabel];
|
||||
[self.contentView addSubview:self.messageLabel];
|
||||
[self.contentView addSubview:self.timeLabel];
|
||||
[self.contentView addSubview:self.badgeView];
|
||||
[self.contentView addSubview:self.divider];
|
||||
UIView *bottomSpace = [[UIView alloc] init];
|
||||
[self.contentView addSubview:bottomSpace];
|
||||
[bottomSpace mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
UIView *container = [[UIView alloc] init];
|
||||
container.backgroundColor = [UIColor whiteColor];
|
||||
container.layer.cornerRadius = 10;
|
||||
[self.contentView addSubview:container];
|
||||
[container mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView);
|
||||
make.bottom.mas_equalTo(bottomSpace.mas_top);
|
||||
make.leading.mas_equalTo(16);
|
||||
make.trailing.mas_equalTo(-16);
|
||||
}];
|
||||
|
||||
[container addSubview:self.avatarImageView];
|
||||
[container addSubview:self.nameLabel];
|
||||
[container addSubview:self.messageLabel];
|
||||
[container addSubview:self.timeLabel];
|
||||
[container addSubview:self.badgeView];
|
||||
[container addSubview:self.divider];
|
||||
|
||||
_container = container;
|
||||
}
|
||||
|
||||
- (void)initLayout {
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.centerY.mas_equalTo(self.container);
|
||||
make.leading.mas_equalTo(15);
|
||||
make.height.width.mas_equalTo(45);
|
||||
}];
|
||||
@@ -124,21 +147,20 @@
|
||||
[self.messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.nameLabel);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(2);
|
||||
make.trailing.mas_equalTo(self.timeLabel.mas_leading).offset(-15);
|
||||
make.trailing.mas_equalTo(self.container).offset(-15);
|
||||
}];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self).offset(-15);
|
||||
make.trailing.mas_equalTo(self).offset(-15);
|
||||
make.top.mas_equalTo(self.container).offset(21);
|
||||
make.trailing.mas_equalTo(self.container).offset(-15);
|
||||
}];
|
||||
|
||||
[self.divider mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo (-15);
|
||||
make.leading.mas_equalTo(self.nameLabel);
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(self.container);
|
||||
make.height.mas_equalTo(0.5f);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
@@ -163,9 +185,8 @@
|
||||
- (UILabel *)nameLabel {
|
||||
if (!_nameLabel) {
|
||||
_nameLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||
_nameLabel.backgroundColor = [UIColor clearColor];
|
||||
_nameLabel.font = [UIFont systemFontOfSize:15.f weight:UIFontWeightMedium];
|
||||
_nameLabel.textColor = DJDKMIMOMColor.mainTextColor;
|
||||
_nameLabel.font = kFontSemibold(14);
|
||||
_nameLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
return _nameLabel;
|
||||
}
|
||||
@@ -173,9 +194,8 @@
|
||||
- (YYLabel *)messageLabel {
|
||||
if (!_messageLabel) {
|
||||
_messageLabel = [[YYLabel alloc] initWithFrame:CGRectZero];
|
||||
_messageLabel.backgroundColor = [UIColor clearColor];
|
||||
_messageLabel.font = [UIFont systemFontOfSize:13.f];
|
||||
_messageLabel.textColor = DJDKMIMOMColor.secondTextColor;
|
||||
_messageLabel.font = kFontRegular(13);
|
||||
_messageLabel.textColor = UIColorFromRGB(0x7b7b7d);
|
||||
}
|
||||
return _messageLabel;
|
||||
}
|
||||
@@ -184,8 +204,8 @@
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||
_timeLabel.backgroundColor = [UIColor clearColor];
|
||||
_timeLabel.font = [UIFont systemFontOfSize:12.f weight:UIFontWeightLight];
|
||||
_timeLabel.textColor = DJDKMIMOMColor.textThirdColor;
|
||||
_timeLabel.font = kFontRegular(12);
|
||||
_timeLabel.textColor = UIColorFromRGB(0x999999);
|
||||
[_timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[_timeLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
}
|
||||
|
@@ -26,11 +26,6 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
|
||||
@interface SessionListViewController ()<UITableViewDataSource, UITableViewDelegate, NIMLoginManagerDelegate, NIMConversationManagerDelegate>
|
||||
|
||||
//@property (nonatomic,strong) UIView *customNavigationBar;
|
||||
|
||||
//@property (nonatomic,strong) UILabel *titleLabel;
|
||||
//
|
||||
//@property (nonatomic, strong) UIButton *allReadButton;
|
||||
/**
|
||||
* 会话列表
|
||||
*/
|
||||
@@ -99,28 +94,11 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
} uid:uid];
|
||||
}
|
||||
- (void)initViews {
|
||||
// self.title = @"消息";
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
if (self.openType == SessionListOpenTypeDefault) {
|
||||
// [self.customNavigationBar addSubview:self.titleLabel];
|
||||
// [self.view addSubview:self.customNavigationBar];
|
||||
// [self.customNavigationBar addSubview:self.allReadButton];
|
||||
}
|
||||
[self.view addSubview:self.sessionListView];
|
||||
}
|
||||
|
||||
- (void)initLayout {
|
||||
if (self.openType == SessionListOpenTypeDefault) {
|
||||
// [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.center.mas_equalTo(self.customNavigationBar);
|
||||
// }];
|
||||
// [self.allReadButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.trailing.mas_equalTo(-16);
|
||||
// make.width.height.mas_equalTo(30);
|
||||
// make.centerY.mas_equalTo(self.customNavigationBar);
|
||||
// }];
|
||||
}
|
||||
|
||||
[self.sessionListView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.view);
|
||||
if (self.openType == SessionListOpenTypeDefault) {
|
||||
@@ -129,7 +107,6 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
make.top.mas_equalTo(self.view);
|
||||
}
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)initDatas {
|
||||
@@ -147,25 +124,11 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
NIMLoadRecentSessionsOptions *options = [[NIMLoadRecentSessionsOptions alloc] init];
|
||||
options.sortByStickTopInfos = YES;
|
||||
[NIMSDK.sharedSDK.chatExtendManager loadRecentSessionsWithOptions:options completion:^(NSError * _Nullable error, NSArray<NIMRecentSession *> * _Nullable recentSessions) {
|
||||
if (error) {
|
||||
// handle error
|
||||
return;
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0) {
|
||||
SessionDiscoverNewTableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
cell.hiddenDotView = YES;
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kMessageShowReadDotKey];
|
||||
XPSessionFindNewViewController * findNewVC = [[XPSessionFindNewViewController alloc] init];
|
||||
[self.navigationController pushViewController:findNewVC animated:YES];
|
||||
return;
|
||||
}
|
||||
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.openType == SessionListOpenTypeRoom) {
|
||||
NIMRecentSession *recentSession = self.recentSessions[indexPath.row];
|
||||
@@ -188,13 +151,10 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return 70.f;
|
||||
return 92.f;
|
||||
}
|
||||
|
||||
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 0) {
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -210,27 +170,14 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
|
||||
#pragma mark - UITableViewDataSource
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
if (section == 0) {
|
||||
// return [ClientConfig shareConfig].configInfo.findNewbieCharmLevel <= self.userInfo.userLevelVo.experLevelSeq ? 1 : 0;
|
||||
return 0;
|
||||
}
|
||||
return self.recentSessions.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0) {
|
||||
SessionDiscoverNewTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([SessionDiscoverNewTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[SessionDiscoverNewTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([SessionDiscoverNewTableViewCell class])];
|
||||
}
|
||||
BOOL hidden = [[NSUserDefaults standardUserDefaults] boolForKey:kMessageShowReadDotKey];
|
||||
cell.hiddenDotView = hidden;
|
||||
return cell;
|
||||
}
|
||||
static NSString * cellId = @"cellId";
|
||||
SessionListCell * cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
@@ -316,7 +263,6 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
if (self.scrollCallback){
|
||||
self.scrollCallback(scrollView);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
@@ -354,7 +300,6 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
|
||||
- (void)setTabBarItemBadge:(NSInteger)value {
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kGetTabBarItemBadge" object:nil userInfo:@{@"BadgeValue":@(value)}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
@@ -376,26 +321,6 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
//- (UIView *)customNavigationBar {
|
||||
// if (!_customNavigationBar) {
|
||||
// CGRect frame = CGRectMake(0, kStatusBarHeight, KScreenWidth, 44);
|
||||
// _customNavigationBar = [[UIView alloc]initWithFrame:frame];
|
||||
// }
|
||||
// return _customNavigationBar;
|
||||
//}
|
||||
|
||||
//- (UILabel *)titleLabel {
|
||||
// if (!_titleLabel) {
|
||||
// _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||
// _titleLabel.backgroundColor = [UIColor clearColor];
|
||||
// _titleLabel.font = [UIFont systemFontOfSize:18.f weight:UIFontWeightMedium];
|
||||
// _titleLabel.textColor = ThemeColor.mainTextColor;
|
||||
// _titleLabel.text = @"消息";
|
||||
// }
|
||||
// return _titleLabel;
|
||||
//}
|
||||
|
||||
- (UITableView *)sessionListView {
|
||||
if (!_sessionListView) {
|
||||
_sessionListView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
@@ -415,13 +340,4 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
return _recentSessions;
|
||||
}
|
||||
|
||||
//- (UIButton *)allReadButton {
|
||||
// if (!_allReadButton) {
|
||||
// _allReadButton = [[UIButton alloc] init];
|
||||
// [_allReadButton setImage:[UIImage imageNamed:@"sessionList_clear"] forState:UIControlStateNormal];
|
||||
// [_allReadButton addTarget:self action:@selector(allReadButtonClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
// }
|
||||
// return _allReadButton;
|
||||
//}
|
||||
|
||||
@end
|
||||
|
@@ -34,6 +34,8 @@
|
||||
///找到他
|
||||
@property (nonatomic,strong) UIButton *findButton;
|
||||
|
||||
@property (nonatomic, strong) UIView *container;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -50,24 +52,44 @@
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.stackView];
|
||||
[self.contentView addSubview:self.signLabel];
|
||||
[self.contentView addSubview:self.findButton];
|
||||
|
||||
|
||||
UIView *bottomSpace = [[UIView alloc] init];
|
||||
[self.contentView addSubview:bottomSpace];
|
||||
[bottomSpace mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
UIView *container = [[UIView alloc] init];
|
||||
container.backgroundColor = [UIColor whiteColor];
|
||||
container.layer.cornerRadius = 10;
|
||||
[self.contentView addSubview:container];
|
||||
[container mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView);
|
||||
make.bottom.mas_equalTo(bottomSpace.mas_top);
|
||||
make.leading.mas_equalTo(16);
|
||||
make.trailing.mas_equalTo(-16);
|
||||
}];
|
||||
|
||||
[container addSubview:self.avatarImageView];
|
||||
[container addSubview:self.stackView];
|
||||
[container addSubview:self.signLabel];
|
||||
[container addSubview:self.findButton];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nobleImageView];
|
||||
[self.stackView addArrangedSubview:self.nickLabel];
|
||||
[self.stackView addArrangedSubview:self.sexImageView];
|
||||
[self.stackView addArrangedSubview:self.experImageView];
|
||||
[self.stackView addArrangedSubview:self.charmImageView];
|
||||
|
||||
_container = container;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake((50), (50)));
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.leading.mas_equalTo(self.contentView).offset((15));
|
||||
make.centerY.mas_equalTo(self.container);
|
||||
make.leading.mas_equalTo(self.container).offset((15));
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -80,9 +102,7 @@
|
||||
make.width.mas_equalTo(28);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
// [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.width.mas_lessThanOrEqualTo((100));
|
||||
// }];
|
||||
|
||||
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.stackView);
|
||||
make.top.equalTo(self.stackView.mas_bottom).mas_offset((7));
|
||||
@@ -92,8 +112,8 @@
|
||||
[self.findButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo((68));
|
||||
make.height.mas_equalTo((30));
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.trailing.mas_equalTo(self.contentView).offset(-(15));
|
||||
make.centerY.mas_equalTo(self.container);
|
||||
make.trailing.mas_equalTo(self.container).offset(-(15));
|
||||
}];
|
||||
|
||||
CGFloat width = 28 * 20 / 14;
|
||||
@@ -119,9 +139,9 @@
|
||||
_fansInfo = fansInfo;
|
||||
if (_fansInfo) {
|
||||
self.avatarImageView.imageUrl = _fansInfo.avatar;
|
||||
if(_fansInfo.nick.length > 5){
|
||||
_fansInfo.nick = [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]];
|
||||
}
|
||||
// if(_fansInfo.nick.length > 5){
|
||||
// _fansInfo.nick = [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]];
|
||||
// }
|
||||
self.nickLabel.text = _fansInfo.nick;
|
||||
self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : YMLocalizedString(@"XPMineAttentionTableViewCell0");
|
||||
if (_fansInfo.useingType != ContactUseingType_In_Room && _fansInfo.useingType != ContactUseingType_Share) {
|
||||
@@ -159,7 +179,7 @@
|
||||
if (fansInfo.userVipInfoVO && fansInfo.userVipInfoVO.friendNickColour) {
|
||||
self.nickLabel.textColor = [self colorWithHexString:fansInfo.userVipInfoVO.friendNickColour];
|
||||
} else {
|
||||
self.nickLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
self.nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
} else {
|
||||
self.experImageView.hidden = YES;
|
||||
@@ -167,7 +187,7 @@
|
||||
self.nobleImageView.hidden = YES;
|
||||
self.sexImageView.hidden = YES;
|
||||
self.findButton.hidden = YES;
|
||||
self.nickLabel.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
self.nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,8 +236,8 @@
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = kFontMedium(15);
|
||||
_nickLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_nickLabel.font = kFontMedium(14);
|
||||
_nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
@@ -268,8 +288,8 @@
|
||||
- (UILabel *)signLabel{
|
||||
if (!_signLabel) {
|
||||
_signLabel = [[UILabel alloc] init];
|
||||
_signLabel.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_signLabel.font = kFontMedium(12);
|
||||
_signLabel.textColor = UIColorFromRGB(0x7b7b7d);
|
||||
_signLabel.font = kFontRegular(13);
|
||||
}
|
||||
return _signLabel;
|
||||
}
|
||||
|
@@ -35,6 +35,8 @@
|
||||
///关注
|
||||
@property (nonatomic,strong) UIButton *attentionButton;
|
||||
|
||||
@property (nonatomic, strong) UIView *container;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -51,24 +53,44 @@
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.stackView];
|
||||
[self.contentView addSubview:self.signLabel];
|
||||
[self.contentView addSubview:self.attentionButton];
|
||||
|
||||
|
||||
UIView *bottomSpace = [[UIView alloc] init];
|
||||
[self.contentView addSubview:bottomSpace];
|
||||
[bottomSpace mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
UIView *container = [[UIView alloc] init];
|
||||
container.backgroundColor = [UIColor whiteColor];
|
||||
container.layer.cornerRadius = 10;
|
||||
[self.contentView addSubview:container];
|
||||
[container mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView);
|
||||
make.bottom.mas_equalTo(bottomSpace.mas_top);
|
||||
make.leading.mas_equalTo(16);
|
||||
make.trailing.mas_equalTo(-16);
|
||||
}];
|
||||
|
||||
[container addSubview:self.avatarImageView];
|
||||
[container addSubview:self.stackView];
|
||||
[container addSubview:self.signLabel];
|
||||
[container addSubview:self.attentionButton];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nobleImageView];
|
||||
[self.stackView addArrangedSubview:self.nickLabel];
|
||||
[self.stackView addArrangedSubview:self.sexImageView];
|
||||
[self.stackView addArrangedSubview:self.experImageView];
|
||||
[self.stackView addArrangedSubview:self.charmImageView];
|
||||
|
||||
_container = container;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake((50), (50)));
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.leading.mas_equalTo(self.contentView).offset((15));
|
||||
make.centerY.mas_equalTo(self.container);
|
||||
make.leading.mas_equalTo(self.container).offset((15));
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -81,9 +103,7 @@
|
||||
make.width.mas_equalTo(28);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
// [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.width.mas_lessThanOrEqualTo((100));
|
||||
// }];
|
||||
|
||||
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.stackView);
|
||||
make.top.equalTo(self.stackView.mas_bottom).mas_offset((7));
|
||||
@@ -93,8 +113,8 @@
|
||||
[self.attentionButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo((68));
|
||||
make.height.mas_equalTo((30));
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.trailing.mas_equalTo(self.contentView).offset(-(15));
|
||||
make.centerY.mas_equalTo(self.container);
|
||||
make.trailing.mas_equalTo(self.container).offset(-(15));
|
||||
}];
|
||||
|
||||
CGFloat width = 28 * 20 / 14;
|
||||
@@ -120,9 +140,9 @@
|
||||
_fansInfo = fansInfo;
|
||||
if (_fansInfo) {
|
||||
self.avatarImageView.imageUrl = _fansInfo.avatar;
|
||||
if(_fansInfo.nick.length > 5){
|
||||
_fansInfo.nick = [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]];
|
||||
}
|
||||
// if(_fansInfo.nick.length > 5){
|
||||
// _fansInfo.nick = [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]];
|
||||
// }
|
||||
self.nickLabel.text = _fansInfo.nick;
|
||||
self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : YMLocalizedString(@"XPMineFansTableViewCell0");
|
||||
if (_fansInfo.useingType != ContactUseingType_In_Room && _fansInfo.useingType != ContactUseingType_Share) {
|
||||
@@ -165,7 +185,7 @@
|
||||
if (fansInfo.userVipInfoVO && fansInfo.userVipInfoVO.friendNickColour) {
|
||||
self.nickLabel.textColor = [self colorWithHexString:fansInfo.userVipInfoVO.friendNickColour];
|
||||
} else {
|
||||
self.nickLabel.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
self.nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
} else {
|
||||
self.experImageView.hidden = YES;
|
||||
@@ -173,7 +193,7 @@
|
||||
self.nobleImageView.hidden = YES;
|
||||
self.sexImageView.hidden = YES;
|
||||
self.attentionButton.hidden = YES;
|
||||
self.nickLabel.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
self.nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,8 +242,8 @@
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_nickLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_nickLabel.font = kFontSemibold(14);
|
||||
_nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
@@ -270,8 +290,8 @@
|
||||
- (UILabel *)signLabel{
|
||||
if (!_signLabel) {
|
||||
_signLabel = [[UILabel alloc] init];
|
||||
_signLabel.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_signLabel.font = [UIFont systemFontOfSize:12];
|
||||
_signLabel.textColor = UIColorFromRGB(0x7b7b7d);
|
||||
_signLabel.font = kFontRegular(13);
|
||||
}
|
||||
return _signLabel;
|
||||
}
|
||||
|
@@ -31,6 +31,8 @@
|
||||
///签名
|
||||
@property (nonatomic,strong) UILabel *signLabel;
|
||||
|
||||
@property (nonatomic, strong) UIView *container;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -47,21 +49,42 @@
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.stackView];
|
||||
[self.contentView addSubview:self.signLabel];
|
||||
|
||||
UIView *bottomSpace = [[UIView alloc] init];
|
||||
[self.contentView addSubview:bottomSpace];
|
||||
[bottomSpace mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
UIView *container = [[UIView alloc] init];
|
||||
container.backgroundColor = [UIColor whiteColor];
|
||||
container.layer.cornerRadius = 10;
|
||||
[self.contentView addSubview:container];
|
||||
[container mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView);
|
||||
make.bottom.mas_equalTo(bottomSpace.mas_top);
|
||||
make.leading.mas_equalTo(16);
|
||||
make.trailing.mas_equalTo(-16);
|
||||
}];
|
||||
|
||||
[container addSubview:self.avatarImageView];
|
||||
[container addSubview:self.stackView];
|
||||
[container addSubview:self.signLabel];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nickLabel];
|
||||
[self.stackView addArrangedSubview:self.sexImageView];
|
||||
[self.stackView addArrangedSubview:self.experImageView];
|
||||
[self.stackView addArrangedSubview:self.charmImageView];
|
||||
|
||||
_container = container;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(50, 50));
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.leading.mas_equalTo(self.contentView).offset(15);
|
||||
make.centerY.mas_equalTo(self.container);
|
||||
make.leading.mas_equalTo(self.container).offset(15);
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -95,16 +118,14 @@
|
||||
self.nickLabel.text = _userInfo.nick;
|
||||
self.signLabel.text = _userInfo.userDesc && _userInfo.userDesc.length > 0? _userInfo.userDesc : YMLocalizedString(@"XPMineFriendTableViewCell0");
|
||||
|
||||
self.experImageView.hidden = NO;
|
||||
self.charmImageView.hidden = NO;
|
||||
self.experImageView.imageUrl = _userInfo.userLevelVo.experUrl;
|
||||
self.charmImageView.imageUrl = _userInfo.userLevelVo.charmUrl;
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
self.sexImageView.selected = _userInfo.gender != GenderType_Male;
|
||||
|
||||
|
||||
self.experImageView.hidden = NO;
|
||||
self.charmImageView.hidden = NO;
|
||||
self.experImageView.imageUrl = _userInfo.userLevelVo.experUrl;
|
||||
self.charmImageView.imageUrl = _userInfo.userLevelVo.charmUrl;
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
self.sexImageView.selected = _userInfo.gender != GenderType_Male;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +155,7 @@
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = kFontMedium(15);
|
||||
_nickLabel.font = kFontSemibold(14);
|
||||
_nickLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
}
|
||||
return _nickLabel;
|
||||
@@ -175,8 +196,8 @@
|
||||
- (UILabel *)signLabel{
|
||||
if (!_signLabel) {
|
||||
_signLabel = [[UILabel alloc] init];
|
||||
_signLabel.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_signLabel.font = kFontMedium(12);
|
||||
_signLabel.textColor = UIColorFromRGB(0x7b7b7d);
|
||||
_signLabel.font = kFontRegular(13);
|
||||
}
|
||||
return _signLabel;
|
||||
}
|
||||
|
@@ -65,10 +65,10 @@
|
||||
make.centerY.equalTo(self.bgView);
|
||||
}];
|
||||
[self.arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_offset(14);
|
||||
make.height.mas_offset(14);
|
||||
make.width.mas_offset(22);
|
||||
make.height.mas_offset(22);
|
||||
make.centerY.equalTo(self.bgView);
|
||||
make.trailing.mas_equalTo(-15);
|
||||
make.trailing.mas_equalTo(-10);
|
||||
}];
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -92,9 +92,9 @@
|
||||
self.badgeImageView.imageUrl = itemModel.centerBadge ? itemModel.centerBadge : nil;
|
||||
|
||||
[self.iconView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(12);
|
||||
make.width.mas_equalTo(25);
|
||||
make.height.mas_equalTo(25);
|
||||
make.leading.mas_equalTo(9);
|
||||
make.width.mas_equalTo(28);
|
||||
make.height.mas_equalTo(28);
|
||||
make.centerY.equalTo(self.bgView);
|
||||
}];
|
||||
}
|
||||
@@ -130,8 +130,8 @@
|
||||
- (UILabel *)titleView{
|
||||
if (!_titleView){
|
||||
_titleView = [UILabel new];
|
||||
_titleView.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
|
||||
_titleView.textColor = UIColorFromRGB(0x1F1A4E);
|
||||
_titleView.font = kFontMedium(15);
|
||||
_titleView.textColor = UIColorFromRGB(0x1E2531);
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
|
@@ -137,7 +137,7 @@
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return self.datasource.count > 0 ? 70 : self.type == ContactUseingType_In_Room ? (KScreenHeight - kNavigationHeight) : (KScreenHeight - 200 - kNavigationHeight);
|
||||
return self.datasource.count > 0 ? 92 : self.type == ContactUseingType_In_Room ? (KScreenHeight - kNavigationHeight) : (KScreenHeight - 200 - kNavigationHeight);
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
@@ -149,7 +149,7 @@
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return self.datasource.count > 0 ? 70 : self.type == ContactUseingType_In_Room ? (KScreenHeight - kNavigationHeight) : (KScreenHeight - 200 - kNavigationHeight);
|
||||
return self.datasource.count > 0 ? 92 : self.type == ContactUseingType_In_Room ? (KScreenHeight - kNavigationHeight) : (KScreenHeight - 200 - kNavigationHeight);
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
@@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return self.datasource.count > 0 ? 70 : self.type == ContactUseingType_In_Room ? (KScreenHeight - kNavigationHeight) : (KScreenHeight - 200 - kNavigationHeight);
|
||||
return self.datasource.count > 0 ? 92 : self.type == ContactUseingType_In_Room ? (KScreenHeight - kNavigationHeight) : (KScreenHeight - 200 - kNavigationHeight);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
}
|
||||
///获取开通VIP产品列表
|
||||
+ (void)getChargeList:(HttpRequestHelperCompletion)completion type:(NSString *)type {
|
||||
[self makeRequest:@"chargeprod/getVipList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, type, nil];
|
||||
// [self makeRequest:@"chargeprod/getVipList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, type, nil];
|
||||
}
|
||||
|
||||
/// 苹果下单
|
||||
|
@@ -53,7 +53,7 @@
|
||||
}];
|
||||
|
||||
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(-8);
|
||||
make.bottom.mas_equalTo(-11);
|
||||
make.leading.mas_equalTo(4);
|
||||
make.trailing.mas_equalTo(-4);
|
||||
make.height.mas_equalTo(18);
|
||||
@@ -74,8 +74,8 @@
|
||||
_coinLabel = [[UILabel alloc] init];
|
||||
_coinLabel.text = YMLocalizedString(@"XPMineTheGuildCell1");
|
||||
_coinLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_coinLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_coinLabel.textColor = UIColorFromRGB(0x78330A);
|
||||
_coinLabel.font = kFontSemibold(14);
|
||||
_coinLabel.textColor = UIColorFromRGB(0x4F3500);
|
||||
}
|
||||
return _coinLabel;
|
||||
}
|
||||
|
@@ -35,9 +35,6 @@
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.bgImageView];
|
||||
[self addSubview:self.titleLabel];
|
||||
// [self addSubview:self.backProgressView];
|
||||
// [self.backProgressView addSubview:self.currentProgressView];
|
||||
// [self.backProgressView addSubview:self.nextLevelLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -46,35 +43,17 @@
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(-8);
|
||||
make.bottom.mas_equalTo(-11);
|
||||
make.leading.mas_equalTo(4);
|
||||
make.trailing.mas_equalTo(-4);
|
||||
make.height.mas_equalTo(18);
|
||||
}];
|
||||
|
||||
// [self.backProgressView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.leading.trailing.mas_equalTo(self).inset(12);
|
||||
// make.height.mas_equalTo(10);
|
||||
// make.bottom.mas_equalTo(-5);
|
||||
// }];
|
||||
// [self.currentProgressView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.leading.top.bottom.mas_equalTo(self.backProgressView);
|
||||
// make.width.mas_equalTo(0);
|
||||
// }];
|
||||
// [self.nextLevelLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.trailing.mas_equalTo(-4);
|
||||
// make.centerY.mas_equalTo(self.backProgressView);
|
||||
// }];
|
||||
|
||||
}
|
||||
|
||||
- (void)setVipInfo:(NobleInfo *)vipInfo {
|
||||
_vipInfo = vipInfo;
|
||||
if (vipInfo) {
|
||||
self.titleLabel.text = vipInfo.vipName;
|
||||
// self.titleLabel.textColor = UIColorFromRGB(0x403077);
|
||||
// self.bgImageView.image = [UIImage imageNamed:@"mine_noble_entrance_hadNoble"];
|
||||
// [self setNobleInfoData:self.nobleInfo];
|
||||
}
|
||||
}
|
||||
-(void)setNobleInfoData:(NobleCenterModel *)nobleInfo{
|
||||
@@ -111,8 +90,8 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = UIColorFromRGB(0x78330A);
|
||||
_titleLabel.font = kFontSemibold(14);
|
||||
_titleLabel.textColor = UIColorFromRGB(0x4F3500);
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.text = YMLocalizedString(@"XPMineTheGuildCell2");
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#import "YuMi-swift.h"
|
||||
#import "XPWebViewController.h"
|
||||
#import "XPIAPRechargeViewController.h"
|
||||
#import "XPNobleSettingViewController.h"
|
||||
|
||||
#import "Api+Main.h"
|
||||
#import "Api+NobleCenter.h"
|
||||
@@ -74,10 +75,6 @@
|
||||
}
|
||||
|
||||
- (void)handleTapCardGesture {
|
||||
// if (_didTapCard) {
|
||||
// _didTapCard(self.index);
|
||||
// }
|
||||
|
||||
XPNobleAuthorityDescView *alertView = [[XPNobleAuthorityDescView alloc] initWithFrame:CGRectMake(0, 0, 300, 286)];
|
||||
alertView.vipInfo = self.info;
|
||||
TTPopupService * config = [[TTPopupService alloc] init];
|
||||
@@ -148,7 +145,7 @@
|
||||
|
||||
[self addSubview:self.imageView];
|
||||
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.leading.right.mas_equalTo(self);
|
||||
make.top.leading.trailing.mas_equalTo(self);
|
||||
make.height.mas_equalTo(kGetScaleWidth(90));
|
||||
}];
|
||||
|
||||
@@ -238,7 +235,7 @@
|
||||
textColor:[DJDKMIMOMColor colorWithHexString:@"#4d1c1c"]];
|
||||
[self.contentView addSubview:_statusLabel];
|
||||
[_statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(18);
|
||||
make.left.mas_equalTo(18);
|
||||
make.bottom.mas_equalTo(-26);
|
||||
make.height.mas_equalTo(18);
|
||||
}];
|
||||
@@ -247,20 +244,18 @@
|
||||
_placeHolderImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[self.contentView addSubview:_placeHolderImageView];
|
||||
[_placeHolderImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-13);
|
||||
make.right.mas_equalTo(-13);
|
||||
make.bottom.mas_equalTo(-25);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(130));
|
||||
}];
|
||||
|
||||
_vapView = [[VAPView alloc] init];
|
||||
_vapView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
|
||||
NSInteger offset = 0;
|
||||
[self.contentView addSubview:_vapView];
|
||||
[_vapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(_placeHolderImageView);
|
||||
make.bottom.mas_equalTo(_placeHolderImageView).offset(offset/2);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(130 + offset));
|
||||
make.bottom.mas_equalTo(_placeHolderImageView).offset(0);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(130));
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -271,44 +266,32 @@
|
||||
[self.levelBgImageView setImage:image];
|
||||
}
|
||||
|
||||
- (void)setPlaceHolderPath:(NSString *)placeHolderPath {
|
||||
self.placeHolderImageView.imageUrl = [placeHolderPath stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
}
|
||||
|
||||
- (void)setDueDate:(NSString *)dateStr {
|
||||
self.statusLabel.text = dateStr;
|
||||
}
|
||||
|
||||
- (void)setSvgaPath:(NSString *)svgaPath {
|
||||
_svgaPath = [svgaPath stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
if (svgaPath.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: 这个缓存判断没有实际用途,fileName 对不上
|
||||
NSString *encodingUrl = [_svgaPath stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
|
||||
// NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject];
|
||||
// NSString *GiftDynamicEffectListPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"];
|
||||
// NSString *fullPath = [GiftDynamicEffectListPath stringByAppendingPathComponent:fileName];
|
||||
// if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){
|
||||
// _svgaPath = fullPath;
|
||||
// [self.vapView setMute:NO];
|
||||
// [self.vapView playHWDMP4:_svgaPath repeatCount:1 delegate:self];
|
||||
// } else {
|
||||
@kWeakify(self);
|
||||
[self.vapParser parseWithURL:encodingUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
@kStrongify(self);
|
||||
if (videoUrl.length) {
|
||||
[self.vapView setMute:YES];
|
||||
[self.vapView playHWDMP4:videoUrl repeatCount:-1 delegate:self];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
// }
|
||||
@kWeakify(self);
|
||||
[self.vapParser parseWithURL:encodingUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
@kStrongify(self);
|
||||
if (videoUrl.length) {
|
||||
[self.vapView setMute:YES];
|
||||
[self.vapView playHWDMP4:videoUrl repeatCount:-1 delegate:self];
|
||||
self.placeHolderImageView.hidden = YES;
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
|
||||
|
||||
// @kWeakify(self);
|
||||
// SVGAParser *parser = [[SVGAParser alloc] init];
|
||||
// [parser parseWithURL:[NSURL URLWithString:svgaPath]
|
||||
// completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
// @kStrongify(self);
|
||||
// self.svgaImageView.videoItem = videoItem;
|
||||
// [self.svgaImageView startAnimation];
|
||||
// self.placeHolderImageView.hidden = YES;
|
||||
// }
|
||||
// failureBlock:^(NSError * _Nullable error) {}];
|
||||
}
|
||||
|
||||
- (XPRoomGiftAnimationParser *)vapParser {
|
||||
@@ -321,38 +304,18 @@
|
||||
#pragma mark - HWDMP4PlayDelegate
|
||||
//即将开始播放时询问,true马上开始播放,false放弃播放
|
||||
- (BOOL)shouldStartPlayMP4:(VAPView *)container config:(QGVAPConfigModel *)config {
|
||||
// CGFloat width = config.info.size.width;
|
||||
// CGFloat height = config.info.size.height;
|
||||
//
|
||||
// container.center = self.center;
|
||||
// [container mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.width.mas_equalTo(KScreenWidth);
|
||||
// make.height.mas_equalTo(KScreenWidth * height / width);
|
||||
// }];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)viewDidFinishPlayMP4:(NSInteger)totalFrameCount view:(VAPView *)container {
|
||||
// dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// container.hidden = YES;
|
||||
// if (container == self.vapView) {
|
||||
// [self.vapView removeFromSuperview];
|
||||
// self.vapView = nil;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
- (void)viewDidStopPlayMP4:(NSInteger)lastFrameIndex view:(VAPView *)container {
|
||||
// dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// container.hidden = YES;
|
||||
// if (container == self.vapView) {
|
||||
// [self.vapView removeFromSuperview];
|
||||
// self.vapView = nil;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
- (void)viewDidFailPlayMP4:(NSError *)error{
|
||||
//
|
||||
self.placeHolderImageView.hidden = NO;
|
||||
}
|
||||
|
||||
|
||||
@@ -364,6 +327,7 @@
|
||||
@property (nonatomic, strong) UIButton *backButton;
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
@property (nonatomic, strong) UIButton *helpButton;
|
||||
@property (nonatomic, strong) UIButton *settingButton;
|
||||
|
||||
@property (nonatomic, strong) TYCyclePagerView *vipCardCyclePager;
|
||||
|
||||
@@ -376,9 +340,9 @@
|
||||
@property (nonatomic, strong) NobleInfo *currentVIPInfo;
|
||||
@property (nonatomic, strong) NobleCenterModel *vipModel;
|
||||
@property (nonatomic, strong) WalletInfoModel *walletInfo;
|
||||
@property(nonatomic,strong) RechargeListModel *rechargeModel;
|
||||
//@property(nonatomic,strong) RechargeListModel *rechargeModel;
|
||||
|
||||
@property (nonatomic, copy) NSArray <RechargeListModel *> *rechargeList;
|
||||
//@property (nonatomic, copy) NSArray <RechargeListModel *> *rechargeList;
|
||||
@property (nonatomic, copy) NSArray <VIPExclusivePrivilegesCard *> *exclusivePrivilegesCards;
|
||||
|
||||
@property (nonatomic, strong) UIStackView *identificationStack;
|
||||
@@ -423,8 +387,6 @@
|
||||
return [[XPNobleCenterPresenter alloc] init];
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark - Setup
|
||||
- (void)setupNIM {
|
||||
[[NIMSDK sharedSDK].systemNotificationManager addDelegate:self];
|
||||
@@ -465,6 +427,7 @@
|
||||
[self.view addSubview:self.titleLabel];
|
||||
[self.view addSubview:self.backButton];
|
||||
[self.view addSubview:self.helpButton];
|
||||
[self.view addSubview:self.settingButton];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
@@ -483,6 +446,12 @@
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
}];
|
||||
|
||||
[self.settingButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(self.helpButton.mas_leading).offset(-16);
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setupScrollContent {
|
||||
@@ -501,7 +470,7 @@
|
||||
}
|
||||
|
||||
- (void)setupVipIdentificationArea {
|
||||
UILabel *titleLabel = [UILabel labelInitWithText:@"Identification"
|
||||
UILabel *titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"VipCenter_4")
|
||||
font:kFontBold(16)
|
||||
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
|
||||
[self.scrollContentView addSubview:titleLabel];
|
||||
@@ -589,7 +558,7 @@
|
||||
- (void)setupExclusivePrivilegesArea {
|
||||
UIStackView *titlesStack = [[UIStackView alloc] init];
|
||||
titlesStack.axis = UILayoutConstraintAxisVertical;
|
||||
UILabel *titleLabel = [UILabel labelInitWithText:@"Exclusive Privileges"
|
||||
UILabel *titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"VipCenter_3")
|
||||
font:kFontBold(16)
|
||||
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
|
||||
[titlesStack addArrangedSubview:titleLabel];
|
||||
@@ -628,7 +597,7 @@
|
||||
|
||||
[self.scrollContentView addSubview:self.exclusivePrivilegesStack];
|
||||
[self.exclusivePrivilegesStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(titleLabel.mas_bottom).offset(22);
|
||||
make.top.mas_equalTo(titlesStack.mas_bottom).offset(22);
|
||||
make.leading.trailing.mas_equalTo(self.scrollContentView);
|
||||
make.bottom.mas_equalTo(self.scrollContentView).offset(-80);
|
||||
}];
|
||||
@@ -652,7 +621,7 @@
|
||||
}];
|
||||
|
||||
UIButton *purchaseButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[purchaseButton setTitle:@"Renew"
|
||||
[purchaseButton setTitle:YMLocalizedString(@"VipCenter_2")
|
||||
forState:UIControlStateNormal];
|
||||
[purchaseButton setTitleColor:[DJDKMIMOMColor colorWithHexString:@"#633000"]
|
||||
forState:UIControlStateNormal];
|
||||
@@ -699,6 +668,10 @@
|
||||
#pragma mark - Config & Update UI
|
||||
- (void)configVIPCards {
|
||||
[self.vipCardCyclePager reloadData];
|
||||
|
||||
if (self.userVIPInfo) {
|
||||
[self.vipCardCyclePager scrollToItemAtIndex:self.userVIPInfo.vipLevel-1 animate:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)configIdentificationCards {
|
||||
@@ -791,24 +764,20 @@
|
||||
}
|
||||
|
||||
- (void)updatePurchaseArea {
|
||||
if (self.rechargeList.count == 0 || self.userInfo == nil) {
|
||||
if (self.userInfo == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.currentVIPInfo.buyAmount == 0) {
|
||||
self.purchaseNoticeLabel.text = [NSString stringWithFormat:@"VIP%ld is only through activity", self.currentVIPInfo.vipLevel];
|
||||
self.purchaseNoticeLabel.text = [NSString stringWithFormat:YMLocalizedString(@"VipCenter_7"), self.currentVIPInfo.vipLevel];
|
||||
self.purchaseNoticeLabel.hidden = NO;
|
||||
self.purchaseContainer.hidden = YES;
|
||||
} else {
|
||||
self.purchaseNoticeLabel.hidden = YES;
|
||||
self.purchaseContainer.hidden = NO;
|
||||
self.purchasePriceLabel.text = [NSString stringWithFormat:@"%ld/30Days", self.currentVIPInfo.buyAmount];
|
||||
self.purchasePriceLabel.text = [NSString stringWithFormat:@"%ld/30 %@", self.currentVIPInfo.buyAmount, YMLocalizedString(@"VipCenter_0")];
|
||||
|
||||
if (self.userVIPInfo.vipLevel >= self.vipCardCyclePager.curIndex+1) {
|
||||
self.purchaseExpiresLabel.text = [NSString stringWithFormat:@"%@ Expires", [self calNextVIPExpiredSeconds:self.vipModel.remainSeconds]];
|
||||
} else {
|
||||
self.purchaseExpiresLabel.text = [NSString stringWithFormat:@"%@ Expires", [self calNext30Day]];
|
||||
}
|
||||
self.purchaseExpiresLabel.text = [NSString stringWithFormat:@"%@ %@", [self calNext30Day], YMLocalizedString(@"VipCenter_1")];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,7 +785,7 @@
|
||||
NSDate *date = [NSDate date];
|
||||
NSDate *nextDate = [date dateByAddingSeconds:seconds];
|
||||
return [NSDate timestampSwitchTime:nextDate.timeIntervalSince1970
|
||||
formatter:@"yyyy/MM/dd 00:00"];
|
||||
formatter:@"yyyy-MM-dd"];
|
||||
}
|
||||
|
||||
- (NSString *)calNext30Day {
|
||||
@@ -830,7 +799,6 @@
|
||||
- (void)setupData {
|
||||
[self loadUserInfo];
|
||||
[self loadWalletInfo];
|
||||
[self loadVIPProductsInfo];
|
||||
}
|
||||
|
||||
- (void)loadUserInfo {
|
||||
@@ -842,28 +810,15 @@
|
||||
UserInfoModel *infoModel = [UserInfoModel modelWithDictionary:data.data];
|
||||
self.userInfo = infoModel;
|
||||
self.userVIPInfo = infoModel.userVipInfoVO;
|
||||
|
||||
self.settingButton.hidden = self.userVIPInfo.vipLevel < 9;
|
||||
|
||||
[self loadVIPCenterInfo];
|
||||
[self updatePurchaseArea];
|
||||
|
||||
if (self.userVIPInfo) {
|
||||
[self.vipCardCyclePager scrollToItemAtIndex:self.userVIPInfo.vipLevel-1 animate:NO];
|
||||
}
|
||||
}
|
||||
} uid:uid];
|
||||
}
|
||||
|
||||
- (void)loadVIPProductsInfo {
|
||||
@kWeakify(self);
|
||||
[Api getChargeList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if(code == 200){
|
||||
NSArray *list = [RechargeListModel modelsWithArray:data.data];
|
||||
self.rechargeList = list;
|
||||
[self updatePurchaseArea];
|
||||
}
|
||||
} type:@"9"];
|
||||
}
|
||||
|
||||
- (void)loadWalletInfo {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
@@ -922,6 +877,17 @@
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)didTapSetting {
|
||||
XPNobleSettingViewController * settingVC =[[XPNobleSettingViewController alloc] init];
|
||||
settingVC.enterHide = self.userInfo.userVipInfoVO.enterHide;
|
||||
@kWeakify(self);
|
||||
settingVC.didUpdateEnterHideBlock = ^{
|
||||
@kStrongify(self);
|
||||
self.userInfo.userVipInfoVO.enterHide = !self.userInfo.userVipInfoVO.enterHide;
|
||||
};
|
||||
[self.navigationController pushViewController:settingVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)didTapPurchaseButton {
|
||||
if (self.userInfo.userVipInfoVO.vipLevel > 0) {
|
||||
XPNobleCenterWindow *window = [[XPNobleCenterWindow alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
@@ -969,6 +935,20 @@
|
||||
NobleInfo *info = [self.vipModel.vipInfos xpSafeObjectAtIndex:index];
|
||||
if (info) {
|
||||
cell.svgaPath = info.vipLogo;
|
||||
[cell setPlaceHolderPath:info.vipIcon];
|
||||
|
||||
if (self.userVIPInfo) {
|
||||
if (self.userVIPInfo.vipLevel - 1 > index) {
|
||||
[cell setDueDate:@""];
|
||||
} else if (self.userVIPInfo.vipLevel - 1 == index) {
|
||||
[cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_6"), [self calNextVIPExpiredSeconds:self.vipModel.remainSeconds]]];
|
||||
} else {
|
||||
[cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_5"), index + 1]];
|
||||
}
|
||||
} else {
|
||||
// TODO: 没有 VIP 或者 等级不够,显示 Not obtained VIP
|
||||
[cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_5"), index + 1]];
|
||||
}
|
||||
}
|
||||
}
|
||||
return cell;
|
||||
@@ -986,12 +966,7 @@
|
||||
#pragma mark - XPNobleCenterPayViewDelegate
|
||||
- (void)payWithType:(NobleCenterPayType)type vipLevel:(NSString * _Nullable)vipLevel{
|
||||
if(type == NobleCenterPayType_diamond){
|
||||
// NSString *roomUid = self.roomUid > 0 ? @(self.roomUid).stringValue : @(self.userInfo.uid).stringValue;
|
||||
[self.presenter openVipWithDiamondRoomUid:@(self.userInfo.uid).stringValue vipLevel:vipLevel];
|
||||
} else {
|
||||
[XNDJTDDLoadingTool showOnlyView:kWindow];
|
||||
[self.presenter requestNobleIAPRechargeOrderWithChargeProdId:self.rechargeModel.chargeProdId
|
||||
roomUid:@""];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1006,7 +981,6 @@
|
||||
config.message = YMLocalizedString(@"XPNobleCenterViewController3");
|
||||
config.actionStyle = TTAlertActionBothStyle;
|
||||
[TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{
|
||||
|
||||
XPIAPRechargeViewController * webVC =[[XPIAPRechargeViewController alloc] init];
|
||||
webVC.type = @"4";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
@@ -1016,173 +990,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId uuid:(NSString *)uuid {
|
||||
if (orderId.length > 0) {
|
||||
self.orderId = orderId;
|
||||
if (@available(iOS 15.0, *)) {
|
||||
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) { }];
|
||||
@kWeakify(self);
|
||||
iap.ConditionBlock = ^(enum StoreConditionResult state, NSDictionary<NSString *,id> * _Nullable result) {
|
||||
@kStrongify(self);
|
||||
[self rechargeNewProcessStatus:state];
|
||||
switch (state) {
|
||||
case StoreConditionResultVerifiedServer: {
|
||||
NSString *transactionId = result[@"transactionId"];
|
||||
[self rechargeSuccess:transactionId];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
} else {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController10")];
|
||||
}
|
||||
} else {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)requestIAPRechargeOrderFail:(NSString *)message code:(NSInteger)code {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
|
||||
if(code == 50000){
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc]init];
|
||||
config.title = YMLocalizedString(@"XPIAPRechargeViewController7");
|
||||
config.message = YMLocalizedString(@"XPIAPRechargeViewController8");
|
||||
TTAlertButtonConfig *confirmButtonConfig = [[TTAlertButtonConfig alloc]init];
|
||||
confirmButtonConfig.title = YMLocalizedString(@"XPIAPRechargeViewController9");
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x13E2F5),UIColorFromRGB(0x9DB4FF),UIColorFromRGB(0xCC67FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(200, 200)];
|
||||
confirmButtonConfig.backgroundColor = [UIColor colorWithPatternImage:image];
|
||||
confirmButtonConfig.cornerRadius = 38/2;
|
||||
config.confirmButtonConfig = confirmButtonConfig;
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
[self.presenter getContactCustomerService];
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
} else {
|
||||
[self showErrorToast:message];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPIAPHelperDelegate
|
||||
///当前充值的状态
|
||||
- (void)rechargeNewProcessStatus:(StoreConditionResult)status {
|
||||
@kWeakify(self);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@kStrongify(self);
|
||||
if (status == StoreConditionResultUnowned) {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController1")];
|
||||
}else{
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController0")];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
///充值成功回调id
|
||||
- (void)rechargeSuccess:(NSString *)transactionIdentifier {
|
||||
///保存唯一凭证
|
||||
[self saveRechageReciptWithTransactionIdentifier:transactionIdentifier];
|
||||
///二次验证
|
||||
[self.presenter checkReceiptWithOrderId:self.orderId transcationId:transactionIdentifier errorToast:YES];
|
||||
}
|
||||
|
||||
///充值成功之后保存订单到钥匙串
|
||||
- (void)saveRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSData *receipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
|
||||
NSString *encodeStr = [receipt base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
|
||||
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
|
||||
if(transactionIdentifier != nil){
|
||||
[dictionary setObject:transactionIdentifier forKey:@"transcationId"];
|
||||
}
|
||||
if(encodeStr != nil){
|
||||
[dictionary setObject:encodeStr forKey:@"recipt"];
|
||||
}
|
||||
if(self.orderId != nil){
|
||||
[dictionary setObject:self.orderId forKey:@"orderId"];
|
||||
}
|
||||
if(dictionary.allKeys.count == 0)return;
|
||||
NSString *reciptJson = [dictionary toJSONString];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL saveSuccess = [RechargeStorage saveTranscationId:transactionIdentifier recipt:reciptJson uid:uid];
|
||||
if (!saveSuccess) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
///二次校验成功
|
||||
- (void)checkReceiptSuccess:(NSString *)transcationId {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
[self deleteRechageReciptWithTransactionIdentifier:transcationId];
|
||||
self.orderId = nil;
|
||||
//5秒之后如果没有收到开通成功的云信消息,则请求一次用户信息
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
if (!self.userInfo.userVipInfoVO) {
|
||||
///刷新一下用户的信息
|
||||
[self setupData];
|
||||
}
|
||||
});
|
||||
}
|
||||
- (void)checkReceiptFailWithCode:(NSInteger)code transcationId:(NSString *)transcationId{
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
if(code == 1444){
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
[self deleteRechageReciptWithTransactionIdentifier:transcationId];
|
||||
}
|
||||
}
|
||||
///删除本地保存的
|
||||
- (void)deleteRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL deleteSuccess = [RechargeStorage delegateTranscationId:transactionIdentifier uid:uid];
|
||||
if (deleteSuccess) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (void)checkTranscationIdsSuccess {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[RechargeStorage delegateAllTranscationIdsWithUid:uid];
|
||||
}
|
||||
|
||||
#pragma mark -NIMSystemNotificationManagerDelegate
|
||||
- (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification {
|
||||
if (notification.receiverType == NIMSessionTypeP2P) {
|
||||
if (notification.content != nil) {
|
||||
NSData *jsonData = [notification.content dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSError *err;
|
||||
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&err];
|
||||
if(err) {
|
||||
NSLog(@"json解析失败:%@",err);
|
||||
return;
|
||||
}
|
||||
if ([dic[@"first"] intValue] == CustomMessageType_Noble_VIP &&
|
||||
[dic[@"second"] intValue] == Custom_Message_Sub_Open_Noble_Success) { // 开通VIP成功
|
||||
[self setupData];
|
||||
// MARK: iOS 没有弹窗
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (UIButton *)backButton {
|
||||
if (!_backButton) {
|
||||
_backButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
@@ -1207,6 +1015,19 @@
|
||||
return _helpButton;
|
||||
}
|
||||
|
||||
- (UIButton *)settingButton {
|
||||
if (!_settingButton) {
|
||||
_settingButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_settingButton.hidden = YES;
|
||||
[_settingButton setImage:kImage(@"vip_center_setting")
|
||||
forState:UIControlStateNormal];
|
||||
[_settingButton addTarget:self
|
||||
action:@selector(didTapSetting)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _settingButton;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
@@ -1221,6 +1042,8 @@
|
||||
- (TYCyclePagerView *)vipCardCyclePager {
|
||||
if (!_vipCardCyclePager) {
|
||||
_vipCardCyclePager = [[TYCyclePagerView alloc] init];
|
||||
_vipCardCyclePager.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
|
||||
_vipCardCyclePager.collectionView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
|
||||
_vipCardCyclePager.backgroundColor = [UIColor clearColor];
|
||||
_vipCardCyclePager.backgroundView = nil;
|
||||
_vipCardCyclePager.layer.borderWidth = 1;
|
||||
|
@@ -40,7 +40,7 @@
|
||||
}];
|
||||
|
||||
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(-8);
|
||||
make.bottom.mas_equalTo(-11);
|
||||
make.leading.mas_equalTo(4);
|
||||
make.trailing.mas_equalTo(-4);
|
||||
make.height.mas_equalTo(18);
|
||||
@@ -65,8 +65,8 @@
|
||||
_coinLabel = [[UILabel alloc] init];
|
||||
_coinLabel.text = YMLocalizedString(@"XPIncomeRecordVC1");
|
||||
_coinLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_coinLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_coinLabel.textColor = UIColorFromRGB(0x78330A);
|
||||
_coinLabel.font = kFontSemibold(14);
|
||||
_coinLabel.textColor = UIColorFromRGB(0x4f3500);
|
||||
}
|
||||
return _coinLabel;
|
||||
}
|
||||
|
@@ -44,8 +44,6 @@
|
||||
|
||||
@property (nonatomic,strong) NetImageView *experImageView;
|
||||
@property (nonatomic,strong) NetImageView *charmImageView;
|
||||
//@property (nonatomic,strong) NetImageView *nameplateImageView;
|
||||
//@property (nonatomic,strong) UILabel *nameplateLabel;
|
||||
|
||||
///关注、粉丝的容器
|
||||
@property (nonatomic,strong) UIStackView *attentionStackView;
|
||||
@@ -94,6 +92,16 @@
|
||||
[self.attentionStackView addArrangedSubview:self.attentionView];
|
||||
[self.attentionStackView addArrangedSubview:self.fansView];
|
||||
|
||||
UIView *line = [[UIView alloc] init];
|
||||
line.backgroundColor = UIColorFromRGB(0x989898);
|
||||
line.alpha = 0.3;
|
||||
[self.attentionStackView addSubview:line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.attentionStackView);
|
||||
make.width.mas_equalTo(1);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.distribution = UIStackViewDistributionFillEqually;
|
||||
_stackView.alignment = UIStackViewAlignmentCenter;
|
||||
@@ -164,7 +172,7 @@
|
||||
make.top.equalTo(self.attentionStackView.mas_bottom).mas_offset(18);
|
||||
make.leading.mas_equalTo(14);
|
||||
make.trailing.mas_equalTo(-14);
|
||||
make.height.mas_equalTo(70);
|
||||
make.height.mas_equalTo(80);
|
||||
}];
|
||||
|
||||
[self.reviewView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
@@ -72,8 +72,6 @@
|
||||
UIKIT_EXTERN NSString *kRequestTicket;
|
||||
|
||||
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineHeadItemTableViewCellDelegate, XPMineHeadViewDelegate, XPHomeBannerTableViewCellDelegate>
|
||||
///顶部背景
|
||||
@property (nonatomic, strong) UIView *bgImageView;
|
||||
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///个人功能
|
||||
@@ -111,11 +109,20 @@ UIKIT_EXTERN NSString *kRequestTicket;
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#FCF4DF"];
|
||||
[self setupTopTheme];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
|
||||
- (void)setupTopTheme {
|
||||
UIImageView *theme = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, kGetScaleWidth(140))];
|
||||
theme.image = [UIImage imageNamed:@"home_top_bg"];
|
||||
theme.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self.view addSubview:theme];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
self.isRefreshRoomInfo = NO;
|
||||
@@ -180,7 +187,6 @@ UIKIT_EXTERN NSString *kRequestTicket;
|
||||
setItem.skipType = XPMineItemType_My_Setting;
|
||||
[self.functionArray addObject:setItem];
|
||||
|
||||
[self.view addSubview:self.bgImageView];
|
||||
[self.view addSubview:self.tableView];
|
||||
// [self.view addSubview:self.settingButton];
|
||||
self.tableView.tableHeaderView = self.headView;
|
||||
@@ -190,11 +196,6 @@ UIKIT_EXTERN NSString *kRequestTicket;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.mas_equalTo(0);
|
||||
make.height.mas_equalTo(kGetScaleWidth(223));
|
||||
}];
|
||||
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view);
|
||||
make.leading.trailing.bottom.mas_equalTo(self.view);
|
||||
@@ -746,21 +747,13 @@ UIKIT_EXTERN NSString *kRequestTicket;
|
||||
|
||||
- (XPMineHeadView *)headView {
|
||||
if (!_headView) {
|
||||
CGFloat height = 110;
|
||||
CGFloat height = 120;
|
||||
_headView = [[XPMineHeadView alloc] initWithFrame:CGRectMake(0, 0,KScreenWidth , 146 + height + kStatusBarHeight)];
|
||||
_headView.delegate = self;
|
||||
}
|
||||
return _headView;
|
||||
}
|
||||
|
||||
- (UIView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Login_top_bg"]];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
||||
- (NSMutableArray<XPMineFunctionItemModel *> *)functionArray {
|
||||
if (!_functionArray) {
|
||||
_functionArray = [NSMutableArray array];
|
||||
|