搜索劫持奖励提示及跳转房间
This commit is contained in:
@@ -332,6 +332,8 @@
|
|||||||
9BE9F0FF27FED76500667200 /* XPAnchorFansTaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE9F0FE27FED76500667200 /* XPAnchorFansTaskModel.m */; };
|
9BE9F0FF27FED76500667200 /* XPAnchorFansTaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE9F0FE27FED76500667200 /* XPAnchorFansTaskModel.m */; };
|
||||||
9BE9F10227FEE5C200667200 /* XPAnchorFansTaskDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE9F10127FEE5C200667200 /* XPAnchorFansTaskDetailModel.m */; };
|
9BE9F10227FEE5C200667200 /* XPAnchorFansTaskDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE9F10127FEE5C200667200 /* XPAnchorFansTaskDetailModel.m */; };
|
||||||
9BE9F10527FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE9F10427FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m */; };
|
9BE9F10527FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE9F10427FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m */; };
|
||||||
|
9BEBBF4329384BB20024E0B4 /* HomeSearchHijackBaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEBBF4229384BB20024E0B4 /* HomeSearchHijackBaseModel.m */; };
|
||||||
|
9BEBBF4629384BDE0024E0B4 /* HomeSearchHijackAwardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEBBF4529384BDE0024E0B4 /* HomeSearchHijackAwardModel.m */; };
|
||||||
9BEE3D0E27853BD000C83219 /* ThemeColor+NobleCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D0D27853BD000C83219 /* ThemeColor+NobleCenter.m */; };
|
9BEE3D0E27853BD000C83219 /* ThemeColor+NobleCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D0D27853BD000C83219 /* ThemeColor+NobleCenter.m */; };
|
||||||
9BEE3D11278584FE00C83219 /* XPNobleCenterEmptyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D10278584FE00C83219 /* XPNobleCenterEmptyView.m */; };
|
9BEE3D11278584FE00C83219 /* XPNobleCenterEmptyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D10278584FE00C83219 /* XPNobleCenterEmptyView.m */; };
|
||||||
9BEE3D142785884A00C83219 /* XPNobleCenterResidueView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D132785884A00C83219 /* XPNobleCenterResidueView.m */; };
|
9BEE3D142785884A00C83219 /* XPNobleCenterResidueView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D132785884A00C83219 /* XPNobleCenterResidueView.m */; };
|
||||||
@@ -1894,6 +1896,10 @@
|
|||||||
9BE9F10127FEE5C200667200 /* XPAnchorFansTaskDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorFansTaskDetailModel.m; sourceTree = "<group>"; };
|
9BE9F10127FEE5C200667200 /* XPAnchorFansTaskDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorFansTaskDetailModel.m; sourceTree = "<group>"; };
|
||||||
9BE9F10327FF04CF00667200 /* XPAnchorFansTaskTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAnchorFansTaskTableViewCell.h; sourceTree = "<group>"; };
|
9BE9F10327FF04CF00667200 /* XPAnchorFansTaskTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAnchorFansTaskTableViewCell.h; sourceTree = "<group>"; };
|
||||||
9BE9F10427FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorFansTaskTableViewCell.m; sourceTree = "<group>"; };
|
9BE9F10427FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorFansTaskTableViewCell.m; sourceTree = "<group>"; };
|
||||||
|
9BEBBF4129384BB20024E0B4 /* HomeSearchHijackBaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeSearchHijackBaseModel.h; sourceTree = "<group>"; };
|
||||||
|
9BEBBF4229384BB20024E0B4 /* HomeSearchHijackBaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeSearchHijackBaseModel.m; sourceTree = "<group>"; };
|
||||||
|
9BEBBF4429384BDE0024E0B4 /* HomeSearchHijackAwardModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeSearchHijackAwardModel.h; sourceTree = "<group>"; };
|
||||||
|
9BEBBF4529384BDE0024E0B4 /* HomeSearchHijackAwardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeSearchHijackAwardModel.m; sourceTree = "<group>"; };
|
||||||
9BEE3D0C27853BD000C83219 /* ThemeColor+NobleCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+NobleCenter.h"; sourceTree = "<group>"; };
|
9BEE3D0C27853BD000C83219 /* ThemeColor+NobleCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+NobleCenter.h"; sourceTree = "<group>"; };
|
||||||
9BEE3D0D27853BD000C83219 /* ThemeColor+NobleCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+NobleCenter.m"; sourceTree = "<group>"; };
|
9BEE3D0D27853BD000C83219 /* ThemeColor+NobleCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+NobleCenter.m"; sourceTree = "<group>"; };
|
||||||
9BEE3D0F278584FE00C83219 /* XPNobleCenterEmptyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterEmptyView.h; sourceTree = "<group>"; };
|
9BEE3D0F278584FE00C83219 /* XPNobleCenterEmptyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterEmptyView.h; sourceTree = "<group>"; };
|
||||||
@@ -8256,6 +8262,10 @@
|
|||||||
9B39C8852885408C00564D17 /* HomeLiveLookRecordModel.m */,
|
9B39C8852885408C00564D17 /* HomeLiveLookRecordModel.m */,
|
||||||
F183EF3F2935E1C000E2465F /* HomeEveryOneSearchModel.h */,
|
F183EF3F2935E1C000E2465F /* HomeEveryOneSearchModel.h */,
|
||||||
F183EF402935E1C000E2465F /* HomeEveryOneSearchModel.m */,
|
F183EF402935E1C000E2465F /* HomeEveryOneSearchModel.m */,
|
||||||
|
9BEBBF4129384BB20024E0B4 /* HomeSearchHijackBaseModel.h */,
|
||||||
|
9BEBBF4229384BB20024E0B4 /* HomeSearchHijackBaseModel.m */,
|
||||||
|
9BEBBF4429384BDE0024E0B4 /* HomeSearchHijackAwardModel.h */,
|
||||||
|
9BEBBF4529384BDE0024E0B4 /* HomeSearchHijackAwardModel.m */,
|
||||||
);
|
);
|
||||||
path = Model;
|
path = Model;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -9775,6 +9785,7 @@
|
|||||||
E8EEB91726FC7B35007C6EBA /* XPMineUserInfoDesViewController.m in Sources */,
|
E8EEB91726FC7B35007C6EBA /* XPMineUserInfoDesViewController.m in Sources */,
|
||||||
9B1B72AC280031DB003FACE9 /* XPAnchorPKViewController.m in Sources */,
|
9B1B72AC280031DB003FACE9 /* XPAnchorPKViewController.m in Sources */,
|
||||||
E80CBDED27D0D899001E1EC2 /* XPHomeLikeEmptyTableViewCell.m in Sources */,
|
E80CBDED27D0D899001E1EC2 /* XPHomeLikeEmptyTableViewCell.m in Sources */,
|
||||||
|
9BEBBF4329384BB20024E0B4 /* HomeSearchHijackBaseModel.m in Sources */,
|
||||||
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
||||||
9BC8C83028090C9200C24F85 /* XPRoomAnchorRankBannerView.m in Sources */,
|
9BC8C83028090C9200C24F85 /* XPRoomAnchorRankBannerView.m in Sources */,
|
||||||
E81A653F283511BE00F55894 /* XPMonentsInteractiveViewController.m in Sources */,
|
E81A653F283511BE00F55894 /* XPMonentsInteractiveViewController.m in Sources */,
|
||||||
@@ -10038,6 +10049,7 @@
|
|||||||
9B53D57A28E2CF18005187A3 /* XPTeenagerHomeView.m in Sources */,
|
9B53D57A28E2CF18005187A3 /* XPTeenagerHomeView.m in Sources */,
|
||||||
E8AB632428AE10310023B0D2 /* XPMoentsTopicListViewController.m in Sources */,
|
E8AB632428AE10310023B0D2 /* XPMoentsTopicListViewController.m in Sources */,
|
||||||
E8098CAA282E03B40090B9F0 /* XPMonentsRecommendPresenter.m in Sources */,
|
E8098CAA282E03B40090B9F0 /* XPMonentsRecommendPresenter.m in Sources */,
|
||||||
|
9BEBBF4629384BDE0024E0B4 /* HomeSearchHijackAwardModel.m in Sources */,
|
||||||
9B1B729828002147003FACE9 /* XPMineFansTeamPresenter.m in Sources */,
|
9B1B729828002147003FACE9 /* XPMineFansTeamPresenter.m in Sources */,
|
||||||
E86507E8281A8212006951B0 /* ContentTweetModel.m in Sources */,
|
E86507E8281A8212006951B0 /* ContentTweetModel.m in Sources */,
|
||||||
E8D55CA0281186D6006935A5 /* SessionAudioRecordView.m in Sources */,
|
E8D55CA0281186D6006935A5 /* SessionAudioRecordView.m in Sources */,
|
||||||
|
@@ -50,6 +50,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// @param sid sid
|
/// @param sid sid
|
||||||
+ (void)requestEveryOneSearchRoomList:(HttpRequestHelperCompletion)completion wordId:(NSString *)sid;
|
+ (void)requestEveryOneSearchRoomList:(HttpRequestHelperCompletion)completion wordId:(NSString *)sid;
|
||||||
|
|
||||||
|
/// 搜索劫持
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param key 搜索关键词
|
||||||
|
+ (void)requestSearchHijack:(HttpRequestHelperCompletion)completion key:(NSString *)key;
|
||||||
|
|
||||||
/// 首页推荐的轮播图
|
/// 首页推荐的轮播图
|
||||||
/// @param completion 完成
|
/// @param completion 完成
|
||||||
/// @param uid 用户的uid
|
/// @param uid 用户的uid
|
||||||
|
@@ -51,6 +51,13 @@
|
|||||||
[self makeRequest:@"every/one/search/getRoomList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, sid, nil];
|
[self makeRequest:@"every/one/search/getRoomList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, sid, nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 搜索劫持
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param key 搜索关键词
|
||||||
|
+ (void)requestSearchHijack:(HttpRequestHelperCompletion)completion key:(NSString *)key {
|
||||||
|
[self makeRequest:@"search/hijack/get" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, key, nil];
|
||||||
|
}
|
||||||
|
|
||||||
/// 首页推荐的轮播图
|
/// 首页推荐的轮播图
|
||||||
/// @param completion 完成
|
/// @param completion 完成
|
||||||
/// @param uid 用户的uid
|
/// @param uid 用户的uid
|
||||||
|
23
xplan-ios/Main/Home/Model/HomeSearchHijackAwardModel.h
Normal file
23
xplan-ios/Main/Home/Model/HomeSearchHijackAwardModel.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// HomeSearchHijackAwardModel.h
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/12/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface HomeSearchHijackAwardModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *awardName;
|
||||||
|
@property (nonatomic, assign) NSInteger awardId;
|
||||||
|
@property (nonatomic, copy) NSString *awardPrice;
|
||||||
|
@property (nonatomic, assign) NSInteger awardNum;
|
||||||
|
@property (nonatomic, assign) NSInteger storageNum;
|
||||||
|
@property (nonatomic, copy) NSString *awardUrl;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Home/Model/HomeSearchHijackAwardModel.m
Normal file
12
xplan-ios/Main/Home/Model/HomeSearchHijackAwardModel.m
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// HomeSearchHijackAwardModel.m
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/12/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HomeSearchHijackAwardModel.h"
|
||||||
|
|
||||||
|
@implementation HomeSearchHijackAwardModel
|
||||||
|
|
||||||
|
@end
|
20
xplan-ios/Main/Home/Model/HomeSearchHijackBaseModel.h
Normal file
20
xplan-ios/Main/Home/Model/HomeSearchHijackBaseModel.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// HomeSearchHijackBaseModel.h
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/12/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "HomeSearchHijackAwardModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface HomeSearchHijackBaseModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *roomUid;
|
||||||
|
@property (nonatomic, strong) HomeSearchHijackAwardModel *awardVo;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Home/Model/HomeSearchHijackBaseModel.m
Normal file
12
xplan-ios/Main/Home/Model/HomeSearchHijackBaseModel.m
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// HomeSearchHijackBaseModel.m
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/12/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HomeSearchHijackBaseModel.h"
|
||||||
|
|
||||||
|
@implementation HomeSearchHijackBaseModel
|
||||||
|
|
||||||
|
@end
|
@@ -23,6 +23,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// @param sid keyID
|
/// @param sid keyID
|
||||||
- (void)getEveryOneSearchRoomList:(NSString *)sid;
|
- (void)getEveryOneSearchRoomList:(NSString *)sid;
|
||||||
|
|
||||||
|
///搜索劫持
|
||||||
|
- (void)getSearchHijack:(NSString *)key;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#import "AccountInfoStorage.h"
|
#import "AccountInfoStorage.h"
|
||||||
#import "HomeSearchResultModel.h"
|
#import "HomeSearchResultModel.h"
|
||||||
#import "HomeRecommendRoomModel.h"
|
#import "HomeRecommendRoomModel.h"
|
||||||
|
#import "HomeSearchHijackBaseModel.h"
|
||||||
|
|
||||||
@implementation XPHomeSearchPresenter
|
@implementation XPHomeSearchPresenter
|
||||||
|
|
||||||
@@ -45,4 +46,14 @@
|
|||||||
}] wordId:sid];
|
}] wordId:sid];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///搜索劫持
|
||||||
|
- (void)getSearchHijack:(NSString *)key {
|
||||||
|
[Api requestSearchHijack:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
|
HomeSearchHijackBaseModel *model = [HomeSearchHijackBaseModel modelWithJSON:data.data];
|
||||||
|
[[self getView] searchHijackSuccess:model key:key];
|
||||||
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||||
|
[[self getView] searchHijackFail:key];
|
||||||
|
}] key:key];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class HomeSearchHijackBaseModel;
|
||||||
@protocol XPHomeSearchProtocol <NSObject>
|
@protocol XPHomeSearchProtocol <NSObject>
|
||||||
|
|
||||||
///搜索成功
|
///搜索成功
|
||||||
@@ -22,6 +22,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 大家都在搜房间列表成功
|
/// 大家都在搜房间列表成功
|
||||||
- (void)everyoneSearchListSuccess:(NSArray *)list;
|
- (void)everyoneSearchListSuccess:(NSArray *)list;
|
||||||
|
|
||||||
|
///获取搜索劫持成功
|
||||||
|
- (void)searchHijackSuccess:(HomeSearchHijackBaseModel *)data key:(NSString *)key;
|
||||||
|
///获取搜索劫持失败
|
||||||
|
- (void)searchHijackFail:(NSString *)key;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -6,11 +6,14 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "HomeSearchHijackAwardModel.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface XPHomeSearchAwardView : UIView
|
@interface XPHomeSearchAwardView : UIView
|
||||||
|
|
||||||
|
@property (nonatomic, strong) HomeSearchHijackAwardModel *data;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -41,6 +41,8 @@
|
|||||||
|
|
||||||
- (void)initView {
|
- (void)initView {
|
||||||
self.backgroundColor = [UIColor whiteColor];
|
self.backgroundColor = [UIColor whiteColor];
|
||||||
|
self.layer.cornerRadius = 20;
|
||||||
|
self.layer.masksToBounds = YES;
|
||||||
[self addSubview:self.awardTitle];
|
[self addSubview:self.awardTitle];
|
||||||
[self addSubview:self.closeBtn];
|
[self addSubview:self.closeBtn];
|
||||||
[self addSubview:self.awardImageView];
|
[self addSubview:self.awardImageView];
|
||||||
@@ -86,12 +88,19 @@
|
|||||||
[TTPopup dismiss];
|
[TTPopup dismiss];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setData:(HomeSearchHijackAwardModel *)data {
|
||||||
|
self.awardImageView.imageUrl = data.awardUrl;
|
||||||
|
self.giftTitle.text = data.awardName;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - getter
|
#pragma mark - getter
|
||||||
- (UILabel *)awardTitle {
|
- (UILabel *)awardTitle {
|
||||||
if (!_awardTitle) {
|
if (!_awardTitle) {
|
||||||
UILabel *label = [[UILabel alloc] init];
|
UILabel *label = [[UILabel alloc] init];
|
||||||
label.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
label.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
||||||
label.textColor = [ThemeColor mainTextColor];
|
label.textColor = [ThemeColor mainTextColor];
|
||||||
|
label.text = @"不错哟~你获得了神秘奖励";
|
||||||
|
label.textAlignment = NSTextAlignmentCenter;
|
||||||
_awardTitle = label;
|
_awardTitle = label;
|
||||||
}
|
}
|
||||||
return _awardTitle;
|
return _awardTitle;
|
||||||
@@ -100,7 +109,7 @@
|
|||||||
- (UIButton *)closeBtn {
|
- (UIButton *)closeBtn {
|
||||||
if (!_closeBtn) {
|
if (!_closeBtn) {
|
||||||
_closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
_closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
[_closeBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
|
[_closeBtn setImage:[UIImage imageNamed:@"room_little_game_close"] forState:UIControlStateNormal];
|
||||||
[_closeBtn addTarget:self action:@selector(onCloseBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
[_closeBtn addTarget:self action:@selector(onCloseBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
}
|
}
|
||||||
return _closeBtn;
|
return _closeBtn;
|
||||||
@@ -111,6 +120,7 @@
|
|||||||
NetImageConfig *config = [[NetImageConfig alloc] init];
|
NetImageConfig *config = [[NetImageConfig alloc] init];
|
||||||
config.placeHolder = [UIImageConstant defaultEmptyAvatarPlaceholder];
|
config.placeHolder = [UIImageConstant defaultEmptyAvatarPlaceholder];
|
||||||
_awardImageView = [[NetImageView alloc] initWithConfig:config];
|
_awardImageView = [[NetImageView alloc] initWithConfig:config];
|
||||||
|
_awardImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||||
_awardImageView.layer.masksToBounds = YES;
|
_awardImageView.layer.masksToBounds = YES;
|
||||||
_awardImageView.layer.cornerRadius = 8;
|
_awardImageView.layer.cornerRadius = 8;
|
||||||
}
|
}
|
||||||
@@ -122,6 +132,7 @@
|
|||||||
UILabel *label = [[UILabel alloc] init];
|
UILabel *label = [[UILabel alloc] init];
|
||||||
label.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
label.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||||
label.textColor = [ThemeColor mainTextColor];
|
label.textColor = [ThemeColor mainTextColor];
|
||||||
|
label.textAlignment = NSTextAlignmentCenter;
|
||||||
_giftTitle = label;
|
_giftTitle = label;
|
||||||
}
|
}
|
||||||
return _giftTitle;
|
return _giftTitle;
|
||||||
@@ -133,6 +144,7 @@
|
|||||||
label.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
label.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||||
label.textColor = [ThemeColor secondTextColor];
|
label.textColor = [ThemeColor secondTextColor];
|
||||||
label.text = @"奖励已自动发放";
|
label.text = @"奖励已自动发放";
|
||||||
|
label.textAlignment = NSTextAlignmentCenter;
|
||||||
_giftDes = label;
|
_giftDes = label;
|
||||||
}
|
}
|
||||||
return _giftDes;
|
return _giftDes;
|
||||||
|
@@ -14,14 +14,18 @@
|
|||||||
#import "XPMacro.h"
|
#import "XPMacro.h"
|
||||||
#import "ThemeColor.h"
|
#import "ThemeColor.h"
|
||||||
#import "XPHomeSearchNavView.h"
|
#import "XPHomeSearchNavView.h"
|
||||||
|
#import "TTPopup.h"
|
||||||
///View
|
///View
|
||||||
#import "XPHomeSearchViewController.h"
|
#import "XPHomeSearchViewController.h"
|
||||||
#import "XPRoomSearchRecordViewController.h"
|
#import "XPRoomSearchRecordViewController.h"
|
||||||
#import "XPHomeSearchRelateView.h"
|
#import "XPHomeSearchRelateView.h"
|
||||||
#import "XPRoomViewController.h"
|
#import "XPRoomViewController.h"
|
||||||
|
#import "XPHomeSearchAwardView.h"
|
||||||
///P
|
///P
|
||||||
#import "XPHomeSearchPresenter.h"
|
#import "XPHomeSearchPresenter.h"
|
||||||
#import "XPHomeSearchProtocol.h"
|
#import "XPHomeSearchProtocol.h"
|
||||||
|
///Model
|
||||||
|
#import "HomeSearchHijackBaseModel.h"
|
||||||
|
|
||||||
UIKIT_EXTERN NSString *kFromSearchToHomeViewKey;
|
UIKIT_EXTERN NSString *kFromSearchToHomeViewKey;
|
||||||
UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||||
@@ -97,6 +101,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)searchVCLoadData:(NSString *)text {
|
- (void)searchVCLoadData:(NSString *)text {
|
||||||
|
self.recordVc.view.hidden = YES;
|
||||||
[self.roomVC searchText:text];
|
[self.roomVC searchText:text];
|
||||||
[self.userVC searchText:text];
|
[self.userVC searchText:text];
|
||||||
}
|
}
|
||||||
@@ -117,9 +122,8 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
|||||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
||||||
if (textField.text.length > 0) {
|
if (textField.text.length > 0) {
|
||||||
[textField resignFirstResponder];
|
[textField resignFirstResponder];
|
||||||
[self searchVCLoadData:textField.text];
|
[self.presenter getSearchHijack:textField.text];
|
||||||
[self.recordVc storeSearchRecord:textField.text];
|
[self.recordVc storeSearchRecord:textField.text];
|
||||||
self.recordVc.view.hidden = YES;
|
|
||||||
} else {
|
} else {
|
||||||
[self showErrorToast:@"请输入需要搜索的内容"];
|
[self showErrorToast:@"请输入需要搜索的内容"];
|
||||||
}
|
}
|
||||||
@@ -130,9 +134,8 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
|||||||
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickSearch:(UIButton *)sender {
|
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickSearch:(UIButton *)sender {
|
||||||
if (view.searchTextField.text.length > 0) {
|
if (view.searchTextField.text.length > 0) {
|
||||||
[view.searchTextField resignFirstResponder];
|
[view.searchTextField resignFirstResponder];
|
||||||
[self searchVCLoadData:view.searchTextField.text];
|
[self.presenter getSearchHijack:view.searchTextField.text];
|
||||||
[self.recordVc storeSearchRecord:view.searchTextField.text];
|
[self.recordVc storeSearchRecord:view.searchTextField.text];
|
||||||
self.recordVc.view.hidden = YES;
|
|
||||||
} else {
|
} else {
|
||||||
[self showErrorToast:@"请输入需要搜索的内容"];
|
[self showErrorToast:@"请输入需要搜索的内容"];
|
||||||
}
|
}
|
||||||
@@ -160,9 +163,8 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
|||||||
- (void)xPRoomSearchRecordViewControllerSearchWithWord:(NSString *)word {
|
- (void)xPRoomSearchRecordViewControllerSearchWithWord:(NSString *)word {
|
||||||
if (word.length > 0) {
|
if (word.length > 0) {
|
||||||
self.searchView.searchTextField.text = word;
|
self.searchView.searchTextField.text = word;
|
||||||
[self searchVCLoadData:word];
|
[self.presenter getSearchHijack:word];
|
||||||
[self.recordVc storeSearchRecord:word];
|
[self.recordVc storeSearchRecord:word];
|
||||||
self.recordVc.view.hidden = YES;
|
|
||||||
} else {
|
} else {
|
||||||
[self showErrorToast:@"请输入需要搜索的内容"];
|
[self showErrorToast:@"请输入需要搜索的内容"];
|
||||||
}
|
}
|
||||||
@@ -204,6 +206,25 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///获取搜索劫持成功
|
||||||
|
- (void)searchHijackSuccess:(HomeSearchHijackBaseModel *)data key:(nonnull NSString *)key {
|
||||||
|
if (data.roomUid.length) {
|
||||||
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
[XPRoomViewController openRoom:data.roomUid viewController:self.presentingViewController];
|
||||||
|
} else if (data.awardVo) {
|
||||||
|
XPHomeSearchAwardView *view = [[XPHomeSearchAwardView alloc] init];
|
||||||
|
view.data = data.awardVo;
|
||||||
|
[TTPopup popupView:view style:TTPopupStyleAlert];
|
||||||
|
} else {
|
||||||
|
[self searchVCLoadData:key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///获取搜索劫持失败
|
||||||
|
- (void)searchHijackFail:(NSString *)key {
|
||||||
|
[self searchVCLoadData:key];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - XPHomeSearchRelateViewDelegate
|
#pragma mark - XPHomeSearchRelateViewDelegate
|
||||||
///进入房间
|
///进入房间
|
||||||
- (void)xPHomeSearchRelateViewEnterRoom:(NSString *)roomUid {
|
- (void)xPHomeSearchRelateViewEnterRoom:(NSString *)roomUid {
|
||||||
|
Reference in New Issue
Block a user