123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518 |
- //
- // YOUPAILCVideoFinishVC.m
- // LiveChat
- //
- // Created by 张灿 on 2018/10/11.
- // Copyright © 2018年 caicai. All rights reserved.
- //
- #import "YOUPAILCVideoFinishVC.h"
- #import "YOUPAILCVideoChargeCell.h"
- #import "YOUPAIZYSelectLabelView.h"
- #import "UIView+YYAdd.h"
- #import "YOUPAILCIMSessionVC.h"
- @interface YOUPAILCVideoFinishVC()<UITableViewDelegate,UITableViewDataSource,ZYSelectLabelViewDelegate>
- @property(nonatomic,strong)UITableView* youpaiptableView;
- @property(nonatomic,assign)NSInteger youpaipdefaultEvaluate;//默认评分
- @property(nonatomic,strong)YOUPAILCVideoFinishModel* youpaipfinishModel;
- @property(nonatomic,assign)CGFloat youpaiplabelViewHeight;
- @property(nonatomic,strong)YOUPAIZYLabelModel* youpaiplabelModel;
- @property(nonatomic,strong)UIButton* youpaipsubmitBtn;
- @property(nonatomic,assign)BOOL youpaipisScusses;
- @property (nonatomic,strong) UIButton *youpaipfinishBtn;
- @property (nonatomic,strong) UIButton *youpaipstatusBtn1;
- @property (nonatomic,strong) UIButton *youpaipstatusBtn2;
- @property (nonatomic,strong) UIButton *youpaipstatusBtn3;
- /* titleLabel */
- @property (strong, nonatomic) UILabel *youpaiptitleLabel1;
- @property (strong, nonatomic) UILabel *youpaiptitleLabel2;
- @property (strong, nonatomic) UILabel *youpaiptitleLabel3;
- /* 多个标签值,隔开 */
- @property (copy, nonatomic) NSString *youpaiptagStr;
- @property(nonatomic,strong)UILabel *payLabel;
- @end
- @implementation YOUPAILCVideoFinishVC
- - (UITableView *)youpaiptableView{
- if (!_youpaiptableView) {
- _youpaiptableView = [[UITableView alloc]initWithFrame:CGRectMake(0, NavBarHeight, KScreenWidth, KScreenHeight-NavBarHeight) style:UITableViewStylePlain];
- _youpaiptableView.showsVerticalScrollIndicator = NO;
- _youpaiptableView.separatorStyle = UITableViewCellSeparatorStyleNone;
- _youpaiptableView.backgroundColor = [UIColor clearColor];
- _youpaiptableView.estimatedSectionHeaderHeight = 0;
- _youpaiptableView.estimatedSectionFooterHeight = 0;
- _youpaiptableView.delegate = self;
- _youpaiptableView.dataSource = self;
- if (@available(iOS 15.0, *)) {
- _youpaiptableView.sectionHeaderTopPadding = 0;
- }
- }
- return _youpaiptableView;
- }
- - (void)viewWillAppear:(BOOL)animated{
- [super viewWillAppear:animated];
- [self youpaifbackClick];
- self.navigationController.navigationBarHidden = YES;
- }
- - (void)viewDidAppear:(BOOL)animated{
- [super viewDidAppear:animated];
- }
- - (void)viewWillDisappear:(BOOL)animated{
- [super viewWillDisappear:animated];
- self.navigationController.navigationBarHidden = NO;
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- self.youpaiplabelViewHeight = 272;
- self.sx_disableInteractivePop = YES;
- [self youpaifloadNavView];
- self.youpaipdefaultEvaluate = 3;
- [self.view addSubview:self.youpaiptableView];
- self.youpaiptableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(youpaifinitData)];
- [self.youpaiptableView.mj_header beginRefreshing];
- [self youpaifinitUI];
- [self youpaiptableHeaderView];
- }
- -(void)youpaiptableHeaderView{
-
- UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 185)];
- self.youpaiptableView.tableHeaderView =headerView;
- //头像
- UIImageView *iconimageView = [UIImageView new];
- [headerView addSubview:iconimageView];
- [iconimageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.mas_equalTo(0);
- make.top.mas_equalTo(32);
- make.size.mas_equalTo(CGSizeMake(73, 73));
- }];
- iconimageView.layer.cornerRadius = 73/2;
- iconimageView.clipsToBounds = YES;
- iconimageView.contentMode = UIViewContentModeScaleAspectFill;
-
- //昵称
- UILabel *nickLabel = [UILabel new];
- [headerView addSubview:nickLabel];
- [nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.mas_equalTo(iconimageView);
- make.top.mas_equalTo(iconimageView.mas_bottom).offset(9);
- }];
- nickLabel.textColor = LCWhiteColor;
- nickLabel.font = [UIFont systemFontOfSize:16];
- nickLabel.textAlignment = NSTextAlignmentCenter;
- //通话结束
- UILabel *titleLabel = [UILabel new];
- [headerView addSubview:titleLabel];
- [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.mas_equalTo(0);
- make.top.mas_equalTo(nickLabel.mas_bottom).offset(24);
- }];
- titleLabel.text = @"通话结束";
- titleLabel.textColor = LCWhiteColor;
- titleLabel.font = [UIFont systemFontOfSize:20];
- if ([[LCSaveModel getUserModel].youpaipuserinfo.youpaipuser_id isEqualToString:self.youpaipvideoModel.youpaipfrom_uid]) {
- [iconimageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipto_avatar] placeholderImage:nil];;
- nickLabel.text = self.youpaipvideoModel.youpaipto_nickname;
- }else{
- [iconimageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipfrom_avatar] placeholderImage:nil];
- nickLabel.text = self.youpaipvideoModel.youpaipfrom_nickname;
- }
-
- }
- -(void)youpaifloadNavView{
-
- //bg
- UIImageView *bgImageView = [UIImageView new];
- [self.view addSubview:bgImageView];
- [bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.edges.mas_equalTo(0);
- }];
- bgImageView.contentMode = UIViewContentModeScaleAspectFill;
- if ([[LCSaveModel getUserModel].youpaipuserinfo.youpaipuser_id isEqualToString:self.youpaipvideoModel.youpaipfrom_uid]) {
- [bgImageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipto_avatar] placeholderImage:nil];;
- }else{
- [bgImageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipfrom_avatar] placeholderImage:nil];
- }
- bgImageView.userInteractionEnabled = YES;
- bgImageView.backgroundColor = HexColorFromRGBA(0x000000, 0.55);
- UIView *navView = [UIView new];
- [self.view addSubview:navView];
- [navView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.top.mas_equalTo(0);
- make.bottom.mas_equalTo(0);
- }];
- navView.backgroundColor = HexColorFromRGBA(0x000000, 0.5);
- //返回
- UIButton *cancelBtn = [UIButton new];
- [navView addSubview:cancelBtn ];
- [cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(10);
- make.top.mas_equalTo(StatusBarHeight);
- make.size.mas_equalTo(CGSizeMake(40, 40));
- }];
- [cancelBtn setImage:[UIImage imageNamed:@"vqu_images_D_cancel"] forState:UIControlStateNormal];
-
- //事件
- [cancelBtn addTarget: self action:@selector(youpaifcancelButtonClick) forControlEvents:UIControlEventTouchUpInside];
-
- }
- -(void)youpaifcancelButtonClick{
- if ([[LCSaveModel getUserModel].youpaipuserinfo.youpaipuser_id isEqualToString:self.youpaipvideoModel.youpaipfrom_uid]) {
- [self youpaifsubmitBtnAction];
- }else{
- [self dismissViewControllerAnimated:YES completion:^{
-
- }];
- }
-
-
- }
- - (void)youpaifbackClick{
- [[NSNotificationCenter defaultCenter] postNotificationName:AUDIO_VIDEO_MATCHING_END object:nil userInfo:nil];
- [self dismissViewControllerAnimated:YES completion:nil];
- }
- - (void)youpaifinitUI{
- UIButton *finishBtn = [UIButton buttonWithType:UIButtonTypeCustom];
- finishBtn.layer.cornerRadius = 24.5f;
- finishBtn.layer.masksToBounds = YES;
- [finishBtn setTitle:@"完成" forState:0];
- [finishBtn setTitleColor:[UIColor whiteColor] forState:0];
- [finishBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth - 80.0f, 49.0f) FromColors:kMainGradColors ByGradientType:GradientLeftToRight] forState:UIControlStateNormal];
- finishBtn.titleLabel.font = LCFont(16);
- [finishBtn addTarget:self action:@selector(youpaifbackClick) forControlEvents:UIControlEventTouchUpInside];
- finishBtn.hidden = YES;
- [self.view addSubview:finishBtn];
- self.youpaipfinishBtn = finishBtn;
- [finishBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.offset(40.0f);
- make.right.offset(-40.0f);
- make.bottom.offset(-30.0f-SafeHeight);
- make.height.offset(49.0f);
- }];
-
-
-
- }
- - (void)youpaifinitData{
- NSLog(@"%@",self.youpaipvideoModel.youpaiproom_id);
- [LCHttpHelper requestWithURLString:VideoFinish parameters:@{@"room_id":self.youpaipvideoModel.youpaiproom_id} needToken:YES type:(HttpRequestTypePost) success:^(id responseObject) {
- NSDictionary* dict = (NSDictionary*)responseObject;
- NSInteger code = [[dict objectForKey:@"code"] integerValue];
- if (code==0) {//成功
- self.youpaipfinishModel = [YOUPAILCVideoFinishModel mj_objectWithKeyValues:[dict objectForKey:@"data"]];
- if (self.youpaipfinishModel) {
-
-
- if (self.youpaipfinishModel.youpaipis_label == 1) {
- self.youpaiptableView.tableFooterView = [self youpaiftableFooterView];
- self.youpaipfinishBtn.hidden = YES;
- self.youpaipsubmitBtn.hidden = NO;
- }else{
- self.youpaipfinishBtn.hidden = NO;
- self.youpaipsubmitBtn.hidden = YES;
- }
- [self.youpaiptableView reloadData];
- }
- }
- [self.youpaiptableView.mj_header endRefreshing];
- } failure:^(NSError *error) {
- [self.youpaiptableView.mj_header endRefreshing];
- }];
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
- return 1;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
- // if (self.finishModel.call_time < 180) {
- //30+145+18.5;
- // }else{
- // return 30+260;
- // }
- if ([self.youpaipfinishModel.youpaippreference_type isEqualToString:@"none"]) {
- return 282;
- }else{
- return 282;
- }
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
- // if (self.finishModel.call_time < 180) {
- YOUPAILCVideoChargeCell * cell = [[YOUPAILCVideoChargeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"YOUPAILCVideoChargeCell"];
- cell.youpaipfinishModel = self.youpaipfinishModel;
-
- return cell;
- }
- -(void)submitScoreAction:(NSInteger)score
- {
- // 评分(1差劲,2一般,3愉快)
- [LCHttpHelper requestWithURLString:VideoScore parameters:@{@"room_id":self.youpaipvideoModel.youpaiproom_id,@"score":@(self.youpaipdefaultEvaluate),@"to_uid":self.youpaipvideoModel.youpaipto_uid} needToken:YES type:(HttpRequestTypePost) success:^(id responseObject) {
- NSDictionary* dict = (NSDictionary*)responseObject;
- NSInteger code = [[dict objectForKey:@"code"] integerValue];
- if (code==0) {//成功
-
- [self.youpaipsubmitBtn setTitle:@"提交成功" forState:0];
- [self.youpaipsubmitBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth-(47.5*2), 49) FromColors:kMainGradColors ByGradientType:1] forState:UIControlStateNormal];
- [self dismissViewControllerAnimated:YES completion:^{
-
- }];
- }
- } failure:^(NSError *error) {
- [self dismissViewControllerAnimated:YES completion:^{
-
- }];
- }];
- }
- -(UIView *)youpaiftableFooterView{
- UIView *tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0,0,KScreenWidth,self.youpaiplabelViewHeight)];
- //满意度
- UIView *pjBgView = [UIView new];
- [tableFooterView addSubview:pjBgView];
- [pjBgView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(12);
- make.right.mas_equalTo(0);
- make.left.mas_equalTo(0);
- make.bottom.mas_equalTo(0);
-
- }];
-
- //满意度
- UIView *pjBgView1= [UIView new];
- [pjBgView addSubview:pjBgView1];
- [pjBgView1 mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(12);
- make.right.mas_equalTo(-12);
- make.top.mas_equalTo(0);
- make.height.mas_equalTo(120);
- }];
- pjBgView1.backgroundColor = HexColorFromRGBA(0xffffff, 0.1);
- pjBgView1.layer.cornerRadius = 8;
- pjBgView1.clipsToBounds = YES;
-
- //总体评价
- UILabel* pjLabel1 = [[UILabel alloc]init];
- pjLabel1.textColor = [UIColor whiteColor];
- pjLabel1.font = LCFont16;
- pjLabel1.text = @"匿名评价";
- [pjBgView1 addSubview:pjLabel1];
- [pjLabel1 mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.mas_equalTo(0.0f);
- make.top.mas_equalTo(12);
-
- }];
-
- //3个按钮
- NSArray *titleArr = @[@"愉快",@"一般",@"差劲"];
- for (int i = 0 ; i<3; i++) {
- UIButton *manyiBtn = [[UIButton alloc]initWithFrame:CGRectMake(62+(i*62)+(i*34), 50, 34, 34)];
- [pjBgView1 addSubview:manyiBtn];
-
- //标题
- manyiBtn.tag = 6000+i;
- [manyiBtn addTarget:self action:@selector(youpaifDidClickPJ:) forControlEvents:UIControlEventTouchUpInside];
- UILabel *titleLabel = [UILabel new];
-
- [pjBgView1 addSubview:titleLabel];
- [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(manyiBtn.mas_bottom).offset(7);
- make.centerX.mas_equalTo(manyiBtn);
- }];
- titleLabel.tag = 7000+i;
- titleLabel.text =titleArr[i];
- titleLabel.font= [UIFont systemFontOfSize:10];
- titleLabel.textColor = HexColorFromRGB(0x9F9DA5);
- if (i ==0 ) {
-
- [manyiBtn setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_s"] forState:UIControlStateNormal];
- self.youpaipstatusBtn1 =manyiBtn;
- self.youpaiptitleLabel1 =titleLabel;
- self.youpaiptitleLabel1.textColor = HexColorFromRGB(0xFED64B);
- }else if (i==1){
-
- [manyiBtn setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_n"] forState:UIControlStateNormal];
- self.youpaipstatusBtn2 =manyiBtn;
- self.youpaiptitleLabel2 =titleLabel;
-
-
- }else{
-
- [manyiBtn setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_n"] forState:UIControlStateNormal];
- self.youpaipstatusBtn3 =manyiBtn;
- self.youpaiptitleLabel3 =titleLabel;
-
- }
- }
-
-
- // UIView *bgV = [[UIView alloc] init];
- // bgV.backgroundColor = HexColorFromRGB(0xffffff);
- // [tableFooterView addSubview:bgV];
- // [bgV mas_makeConstraints:^(MASConstraintMaker *make) {
- //
- // make.left.mas_equalTo(14.0f);
- // make.top.mas_equalTo(pjBgView.mas_bottom).offset(0);
- // make.right.mas_equalTo(-14.0f);
- // make.bottom.mas_equalTo(-49-30-20);
- //
- // }];
- //
- // UILabel* tipLabel = [[UILabel alloc]init];
- // tipLabel.textColor = [UIColor whiteColor];
- // tipLabel.font = LCFont16;
- // tipLabel.attributedText = [LCTools setRichTextWithTitle:@"标签" subTitle:@"(可多选)" titleColor:[UIColor whiteColor] subTitleColor:HexColorFromRGB(0x9F9DA5) titleFontSize:12 subTitleFontSize:10];;
- // [bgV addSubview:tipLabel];
- // [tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- // make.left.offset(14.0f);
- // make.right.offset(-14.0f);
- // make.height.offset(12.0f);
- // make.top.equalTo(0);
- // }];
- //
- //
- //
- //
- // YOUPAIZYSelectLabelView *labelView = [[YOUPAIZYSelectLabelView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 28.0f, 1000.0f) labelArray:self.youpaipfinishModel.youpaiplabel_list];
- // labelView.youpaipdelegate = self;
- // [bgV addSubview:labelView];
- // [labelView mas_makeConstraints:^(MASConstraintMaker *make) {
- // make.left.right.offset(0.0f);
- // make.top.equalTo(14.0f);
- // make.bottom.equalTo(0.0f);
- // }];
- // [bgV layoutIfNeeded];
- // [LCTools clipCorner:UIRectCornerBottomLeft|UIRectCornerBottomRight View:bgV size:CGSizeMake(5.0f, 5.0f)];
-
- //提交
- UIButton *submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
- submitBtn.layer.cornerRadius = 24.5f;
- submitBtn.layer.masksToBounds = YES;
- [submitBtn setTitle:@"提交评价" forState:0];
- [submitBtn setTitleColor:HexColorFromRGB(0xffffff) forState:0];
-
- submitBtn.titleLabel.font = LCFont(16);
-
- [submitBtn addTarget:self action:@selector(youpaifsubmitBtnAction) forControlEvents:UIControlEventTouchUpInside];
- [pjBgView addSubview:submitBtn];
- self.youpaipsubmitBtn = submitBtn;
- [submitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.offset(47.5f);
- make.right.offset(-47.5f);
- make.bottom.offset(-75);
- make.height.offset(49.0f);
- }];
- [submitBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth-(47.5*2), 49) FromColors:kMainGradColors ByGradientType:1] forState:UIControlStateNormal];
- // if (self.youpaiplabelViewHeight == 52.0f+114.0f) {
- // self.youpaiplabelViewHeight = labelView.youpaipcollectionView.collectionViewLayout.collectionViewContentSize.height + 52.0f+114.0f;
- // tableFooterView.frame = CGRectMake(0,0,KScreenWidth, self.youpaiplabelViewHeight);
- // }
-
- return tableFooterView;
- }
- -(void)youpaifDidClickPJ:(UIButton*)sender{
- for (int i = 0; i < 3; i++) {
- UIButton *btn = (UIButton *)[[sender superview]viewWithTag:6000 + i];
- [btn setSelected:NO];
- }
- UIButton *button = (UIButton *)sender;
- [button setSelected:YES];
- NSInteger selectBotton = sender.tag%6000;
- if (selectBotton == 0) {
- self.youpaipdefaultEvaluate = 3;
- [self.youpaipstatusBtn1 setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_s"] forState:UIControlStateNormal];
- [self.youpaipstatusBtn2 setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_n"] forState:UIControlStateNormal];
- [self.youpaipstatusBtn3 setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_n"] forState:UIControlStateNormal];
- self.youpaiptitleLabel1.textColor = HexColorFromRGB(0xFED64B);
- self.youpaiptitleLabel2.textColor = HexColorFromRGB(0x9F9DA5);
- self.youpaiptitleLabel3.textColor = HexColorFromRGB(0x9F9DA5);
-
- [self submitScoreAction:self.youpaipdefaultEvaluate];
-
- }else if(selectBotton == 1){
- self.youpaipdefaultEvaluate = 2;
- [self.youpaipstatusBtn2 setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_s"] forState:UIControlStateNormal];
- [self.youpaipstatusBtn3 setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_n"] forState:UIControlStateNormal];
- [self.youpaipstatusBtn1 setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_n"] forState:UIControlStateNormal];
- self.youpaiptitleLabel2.textColor = HexColorFromRGB(0xFED64B);
- self.youpaiptitleLabel1.textColor = HexColorFromRGB(0x9F9DA5);
- self.youpaiptitleLabel3.textColor = HexColorFromRGB(0x9F9DA5);
-
- [self submitScoreAction:self.youpaipdefaultEvaluate];
- }else{
- self.youpaipdefaultEvaluate = 1;
- [self.youpaipstatusBtn3 setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_s"] forState:UIControlStateNormal];
- [self.youpaipstatusBtn1 setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_n"] forState:UIControlStateNormal];
- [self.youpaipstatusBtn2 setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_n"] forState:UIControlStateNormal];
- self.youpaiptitleLabel3.textColor = HexColorFromRGB(0xFED64B);
- self.youpaiptitleLabel1.textColor = HexColorFromRGB(0x9F9DA5);
- self.youpaiptitleLabel2.textColor = HexColorFromRGB(0x9F9DA5);
-
- [self submitScoreAction:self.youpaipdefaultEvaluate];
- }
-
- }
- #pragma mark ZYSelectLabelViewDelegate
- -(void)youpaifselectLabel:(NSArray<YOUPAIZYLabelModel *> *)labelModelArr
- {
- NSMutableArray *tagArr = [NSMutableArray new];
- if (labelModelArr.count>0) {
- if (tagArr.count>0) {
- [tagArr removeAllObjects];
- }
- for (int i= 0; i<labelModelArr.count; i++) {
- YOUPAIZYLabelModel *model = labelModelArr[i];
- [tagArr addObject:model.youpaiptag_id];
-
- }
- self.youpaiptagStr = [tagArr componentsJoinedByString:@","];
- }
-
-
- if (!self.youpaipisScusses) {
- [self.youpaipsubmitBtn setTitle:@"提交评价" forState:0];
- self.youpaipsubmitBtn.userInteractionEnabled = YES;
- [self.youpaipsubmitBtn setBackgroundColor:[UIColor clearColor]];
- [self.youpaipsubmitBtn setTitleColor:[UIColor whiteColor] forState:0];
- [self.youpaipsubmitBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth - 80.0f, 49.0f) FromColors:kMainGradColors ByGradientType:GradientLeftToRight] forState:UIControlStateNormal];
- }
- }
- -(void)youpaifsubmitBtnAction{
- [self submitScoreAction:self.youpaipdefaultEvaluate];
-
- }
- //-(void)youpaifsubmitBtnAction:(UIButton *)sender
- //{
- //
- //
- // [LCHttpHelper requestWithURLString:ChatAddLabel parameters:@{@"to_uid":self.youpaipfinishModel.youpaipto_uid,@"room_id":self.youpaipvideoModel.youpaiproom_id} needToken:YES type:(HttpRequestTypePost) success:^(id responseObject) {
- // NSDictionary* dict = (NSDictionary*)responseObject;
- // NSInteger code = [[dict objectForKey:@"code"] integerValue];
- // if (code==0) {//成功
- // self.youpaipisScusses = YES;
- // [ZCHUDHelper showTitle:@"提交成功"];
- // [self dismissViewControllerAnimated:YES completion:^{
- //
- // }];
- //
- //
- //
- //
- // }
- //
- // } failure:^(NSError *error) {
- // }];
- //
- //}
- @end
|