// // orderCommentVC.m // jiaPei // // Created by EchoShacolee on 2017/2/21. // Copyright © 2017年 JCZ. All rights reserved. // #import "orderCommentVC.h" #import "RatingBar.h" @interface orderCommentVC () { NSDictionary * _dataDic; } @property (weak, nonatomic) IBOutlet UILabel *coachNameLab; @property (weak, nonatomic) IBOutlet UIView *ratingBar; @property (weak, nonatomic) IBOutlet UIView *lableView; @property (weak, nonatomic) IBOutlet UILabel *timeLab; @property (weak, nonatomic) IBOutlet UITextView *textView; @end @implementation orderCommentVC - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. self.title = @"我的评价"; [self configNavigationBar]; _dataDic = [NSMutableDictionary new]; if (self.type == 1) { [self getClassIdEvaluateById]; }else if(self.type == 2){ [self getEvaluationList]; } } -(void)myInit { if (_type == 1) { _coachNameLab.text = self.dic[@"RO_COACH_NAME"]; }else if (_type == 2){ _coachNameLab.text = self.dic[@"coachName"]; } RatingBar * starBar = [[RatingBar alloc]initWithFrame:_ratingBar.bounds Flag:YES]; if (_dataDic[@"overall"]) { starBar.starNumber = [_dataDic[@"overall"] integerValue]; } starBar.enable = NO; [_ratingBar addSubview:starBar]; //lableview NSArray * array = [_dataDic[@"srvmanner"] componentsSeparatedByString:@","]; UILabel * lable; CGFloat x = 0; CGFloat y = 5; CGFloat w = 0; CGFloat h = 30; CGFloat bd = (kSize.width - 20 - 300)/2+5; for (int i=0;i 0) { NSDictionary * dic = array[0]; [_dataDic setValue:dic[@"EI_TEACHLEVEL"] forKey:@"teachLevel"]; [_dataDic setValue:dic[@"EVALUATETIME"] forKey:@"evaluateTime"]; [_dataDic setValue:dic[@"EI_SRVMANNER"] forKey:@"srvmanner"]; [_dataDic setValue:dic[@"EI_OVERALL"] forKey:@"overall"]; } [self myInit]; }]; } @end