| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- //
- // ServiceproviderViewController.m
- // jitao
- //
- // Created by 罗云飞 on 2018/8/10.
- // Copyright © 2018年 罗云飞. All rights reserved.
- //
- #import "ServiceproviderViewController.h"
- #import "ZJSliderView.h"
- #import "QBViewController.h"
- #import "ZQViewController.h"
- #import "CGViewController.h"
- #import "XQViewController.h"
- #import "HYViewController.h"
- #import "OrderZJViewController.h"
- @interface ServiceproviderViewController (){
- QBViewController *qbvc;
- ZQViewController *zqvc;
- CGViewController *cgvc;
- XQViewController *xqvc;
- HYViewController *hyvc;
- OrderZJViewController *zjvc;
- }
- @end
- @implementation ServiceproviderViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self setNavTitle:@"咨询单列表"];
- // 创建分段控制器
- [self createSliderView];
- // Do any additional setup after loading the view.
- }
- #pragma mark - 创建分段控制器
- - (void)createSliderView {
-
- ZJSliderView *slider = [[ZJSliderView alloc] initWithFrame:CGRectMake(0.0f,NavHeader, SCREEN_WIDTH, SCREEN_HEIGHT-NavHeader)];
- __weak typeof(self) weakSelf = self;
- [slider setNewZJSlider:^(int index) {
- [weakSelf autoDownRefresh:index];
- }];
- qbvc = [[QBViewController alloc] init];
- qbvc.title = @"全部";
-
- zqvc = [[ZQViewController alloc] init];
- zqvc.title = @"赚钱订单";
-
- cgvc = [[CGViewController alloc] init];
- cgvc.title = @"成果订单";
-
- xqvc = [[XQViewController alloc] init];
- xqvc.title = @"需求订单";
-
- hyvc = [[HYViewController alloc] init];
- hyvc.title = @"顾问订单";
- zjvc = [[OrderZJViewController alloc] init];
- zjvc.title = @"专家订单";
- self.type = @"全部订单";
- int page;
- if ([self.type isEqualToString:@"全部订单"]) {
- page = 0;
- }else if ([self.type isEqualToString:@"赚钱订单"]){
- page = 1;
- }else if ([self.type isEqualToString:@"成果订单"]){
- page = 2;
- }else if ([self.type isEqualToString:@"需求订单"]){
- page = 3;
- }else if ([self.type isEqualToString:@"顾问订单"]){
- page = 4;
- }else{
- page = 5;
- }
-
- [slider setViewControllers:@[qbvc,zqvc,cgvc,xqvc,hyvc,zjvc] owner:self page:page];
- [self.view addSubview:slider];
- UIView *controlView = [slider topControlViewWithFrame:CGRectMake(0, NavHeader, SCREEN_WIDTH, 44) titleLabelWidth:SCREEN_WIDTH/6 page:page];
-
- [self.view addSubview:controlView];
- }
- - (void)autoDownRefresh:(NSInteger)index
- {
- if (index == 0) {
- // [Purchaseintentionvc networkRequest:nil];
- }else if (index == 1) {
- // [ordervc networkRequest:nil];
- }else if (index == 2) {
- // [Demandvc networkRequest:nil];
- }else if (index == 3) {
- // [expertvc networkRequest:nil];
- }else if (index == 4) {
- // [policyvc networkRequest:nil];
- }else if (index == 5) {
- // [policyvc networkRequest:nil];
- }
-
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- @end
|