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