移植十二星主的内容
This commit is contained in:
@@ -72,6 +72,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 请求福袋全服礼物全服记录
|
||||
/// @param complection 完成
|
||||
+ (void)requestLuckGiftServerBagRecord:(HttpRequestHelperCompletion)complection;
|
||||
|
||||
/// 请求星座礼物信息
|
||||
+ (void)requestTwelveStarFirst:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import "Api+Gift.h"
|
||||
|
||||
#import "NSMutableDictionary+Saft.h"
|
||||
@implementation Api (Gift)
|
||||
|
||||
|
||||
@@ -81,4 +81,11 @@
|
||||
[self makeRequest:@"anchorFansTeam/sendJoinTeamGift" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, targetUids, giftNum, sendType, giftId, giftSource, giftType, roomUid, msg, uid, nil];
|
||||
}
|
||||
|
||||
/// 请求星座礼物信息
|
||||
+ (void)requestTwelveStarFirst:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid {
|
||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||
[params safeSetObject:roomUid forKey:@"roomUid"];
|
||||
[HttpRequestHelper request:@"twelveStar/getLastRankFirst" method:HttpRequestHelperMethodGET params:params completion:completion];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// GiftTwelveStarFirstModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/12/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GiftTwelveStarFirstModel : NSObject
|
||||
@property (nonatomic, copy) NSString *avatar;
|
||||
@property (nonatomic, copy) NSString *erbanNo;
|
||||
@property (nonatomic, copy) NSString *markUrl;
|
||||
@property (nonatomic, copy) NSString *nick;
|
||||
@property (nonatomic, copy) NSString *twelveStarName;
|
||||
@property (nonatomic, copy) NSString *uid;
|
||||
@property (nonatomic, assign) NSInteger gender;
|
||||
@property (nonatomic, copy) NSString *twelveId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// GiftTwelveStarFirstModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/12/7.
|
||||
//
|
||||
|
||||
#import "GiftTwelveStarFirstModel.h"
|
||||
|
||||
@implementation GiftTwelveStarFirstModel
|
||||
|
||||
@end
|
@@ -43,6 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///全服福袋记录记录
|
||||
- (void)luckyGiftBroadcastRecord;
|
||||
|
||||
///星座礼物
|
||||
- (void)getTwelveStarLastRankFirst:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#import "GiftReceiveInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
#import "GiftLuckyBroadcastModel.h"
|
||||
#import "GiftTwelveStarFirstModel.h"
|
||||
///P
|
||||
#import "XPGiftProtocol.h"
|
||||
|
||||
@@ -146,4 +147,12 @@
|
||||
}]];
|
||||
}
|
||||
|
||||
///获取十二星座礼物banner
|
||||
- (void)getTwelveStarLastRankFirst:(NSString *)roomUid {
|
||||
[Api requestTwelveStarFirst:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
GiftTwelveStarFirstModel * model = [GiftTwelveStarFirstModel modelWithDictionary:data.data];
|
||||
[[self getView] getTwelveStarLastRankFirstSuccess:model];
|
||||
}] roomUid:roomUid];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class WalletInfoModel, GiftInfoModel, GiftReceiveInfoModel, UserInfoModel;
|
||||
@class WalletInfoModel, GiftInfoModel, GiftReceiveInfoModel, UserInfoModel, GiftTwelveStarFirstModel;
|
||||
@protocol XPGiftProtocol <NSObject>
|
||||
///获取用户信息成功
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo;
|
||||
@@ -30,6 +30,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
///获取全服福袋礼物记录
|
||||
- (void)luckyGiftBroadcastRecordSuccess:(NSArray *)records;
|
||||
|
||||
///获取周星礼物成功
|
||||
- (void)getTwelveStarLastRankFirstSuccess:(GiftTwelveStarFirstModel *)model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -33,9 +33,6 @@ typedef NS_ENUM(NSInteger, GiftSegmentType) {
|
||||
///点击了某个item
|
||||
- (void)xPGiftInfoView:(XPGiftInfoView *)view didClickItem:(GiftInfoModel *)info type:(GiftSegmentType)type;
|
||||
|
||||
///点击了某个周星礼物
|
||||
- (void)xpGiftInfoViewDidClickWeekStarGift:(GiftInfoModel *)info;
|
||||
|
||||
@end
|
||||
|
||||
@interface XPGiftInfoView : UIView
|
||||
|
@@ -266,11 +266,6 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
|
||||
giftInfo.sourceType = GiftSourceType_Normal;
|
||||
}
|
||||
giftInfo.isSelected = YES;
|
||||
if (self.segmentType == GiftSegmentType_WeekStar) {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xpGiftInfoViewDidClickWeekStarGift:)]) {
|
||||
[self.delegate xpGiftInfoViewDidClickWeekStarGift:giftInfo];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 根据礼物id查找
|
||||
@@ -644,7 +639,7 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
|
||||
- (UIButton *)weekStarButton {
|
||||
if (!_weekStarButton) {
|
||||
_weekStarButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_weekStarButton setTitle:@"周星" forState:UIControlStateNormal];
|
||||
[_weekStarButton setTitle:@"星座礼物" forState:UIControlStateNormal];
|
||||
[_weekStarButton setTitleColor:[ThemeColor giftSegmentSelectTitleColor] forState:UIControlStateSelected];
|
||||
[_weekStarButton setTitleColor:[ThemeColor giftSegmentNormalTitleColor] forState:UIControlStateNormal];
|
||||
_weekStarButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];
|
||||
|
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// XPGiftTwelveStarBroadcastView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/12/7.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class GiftTwelveStarFirstModel, XPGiftTwelveStarBroadcastView;
|
||||
|
||||
@protocol XPGiftTwelveStarBroadcastViewDelegate <NSObject>
|
||||
|
||||
- (void)xPGiftTwelveStarBroadcastView:(XPGiftTwelveStarBroadcastView *)view didClickDetail:(UIButton *)sender;
|
||||
@end
|
||||
|
||||
@interface XPGiftTwelveStarBroadcastView : UIView
|
||||
|
||||
@property (nonatomic, strong) GiftTwelveStarFirstModel *giftInfo;
|
||||
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPGiftTwelveStarBroadcastViewDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,248 @@
|
||||
//
|
||||
// XPGiftTwelveStarBroadcastView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/12/7.
|
||||
//
|
||||
|
||||
#import "XPGiftTwelveStarBroadcastView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "TTPopup.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "XPWebViewController.h"
|
||||
#import "XPHtmlUrl.h"
|
||||
#import "NetImageView.h"
|
||||
///Model
|
||||
#import "GiftTwelveStarFirstModel.h"
|
||||
|
||||
@interface XPGiftTwelveStarBroadcastView()
|
||||
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
///背景
|
||||
@property (nonatomic, strong) UIImageView *bgImageView;
|
||||
///活动入口
|
||||
@property (nonatomic, strong) UIButton *weekStarButton;
|
||||
///魅力头像
|
||||
@property (nonatomic, strong) NetImageView *iconImageView;
|
||||
///贡献头像
|
||||
@property (nonatomic, strong) NetImageView *avatarImageView;
|
||||
///魅力标题
|
||||
@property (nonatomic, strong) UILabel *charmLabel;
|
||||
///贡献标题
|
||||
@property (nonatomic, strong) UILabel *contributeLabel;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *sexImageView;
|
||||
|
||||
@property (nonatomic, strong) UILabel *desLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPGiftTwelveStarBroadcastView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.bgImageView];
|
||||
[self addSubview:self.mainView];
|
||||
[self.mainView addSubview:self.weekStarButton];
|
||||
[self.mainView addSubview:self.iconImageView];
|
||||
[self.mainView addSubview:self.avatarImageView];
|
||||
[self.mainView addSubview:self.charmLabel];
|
||||
[self.mainView addSubview:self.sexImageView];
|
||||
[self.mainView addSubview:self.contributeLabel];
|
||||
[self.mainView addSubview:self.desLabel];
|
||||
|
||||
self.iconImageView.hidden = YES;
|
||||
self.avatarImageView.hidden = YES;
|
||||
self.charmLabel.hidden = YES;
|
||||
self.contributeLabel.hidden = YES;
|
||||
self.sexImageView.hidden = YES;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.width.mas_equalTo(355);
|
||||
make.top.bottom.mas_equalTo(self);
|
||||
}];
|
||||
[self.mainView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.bgImageView);
|
||||
make.height.mas_equalTo(36);
|
||||
make.bottom.mas_equalTo(0);
|
||||
}];
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.mainView).mas_offset(33);
|
||||
make.width.height.mas_equalTo(30);
|
||||
make.centerY.mas_equalTo(self.mainView);
|
||||
}];
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.iconImageView.mas_right).mas_offset(8);
|
||||
make.width.height.mas_equalTo(24);
|
||||
make.centerY.mas_equalTo(self.mainView);
|
||||
}];
|
||||
[self.charmLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(14);
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY);
|
||||
make.left.mas_equalTo(self.avatarImageView.mas_right).mas_offset(8);
|
||||
}];
|
||||
|
||||
[self.contributeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(14);
|
||||
make.top.mas_equalTo(self.charmLabel.mas_bottom);
|
||||
make.left.mas_equalTo(self.charmLabel);
|
||||
}];
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(10);
|
||||
make.left.mas_equalTo(self.contributeLabel.mas_right).mas_offset(2);
|
||||
make.centerY.mas_equalTo(self.contributeLabel);
|
||||
}];
|
||||
[self.weekStarButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(18);
|
||||
make.centerY.mas_equalTo(self.mainView);
|
||||
make.right.mas_equalTo(self.mainView).mas_offset(-25);
|
||||
make.width.mas_equalTo(64);
|
||||
}];
|
||||
[self.desLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.mainView);
|
||||
make.left.mas_equalTo(self.mainView).mas_offset(54);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
- (void)playButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftTwelveStarBroadcastView:didClickDetail:)]) {
|
||||
[self.delegate xPGiftTwelveStarBroadcastView:self didClickDetail:sender];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setGiftInfo:(GiftTwelveStarFirstModel *)giftInfo {
|
||||
if (giftInfo.nick) {
|
||||
self.iconImageView.imageUrl = giftInfo.markUrl;
|
||||
self.avatarImageView.imageUrl = giftInfo.avatar;
|
||||
self.charmLabel.text = [NSString stringWithFormat:@"上期星座月%@星主", giftInfo.twelveStarName];
|
||||
self.contributeLabel.text = giftInfo.nick;
|
||||
NSString *imageName = giftInfo.gender == 1 ? @"common_sex_male" : @"common_sex_female";
|
||||
self.sexImageView.image = [UIImage imageNamed:imageName];
|
||||
self.iconImageView.hidden = NO;
|
||||
self.avatarImageView.hidden = NO;
|
||||
self.charmLabel.hidden = NO;
|
||||
self.contributeLabel.hidden = NO;
|
||||
self.sexImageView.hidden = NO;
|
||||
self.desLabel.hidden = YES;
|
||||
} else {
|
||||
self.iconImageView.hidden = YES;
|
||||
self.avatarImageView.hidden = YES;
|
||||
self.charmLabel.hidden = YES;
|
||||
self.contributeLabel.hidden = YES;
|
||||
self.sexImageView.hidden = YES;
|
||||
self.desLabel.hidden = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIView *)mainView {
|
||||
if (!_mainView) {
|
||||
_mainView = [[UIView alloc] init];
|
||||
}
|
||||
return _mainView;
|
||||
}
|
||||
|
||||
- (UIImageView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[UIImageView alloc] init];
|
||||
_bgImageView.image = [UIImage imageNamed:@"gift_constellationBanner_bg"];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_bgImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_iconImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_iconImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)charmLabel {
|
||||
if (!_charmLabel) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||
label.textColor = UIColorFromRGB(0xFDE19B);
|
||||
label.text = @"上期星座月天蝎座星主";
|
||||
_charmLabel = label;
|
||||
}
|
||||
return _charmLabel;
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 12;
|
||||
_avatarImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)contributeLabel {
|
||||
if (!_contributeLabel) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.font = [UIFont systemFontOfSize:10];
|
||||
label.textColor = [UIColor whiteColor];
|
||||
label.text = @"昵称";
|
||||
_contributeLabel = label;
|
||||
}
|
||||
return _contributeLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)weekStarButton {
|
||||
if (!_weekStarButton) {
|
||||
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
button.backgroundColor = UIColorRGBAlpha(0x000000, 0.36);
|
||||
[button addTarget:self action:@selector(playButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[button setTitle:@"活动详情 >" forState:UIControlStateNormal];
|
||||
[button setTitleColor:UIColorFromRGB(0x00EEFF) forState:UIControlStateNormal];
|
||||
button.titleLabel.font = [UIFont systemFontOfSize:10];
|
||||
button.layer.masksToBounds = YES;
|
||||
button.layer.cornerRadius = 9;
|
||||
_weekStarButton = button;
|
||||
}
|
||||
return _weekStarButton;
|
||||
}
|
||||
|
||||
- (UIImageView *)sexImageView {
|
||||
if (!_sexImageView) {
|
||||
_sexImageView = [[UIImageView alloc] init];
|
||||
}
|
||||
return _sexImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)desLabel {
|
||||
if (!_desLabel) {
|
||||
_desLabel = [[UILabel alloc] init];
|
||||
_desLabel.text = @"星座物语,限定开启星座月!";
|
||||
_desLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_desLabel.textColor = UIColorFromRGB(0xFDE19B);
|
||||
}
|
||||
return _desLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -19,6 +19,7 @@
|
||||
#import "XPHtmlUrl.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
///Model
|
||||
#import "GiftInfoModel.h"
|
||||
#import "XPGiftCountModel.h"
|
||||
@@ -35,7 +36,7 @@
|
||||
#import "XPGraffitiGiftView.h"
|
||||
#import "XPGiftHeadTypeView.h"
|
||||
#import "XPGiftLuckyGiftBroadcastView.h"
|
||||
#import "XPGiftWeekStarBroadcastView.h"
|
||||
#import "XPGiftTwelveStarBroadcastView.h"
|
||||
///P
|
||||
#import "XPGiftProtocol.h"
|
||||
///VC
|
||||
@@ -44,7 +45,7 @@
|
||||
#import "XPFirstRechargeViewController.h"
|
||||
#import "XPNobleCenterViewController.h"
|
||||
|
||||
@interface XPSendGiftView ()< XPGiftBarViewDelegate, XPGiftProtocol, XPGiftInfoViewDelegate, XPGraffitiGiftViewDelegate, XPGiftUsersViewDelegate, XPGiftHeadTypeViewDelegate, XPGiftWeekStarBroadcastViewDelegate, XPGiftLuckyGiftBroadcastViewDelegate>
|
||||
@interface XPSendGiftView ()< XPGiftBarViewDelegate, XPGiftProtocol, XPGiftInfoViewDelegate, XPGraffitiGiftViewDelegate, XPGiftUsersViewDelegate, XPGiftHeadTypeViewDelegate, XPGiftLuckyGiftBroadcastViewDelegate, XPGiftTwelveStarBroadcastViewDelegate>
|
||||
///顶部的区域
|
||||
@property (nonatomic,strong) UIView * topView;
|
||||
///内容区域
|
||||
@@ -55,8 +56,8 @@
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///幸运礼物广播
|
||||
@property (nonatomic, strong) XPGiftLuckyGiftBroadcastView *luckyBroadcastView;
|
||||
///周星礼物广播
|
||||
@property (nonatomic, strong) XPGiftWeekStarBroadcastView *weekStarBroadcastView;
|
||||
///星座礼物广播
|
||||
@property (nonatomic, strong) XPGiftTwelveStarBroadcastView *constellationBanner;
|
||||
///礼物类型(普通/互动)
|
||||
@property (nonatomic, strong) XPGiftHeadTypeView *headTypeView;
|
||||
///送礼物的人
|
||||
@@ -151,6 +152,7 @@
|
||||
[self.presenter getNormalGiftList:self.roomUid];
|
||||
[self.presenter getPackGiftList];
|
||||
[self.presenter luckyGiftBroadcastRecord];
|
||||
[self.presenter getTwelveStarLastRankFirst:self.roomUid];
|
||||
}
|
||||
|
||||
#pragma mark - Send Custom Message
|
||||
@@ -404,15 +406,17 @@
|
||||
|
||||
///充值
|
||||
- (void)xPGiftBarViewDidClickRecharge:(XPGiftBarView *)view {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPMineRechargeViewController * rechargeVC = [[XPMineRechargeViewController alloc] init];
|
||||
[self.delegate.getCurrentNav pushViewController:rechargeVC animated:YES];
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPMineRechargeViewController * rechargeVC = [[XPMineRechargeViewController alloc] init];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:rechargeVC animated:YES];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)xPGiftBarViewDidClickFirstRecharge:(XPGiftBarView *)view {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.delegate.getCurrentNav];
|
||||
[self.delegate.getCurrentNav presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.delegate.getCurrentNav];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - XPGiftLuckyGiftBroadcastViewDelegate
|
||||
@@ -432,26 +436,30 @@
|
||||
#pragma mark - XPGiftWeekStarBroadcastViewDelegate
|
||||
///点击了周星榜入口
|
||||
- (void)xPGiftWeekStarBroadcastViewWeekStarClick {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.roomUid = self.roomUid;
|
||||
webVC.url = URLWithType(kNewWeekStarURL);
|
||||
[self.delegate.getCurrentNav pushViewController:webVC animated:YES];
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.roomUid = self.roomUid;
|
||||
webVC.url = URLWithType(kNewWeekStarURL);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - XPGiftHeadTypeViewDelegate
|
||||
///点击了贵族
|
||||
- (void)xPGiftHeadTypeViewDidClickNoble:(XPGiftHeadTypeView *)view {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceGiftClick];
|
||||
XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
|
||||
[self.delegate.getCurrentNav pushViewController:nobleVC animated:YES];
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceGiftClick];
|
||||
XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:nobleVC animated:YES];
|
||||
}];
|
||||
}
|
||||
///点击了首充
|
||||
- (void)xPGiftHeadTypeViewDidClickFirstRecharge:(XPGiftHeadTypeView *)view {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.delegate.getCurrentNav];
|
||||
[self.delegate.getCurrentNav presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
}];
|
||||
|
||||
}
|
||||
///点击了礼物
|
||||
- (void)xPGiftHeadTypeViewDidClickGift:(XPGiftHeadTypeView *)view {
|
||||
@@ -478,7 +486,7 @@
|
||||
self.giftBarView.type = type;
|
||||
self.giftBarView.drawGiftCount = 0;
|
||||
if (type == GiftSegmentType_Lucky) {
|
||||
[self.weekStarBroadcastView removeFromSuperview];
|
||||
[self.constellationBanner removeFromSuperview];
|
||||
// self.presenter
|
||||
if (!self.luckyBroadcastView.superview) {
|
||||
[self.view addSubview:self.luckyBroadcastView];
|
||||
@@ -490,26 +498,20 @@
|
||||
}
|
||||
} else if(type == GiftSegmentType_WeekStar) {
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
if (!self.weekStarBroadcastView.superview) {
|
||||
[self.view addSubview:self.weekStarBroadcastView];
|
||||
[self.weekStarBroadcastView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
if (!self.constellationBanner.superview) {
|
||||
[self.view addSubview:self.constellationBanner];
|
||||
[self.constellationBanner mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView.mas_top);
|
||||
make.left.right.mas_equalTo(0);
|
||||
make.height.mas_equalTo(56);
|
||||
make.height.mas_equalTo(75);
|
||||
}];
|
||||
}
|
||||
} else {
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
[self.weekStarBroadcastView removeFromSuperview];
|
||||
[self.constellationBanner removeFromSuperview];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///点击了某个周星礼物
|
||||
- (void)xpGiftInfoViewDidClickWeekStarGift:(GiftInfoModel *)info {
|
||||
self.weekStarBroadcastView.giftInfo = info;
|
||||
}
|
||||
|
||||
- (void)xPGiftInfoView:(XPGiftInfoView *)view didClickItem:(GiftInfoModel *)info type:(GiftSegmentType)type {
|
||||
if (type == GiftSegmentType_Graffiti) {
|
||||
self.giftInfoView.hidden = YES;
|
||||
@@ -554,6 +556,15 @@
|
||||
self.giftBarView.drawGiftCount = self.graffitiPoint.count;
|
||||
}
|
||||
|
||||
#pragma mark - XPGiftTwelveStarBroadcastViewDelegate
|
||||
- (void)xPGiftTwelveStarBroadcastView:(XPGiftTwelveStarBroadcastView *)view didClickDetail:(UIButton *)sender {
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kXinZuoStarURL);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - XPGiftProtocol
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
self.headTypeView.isShowFirstRecharge = userInfo.isFirstCharge;
|
||||
@@ -633,9 +644,10 @@
|
||||
/// 余额不足,是否弹首充弹窗
|
||||
- (void)showNotSufficientFundsWithToast:(NSString *)msg {
|
||||
if (self.delegate.getUserInfo.isFirstCharge) {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.delegate.getCurrentNav];
|
||||
[self.delegate.getCurrentNav presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:XCCurrentVCStackManager.shareManager.getCurrentVC.navigationController];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
}];
|
||||
} else {
|
||||
[self showErrorToast:msg];
|
||||
}
|
||||
@@ -647,6 +659,10 @@
|
||||
self.luckyBroadcastView.records = records;
|
||||
}
|
||||
|
||||
- (void)getTwelveStarLastRankFirstSuccess:(GiftTwelveStarFirstModel *)model {
|
||||
self.constellationBanner.giftInfo = model;
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)disMissViewRecognizer:(UITapGestureRecognizer *)tap {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
@@ -762,12 +778,12 @@
|
||||
return _luckyBroadcastView;
|
||||
}
|
||||
|
||||
- (XPGiftWeekStarBroadcastView *)weekStarBroadcastView {
|
||||
if (!_weekStarBroadcastView) {
|
||||
_weekStarBroadcastView = [[XPGiftWeekStarBroadcastView alloc] init];
|
||||
_weekStarBroadcastView.delegate = self;
|
||||
- (XPGiftTwelveStarBroadcastView *)constellationBanner {
|
||||
if (!_constellationBanner) {
|
||||
_constellationBanner = [[XPGiftTwelveStarBroadcastView alloc] init];
|
||||
_constellationBanner.delegate = self;
|
||||
}
|
||||
return _weekStarBroadcastView;
|
||||
return _constellationBanner;
|
||||
}
|
||||
|
||||
- (UIVisualEffectView *)effectView {
|
||||
|
Reference in New Issue
Block a user