h5及小秘书支持跳转对应话题页

This commit is contained in:
chenguilong
2022-11-15 18:50:46 +08:00
parent 638689dd3a
commit 5f9eacd4dc
3 changed files with 25 additions and 2 deletions

View File

@@ -25,6 +25,7 @@
#import "XPDressUpShopViewController.h"
#import "XPRoomViewController.h"
#import "RoomHostDelegate.h"
#import "XPMonentTopicContainerViewController.h"
typedef NS_ENUM(NSUInteger, RightNavigationPushType){
///h5
@@ -327,7 +328,13 @@ NSString * const kProhibitRightSlip = @"prohibitRightSlip";
#pragma mark - private method
- (void)handleRouterType:(NSInteger)skyType message:(WKScriptMessage *)message {
NSDictionary *bodyDict = (NSDictionary *)message.body;
NSDictionary *bodyDict;
if ([message.body isKindOfClass:[NSDictionary class]]) {
bodyDict = message.body;
} else if ([message.body isKindOfClass:[NSString class]]) {
NSString *str = (NSString *)message.body;
bodyDict = [str toJSONObject];
}
switch (skyType) {
case 1:
{
@@ -354,6 +361,13 @@ NSString * const kProhibitRightSlip = @"prohibitRightSlip";
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:vc animated:YES];
}
break;
case 75:
{//
NSString *topicId = bodyDict[@"routerVal"];
XPMonentTopicContainerViewController * topicVC = [[XPMonentTopicContainerViewController alloc] init];
topicVC.worldId = topicId;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:topicVC animated:YES];
}
default:
break;
}