房间榜换成h5
This commit is contained in:
@@ -30,7 +30,9 @@ typedef NS_ENUM(NSUInteger, URLType) {
|
|||||||
/// 糖果树玩法规则
|
/// 糖果树玩法规则
|
||||||
kCandyTreeRuleURL,
|
kCandyTreeRuleURL,
|
||||||
///房间魅力榜
|
///房间魅力榜
|
||||||
kRoomCharmRankUrl,
|
kRoomCharmRankURL,
|
||||||
|
///房间榜
|
||||||
|
kRoomRankURL,
|
||||||
};
|
};
|
||||||
|
|
||||||
NSString * const URLWithType(URLType type);
|
NSString * const URLWithType(URLType type);
|
||||||
|
@@ -25,7 +25,8 @@ NSString * const URLWithType(URLType type) {
|
|||||||
@(kCandyTreeURL) : @"activity/explore/index.html",///参加糖果树
|
@(kCandyTreeURL) : @"activity/explore/index.html",///参加糖果树
|
||||||
@(kCandyTreeRuleURL) : @"modules/rank/index.html#/wishingWellRule",///糖果树规则
|
@(kCandyTreeRuleURL) : @"modules/rank/index.html#/wishingWellRule",///糖果树规则
|
||||||
@(kCandyTreeRecordURL) : @"modules/rank/index.html#/wishingWellRecord",///糖果树记录
|
@(kCandyTreeRecordURL) : @"modules/rank/index.html#/wishingWellRecord",///糖果树记录
|
||||||
@(kRoomCharmRankUrl) : @"modules/charm/index.html",//房间魅力榜
|
@(kRoomCharmRankURL) : @"modules/charm/index.html",//房间魅力榜
|
||||||
|
@(kRoomRankURL) : @"modules/room_rank/index.html", //房间榜
|
||||||
};
|
};
|
||||||
NSString * url = [dic objectForKey:@(type)];
|
NSString * url = [dic objectForKey:@(type)];
|
||||||
|
|
||||||
|
@@ -8,12 +8,14 @@
|
|||||||
#import "XPRoomFunctionContainerView.h"
|
#import "XPRoomFunctionContainerView.h"
|
||||||
///Tool
|
///Tool
|
||||||
#import "XPMacro.h"
|
#import "XPMacro.h"
|
||||||
|
#import "XPHtmlUrl.h"
|
||||||
|
#import "TTPopup.h"
|
||||||
///Third
|
///Third
|
||||||
#import <Masonry/Masonry.h>
|
#import <Masonry/Masonry.h>
|
||||||
///Model
|
///Model
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
///View
|
///View
|
||||||
#import "XPRoomRankViewController.h"
|
#import "XPRoomHalfWebView.h"
|
||||||
@interface XPRoomFunctionContainerView ()
|
@interface XPRoomFunctionContainerView ()
|
||||||
///host 代理
|
///host 代理
|
||||||
@property (nonatomic,weak) id<RoomHostDelegate>delegate;
|
@property (nonatomic,weak) id<RoomHostDelegate>delegate;
|
||||||
@@ -50,8 +52,9 @@
|
|||||||
#pragma mark - Event Response
|
#pragma mark - Event Response
|
||||||
- (void)contributionButtonAction:(UIButton *)sender {
|
- (void)contributionButtonAction:(UIButton *)sender {
|
||||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid];
|
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid];
|
||||||
XPRoomRankViewController * rankVC = [[XPRoomRankViewController alloc] initWithRoomUid:roomUid delegate:self.delegate];
|
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||||
[self.delegate.getCurrentNav presentViewController:rankVC animated:YES completion:nil];
|
webView.url = [NSString stringWithFormat:@"%@?roomUid=%@", URLWithType(kRoomRankURL), roomUid];
|
||||||
|
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Getters And Setters
|
#pragma mark - Getters And Setters
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#pragma mark - Private Method
|
#pragma mark - Private Method
|
||||||
- (void)initSubViews {
|
- (void)initSubViews {
|
||||||
|
|
||||||
[self addSubview:self.topView];
|
[self addSubview:self.topView];
|
||||||
[self addSubview:self.toolView];
|
[self addSubview:self.toolView];
|
||||||
[self addSubview:self.webVC.view];
|
[self addSubview:self.webVC.view];
|
||||||
@@ -143,6 +144,7 @@
|
|||||||
- (XPWebViewController *)webVC {
|
- (XPWebViewController *)webVC {
|
||||||
if (_webVC == nil) {
|
if (_webVC == nil) {
|
||||||
_webVC = [[XPWebViewController alloc] init];
|
_webVC = [[XPWebViewController alloc] init];
|
||||||
|
_webVC.view.backgroundColor = [UIColor clearColor];
|
||||||
__weak typeof(self) weakSelf = self;
|
__weak typeof(self) weakSelf = self;
|
||||||
_webVC.urlLoadCompleted = ^(BOOL result, NSError *error) {
|
_webVC.urlLoadCompleted = ^(BOOL result, NSError *error) {
|
||||||
weakSelf.titleLabel.text = weakSelf.webVC.navigationItem.title;
|
weakSelf.titleLabel.text = weakSelf.webVC.navigationItem.title;
|
||||||
|
@@ -79,6 +79,7 @@
|
|||||||
- (UIImageView *)iconImageView {
|
- (UIImageView *)iconImageView {
|
||||||
if (_iconImageView == nil) {
|
if (_iconImageView == nil) {
|
||||||
_iconImageView = [[UIImageView alloc] init];
|
_iconImageView = [[UIImageView alloc] init];
|
||||||
|
_iconImageView.userInteractionEnabled = YES;
|
||||||
_iconImageView.image = [UIImage imageNamed:@"room_position_giftValue_heart"];
|
_iconImageView.image = [UIImage imageNamed:@"room_position_giftValue_heart"];
|
||||||
}
|
}
|
||||||
return _iconImageView;
|
return _iconImageView;
|
||||||
|
@@ -206,7 +206,7 @@
|
|||||||
if (self.userInfo && self.userInfo.uid > 0) {
|
if (self.userInfo && self.userInfo.uid > 0) {
|
||||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||||
webVC.roomUid = self.roomUid;
|
webVC.roomUid = self.roomUid;
|
||||||
webVC.url = [NSString stringWithFormat:@"%@?uid=%ld", URLWithType(kRoomCharmRankUrl), self.userInfo.uid];
|
webVC.url = [NSString stringWithFormat:@"%@?uid=%ld", URLWithType(kRoomCharmRankURL), self.userInfo.uid];
|
||||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,8 @@
|
|||||||
#import <Masonry/Masonry.h>
|
#import <Masonry/Masonry.h>
|
||||||
#import <MJExtension/MJExtension.h>
|
#import <MJExtension/MJExtension.h>
|
||||||
#import <RPSDK/RPSDK.h>
|
#import <RPSDK/RPSDK.h>
|
||||||
|
#import "XCCurrentVCStackManager.h"
|
||||||
|
#import "XPMineUserInfoViewController.h"
|
||||||
|
|
||||||
typedef NS_ENUM(NSUInteger, RightNavigationPushType){
|
typedef NS_ENUM(NSUInteger, RightNavigationPushType){
|
||||||
///跳转h5页面
|
///跳转h5页面
|
||||||
@@ -77,6 +79,7 @@ NSString * const kJSGetDeviceInfo = @"getDeviceInfo";
|
|||||||
NSString * const kJSOpenFaceLiveness = @"openFaceLiveness";
|
NSString * const kJSOpenFaceLiveness = @"openFaceLiveness";
|
||||||
NSString * const kJSInitNav = @"initNav";
|
NSString * const kJSInitNav = @"initNav";
|
||||||
NSString * const kJSGetRoomUid = @"getRoomUid";
|
NSString * const kJSGetRoomUid = @"getRoomUid";
|
||||||
|
NSString * const kOpenPersonPage = @"openPersonPage";
|
||||||
|
|
||||||
@implementation XPWebViewController
|
@implementation XPWebViewController
|
||||||
|
|
||||||
@@ -186,7 +189,15 @@ NSString * const kJSGetRoomUid = @"getRoomUid";
|
|||||||
|
|
||||||
} else if ([message.name isEqualToString:kJSOpenChargePage]) {
|
} else if ([message.name isEqualToString:kJSOpenChargePage]) {
|
||||||
|
|
||||||
} else if ([message.name isEqualToString:kJSOpenFaceLiveness]) {
|
} else if ([message.name isEqualToString:kOpenPersonPage]) {
|
||||||
|
NSString *uid = [NSString stringWithFormat:@"%@",message.body];
|
||||||
|
if (uid.integerValue > 0) {
|
||||||
|
[TTPopup dismiss];
|
||||||
|
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
|
||||||
|
userInfoVC.uid = uid.integerValue;
|
||||||
|
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
|
||||||
|
}
|
||||||
|
} else if ([message.name isEqualToString:kJSOpenFaceLiveness]) {
|
||||||
NSString *verifyToken = message.body;
|
NSString *verifyToken = message.body;
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
[RPSDK startWithVerifyToken:verifyToken viewController:self.navigationController completion:^(RPResult * _Nonnull auditState) {
|
[RPSDK startWithVerifyToken:verifyToken viewController:self.navigationController completion:^(RPResult * _Nonnull auditState) {
|
||||||
@@ -460,6 +471,8 @@ NSString * const kJSGetRoomUid = @"getRoomUid";
|
|||||||
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSInitNav];
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSInitNav];
|
||||||
// 获取房间uid
|
// 获取房间uid
|
||||||
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetRoomUid];
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetRoomUid];
|
||||||
|
// 进入个人主页
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kOpenPersonPage];
|
||||||
|
|
||||||
}
|
}
|
||||||
return _userContentController;
|
return _userContentController;
|
||||||
|
Reference in New Issue
Block a user