//
//  ALCreateGroupWebNextController.m
//  GMAlpha
//
//  Created by zhouLiang on 2018/12/3.
//  Copyright © 2018 Gengmei. All rights reserved.
//

#import "ALCreateGroupWebNextController.h"
#import "ALCreateGroupController.h"

@interface ALCreateGroupWebNextController ()

@end

@implementation ALCreateGroupWebNextController

- (void)initController {
    
    [super initController];
    //    self.pageName = @"welfare_detail";
    // 多属性选择时需要隐藏导航栏，需要用到此属性
    //    self.controlNavigationByYou = NO;
    self.pageName = @"group_create_step_two";
    self.navigationBar.isShowShadow = NO;
    self.navigationBar.rightTitle = @"下一步";
    [self.navigationBar.rightButton setTitleColor:RGBCOLOR_HEX(0x0093ff) forState:(UIControlStateNormal)];    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.fullURL = [NSString stringWithFormat:@"%@%@",APIHOST,@"/alpha/group/add/2"];
    [self reloadURL];
}

- (void)webViewLoadRequest {
    
    [super webViewLoadRequest];
}

- (void)rightButtonClicked:(OCNavigationBarButton *)button {
    
    [Phobos track:@"group_create_step_two_click_next"];
    ALCreateGroupController *vc = [[ALCreateGroupController alloc]init];    
    [self pushViewController:vc];
    //    NSString *textJS = @"window.hybrid.dispatcher.run('askSkipEvent')";
    //    [self.webCompent.webView evaluateJavaScript:textJS completionHandler:^(id response, NSError *error) {
    //
    //        NSLog(@"rightButtonClicked:%@-%@",response,error);
    //        if (error) {
    //            [[AppDelegate shareInstance] showNextRootView];
    //        }
    //    }];
}

//- (void)backAction:(OCNavigationBarButton *)button {

//    NSString *textJS = @"window.hybrid.dispatcherrun('askBackEvent')";
//    [self.webCompent.webView evaluateJavaScript:textJS completionHandler:^(id response, NSError *error) {
//        if (error) {
//            [super backAction:button];
//        }
//        NSLog(@"backAction:%@",error);
//    }];
//}

@end
