YOUPAILCVideoFinishVC.m 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. //
  2. // YOUPAILCVideoFinishVC.m
  3. // LiveChat
  4. //
  5. // Created by 张灿 on 2018/10/11.
  6. // Copyright © 2018年 caicai. All rights reserved.
  7. //
  8. #import "YOUPAILCVideoFinishVC.h"
  9. #import "YOUPAILCVideoChargeCell.h"
  10. #import "YOUPAIZYSelectLabelView.h"
  11. #import "UIView+YYAdd.h"
  12. #import "YOUPAILCIMSessionVC.h"
  13. @interface YOUPAILCVideoFinishVC()<UITableViewDelegate,UITableViewDataSource,ZYSelectLabelViewDelegate>
  14. @property(nonatomic,strong)UITableView* youpaiptableView;
  15. @property(nonatomic,assign)NSInteger youpaipdefaultEvaluate;//默认评分
  16. @property(nonatomic,strong)YOUPAILCVideoFinishModel* youpaipfinishModel;
  17. @property(nonatomic,assign)CGFloat youpaiplabelViewHeight;
  18. @property(nonatomic,strong)YOUPAIZYLabelModel* youpaiplabelModel;
  19. @property(nonatomic,strong)UIButton* youpaipsubmitBtn;
  20. @property(nonatomic,assign)BOOL youpaipisScusses;
  21. @property (nonatomic,strong) UIButton *youpaipfinishBtn;
  22. @property (nonatomic,strong) UIButton *youpaipstatusBtn1;
  23. @property (nonatomic,strong) UIButton *youpaipstatusBtn2;
  24. @property (nonatomic,strong) UIButton *youpaipstatusBtn3;
  25. /* titleLabel */
  26. @property (strong, nonatomic) UILabel *youpaiptitleLabel1;
  27. @property (strong, nonatomic) UILabel *youpaiptitleLabel2;
  28. @property (strong, nonatomic) UILabel *youpaiptitleLabel3;
  29. /* 多个标签值,隔开 */
  30. @property (copy, nonatomic) NSString *youpaiptagStr;
  31. @property(nonatomic,strong)UILabel *payLabel;
  32. @end
  33. @implementation YOUPAILCVideoFinishVC
  34. - (UITableView *)youpaiptableView{
  35. if (!_youpaiptableView) {
  36. _youpaiptableView = [[UITableView alloc]initWithFrame:CGRectMake(0, NavBarHeight, KScreenWidth, KScreenHeight-NavBarHeight) style:UITableViewStylePlain];
  37. _youpaiptableView.showsVerticalScrollIndicator = NO;
  38. _youpaiptableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  39. _youpaiptableView.backgroundColor = [UIColor clearColor];
  40. _youpaiptableView.estimatedSectionHeaderHeight = 0;
  41. _youpaiptableView.estimatedSectionFooterHeight = 0;
  42. _youpaiptableView.delegate = self;
  43. _youpaiptableView.dataSource = self;
  44. if (@available(iOS 15.0, *)) {
  45. _youpaiptableView.sectionHeaderTopPadding = 0;
  46. }
  47. }
  48. return _youpaiptableView;
  49. }
  50. - (void)viewWillAppear:(BOOL)animated{
  51. [super viewWillAppear:animated];
  52. self.navigationController.navigationBarHidden = YES;
  53. [self youpaifbackClick];
  54. }
  55. - (void)viewDidAppear:(BOOL)animated{
  56. [super viewDidAppear:animated];
  57. }
  58. - (void)viewWillDisappear:(BOOL)animated{
  59. [super viewWillDisappear:animated];
  60. self.navigationController.navigationBarHidden = NO;
  61. }
  62. - (void)viewDidLoad {
  63. [super viewDidLoad];
  64. [self youpaifbackClick];
  65. // self.youpaiplabelViewHeight = 272;
  66. // self.sx_disableInteractivePop = YES;
  67. // [self youpaifloadNavView];
  68. // self.youpaipdefaultEvaluate = 3;
  69. // [self.view addSubview:self.youpaiptableView];
  70. // self.youpaiptableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(youpaifinitData)];
  71. // [self.youpaiptableView.mj_header beginRefreshing];
  72. // [self youpaifinitUI];
  73. // [self youpaiptableHeaderView];
  74. }
  75. -(void)youpaiptableHeaderView{
  76. UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 185)];
  77. self.youpaiptableView.tableHeaderView =headerView;
  78. //头像
  79. UIImageView *iconimageView = [UIImageView new];
  80. [headerView addSubview:iconimageView];
  81. [iconimageView mas_makeConstraints:^(MASConstraintMaker *make) {
  82. make.centerX.mas_equalTo(0);
  83. make.top.mas_equalTo(32);
  84. make.size.mas_equalTo(CGSizeMake(73, 73));
  85. }];
  86. iconimageView.layer.cornerRadius = 73/2;
  87. iconimageView.clipsToBounds = YES;
  88. iconimageView.contentMode = UIViewContentModeScaleAspectFill;
  89. //昵称
  90. UILabel *nickLabel = [UILabel new];
  91. [headerView addSubview:nickLabel];
  92. [nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  93. make.centerX.mas_equalTo(iconimageView);
  94. make.top.mas_equalTo(iconimageView.mas_bottom).offset(9);
  95. }];
  96. nickLabel.textColor = LCWhiteColor;
  97. nickLabel.font = [UIFont systemFontOfSize:16];
  98. nickLabel.textAlignment = NSTextAlignmentCenter;
  99. //通话结束
  100. UILabel *titleLabel = [UILabel new];
  101. [headerView addSubview:titleLabel];
  102. [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  103. make.centerX.mas_equalTo(0);
  104. make.top.mas_equalTo(nickLabel.mas_bottom).offset(24);
  105. }];
  106. titleLabel.text = @"通话结束";
  107. titleLabel.textColor = LCWhiteColor;
  108. titleLabel.font = [UIFont systemFontOfSize:20];
  109. if ([[LCSaveModel getUserModel].youpaipuserinfo.youpaipuser_id isEqualToString:self.youpaipvideoModel.youpaipfrom_uid]) {
  110. [iconimageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipto_avatar] placeholderImage:nil];;
  111. nickLabel.text = self.youpaipvideoModel.youpaipto_nickname;
  112. }else{
  113. [iconimageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipfrom_avatar] placeholderImage:nil];
  114. nickLabel.text = self.youpaipvideoModel.youpaipfrom_nickname;
  115. }
  116. //返回
  117. UIButton *cancelBtn = [UIButton new];
  118. [self.view addSubview:cancelBtn];
  119. [cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  120. make.left.mas_equalTo(10);
  121. make.top.mas_equalTo(StatusBarHeight);
  122. make.size.mas_equalTo(CGSizeMake(40, 40));
  123. }];
  124. [cancelBtn setImage:[UIImage imageNamed:@"vqu_images_D_cancel"] forState:UIControlStateNormal];
  125. //事件
  126. [cancelBtn addTarget: self action:@selector(youpaifbackClick) forControlEvents:UIControlEventTouchUpInside];
  127. }
  128. -(void)youpaifloadNavView{
  129. //bg
  130. UIImageView *bgImageView = [UIImageView new];
  131. [self.view addSubview:bgImageView];
  132. [bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  133. make.edges.mas_equalTo(0);
  134. }];
  135. bgImageView.contentMode = UIViewContentModeScaleAspectFill;
  136. if ([[LCSaveModel getUserModel].youpaipuserinfo.youpaipuser_id isEqualToString:self.youpaipvideoModel.youpaipfrom_uid]) {
  137. [bgImageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipto_avatar] placeholderImage:nil];;
  138. }else{
  139. [bgImageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipvideoModel.youpaipfrom_avatar] placeholderImage:nil];
  140. }
  141. bgImageView.userInteractionEnabled = YES;
  142. bgImageView.backgroundColor = HexColorFromRGBA(0x000000, 0.55);
  143. UIView *navView = [UIView new];
  144. [self.view addSubview:navView];
  145. [navView mas_makeConstraints:^(MASConstraintMaker *make) {
  146. make.left.mas_equalTo(0);
  147. make.right.mas_equalTo(0);
  148. make.top.mas_equalTo(0);
  149. make.bottom.mas_equalTo(0);
  150. }];
  151. navView.backgroundColor = HexColorFromRGBA(0x000000, 0.5);
  152. }
  153. - (void)youpaifcancelButtonClick {
  154. [self.navigationController popViewControllerAnimated:YES];
  155. [self dismissViewControllerAnimated:YES completion:^{
  156. if ([[LCSaveModel getUserModel].youpaipuserinfo.youpaipuser_id isEqualToString:self.youpaipvideoModel.youpaipfrom_uid]) {
  157. [self youpaifsubmitBtnAction];
  158. }
  159. }];
  160. }
  161. - (void)youpaifbackClick{
  162. [[NSNotificationCenter defaultCenter] postNotificationName:AUDIO_VIDEO_MATCHING_END object:nil userInfo:nil];
  163. [self dismissViewControllerAnimated:YES completion:nil];
  164. }
  165. - (void)youpaifinitUI{
  166. UIButton *finishBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  167. finishBtn.layer.cornerRadius = 24.5f;
  168. finishBtn.layer.masksToBounds = YES;
  169. [finishBtn setTitle:@"完成" forState:0];
  170. [finishBtn setTitleColor:[UIColor whiteColor] forState:0];
  171. [finishBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth - 80.0f, 49.0f) FromColors:kMainGradColors ByGradientType:GradientLeftToRight] forState:UIControlStateNormal];
  172. finishBtn.titleLabel.font = LCFont(16);
  173. [finishBtn addTarget:self action:@selector(youpaifbackClick) forControlEvents:UIControlEventTouchUpInside];
  174. finishBtn.hidden = YES;
  175. [self.view addSubview:finishBtn];
  176. self.youpaipfinishBtn = finishBtn;
  177. [finishBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  178. make.left.offset(40.0f);
  179. make.right.offset(-40.0f);
  180. make.bottom.offset(-30.0f-SafeHeight);
  181. make.height.offset(49.0f);
  182. }];
  183. }
  184. - (void)youpaifinitData{
  185. NSLog(@"%@",self.youpaipvideoModel.youpaiproom_id);
  186. [LCHttpHelper requestWithURLString:VideoFinish parameters:@{@"room_id":self.youpaipvideoModel.youpaiproom_id} needToken:YES type:(HttpRequestTypePost) success:^(id responseObject) {
  187. NSDictionary* dict = (NSDictionary*)responseObject;
  188. NSInteger code = [[dict objectForKey:@"code"] integerValue];
  189. if (code==0) {//成功
  190. self.youpaipfinishModel = [YOUPAILCVideoFinishModel mj_objectWithKeyValues:[dict objectForKey:@"data"]];
  191. if (self.youpaipfinishModel) {
  192. if (self.youpaipfinishModel.youpaipis_label == 1) {
  193. self.youpaiptableView.tableFooterView = [self youpaiftableFooterView];
  194. self.youpaipfinishBtn.hidden = YES;
  195. self.youpaipsubmitBtn.hidden = NO;
  196. }else{
  197. self.youpaipfinishBtn.hidden = NO;
  198. self.youpaipsubmitBtn.hidden = YES;
  199. }
  200. [self.youpaiptableView reloadData];
  201. }
  202. }
  203. [self.youpaiptableView.mj_header endRefreshing];
  204. } failure:^(NSError *error) {
  205. [self.youpaiptableView.mj_header endRefreshing];
  206. }];
  207. }
  208. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
  209. return 1;
  210. }
  211. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  212. // if (self.finishModel.call_time < 180) {
  213. //30+145+18.5;
  214. // }else{
  215. // return 30+260;
  216. // }
  217. if ([self.youpaipfinishModel.youpaippreference_type isEqualToString:@"none"]) {
  218. return 282;
  219. }else{
  220. return 282;
  221. }
  222. }
  223. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  224. // if (self.finishModel.call_time < 180) {
  225. YOUPAILCVideoChargeCell * cell = [[YOUPAILCVideoChargeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"YOUPAILCVideoChargeCell"];
  226. cell.youpaipfinishModel = self.youpaipfinishModel;
  227. return cell;
  228. }
  229. - (void)submitScoreAction:(NSInteger)score {
  230. // 评分(1差劲,2一般,3愉快)
  231. [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) {
  232. NSDictionary* dict = (NSDictionary*)responseObject;
  233. NSInteger code = [[dict objectForKey:@"code"] integerValue];
  234. if (code==0) {//成功
  235. [self.youpaipsubmitBtn setTitle:@"提交成功" forState:0];
  236. [self.youpaipsubmitBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth-(47.5*2), 49) FromColors:kMainGradColors ByGradientType:1] forState:UIControlStateNormal];
  237. // [self dismissViewControllerAnimated:YES completion:^{
  238. //
  239. // }];
  240. }
  241. } failure:^(NSError *error) {
  242. // [self dismissViewControllerAnimated:YES completion:^{
  243. //
  244. // }];
  245. }];
  246. }
  247. -(UIView *)youpaiftableFooterView{
  248. UIView *tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0,0,KScreenWidth,self.youpaiplabelViewHeight)];
  249. //满意度
  250. UIView *pjBgView = [UIView new];
  251. [tableFooterView addSubview:pjBgView];
  252. [pjBgView mas_makeConstraints:^(MASConstraintMaker *make) {
  253. make.top.mas_equalTo(12);
  254. make.right.mas_equalTo(0);
  255. make.left.mas_equalTo(0);
  256. make.bottom.mas_equalTo(0);
  257. }];
  258. //满意度
  259. UIView *pjBgView1= [UIView new];
  260. [pjBgView addSubview:pjBgView1];
  261. [pjBgView1 mas_makeConstraints:^(MASConstraintMaker *make) {
  262. make.left.mas_equalTo(12);
  263. make.right.mas_equalTo(-12);
  264. make.top.mas_equalTo(0);
  265. make.height.mas_equalTo(120);
  266. }];
  267. pjBgView1.backgroundColor = HexColorFromRGBA(0xffffff, 0.1);
  268. pjBgView1.layer.cornerRadius = 8;
  269. pjBgView1.clipsToBounds = YES;
  270. //总体评价
  271. UILabel* pjLabel1 = [[UILabel alloc]init];
  272. pjLabel1.textColor = [UIColor whiteColor];
  273. pjLabel1.font = LCFont16;
  274. pjLabel1.text = @"匿名评价";
  275. [pjBgView1 addSubview:pjLabel1];
  276. [pjLabel1 mas_makeConstraints:^(MASConstraintMaker *make) {
  277. make.centerX.mas_equalTo(0.0f);
  278. make.top.mas_equalTo(12);
  279. }];
  280. //3个按钮
  281. NSArray *titleArr = @[@"愉快",@"一般",@"差劲"];
  282. for (int i = 0 ; i<3; i++) {
  283. UIButton *manyiBtn = [[UIButton alloc]initWithFrame:CGRectMake(62+(i*62)+(i*34), 50, 34, 34)];
  284. [pjBgView1 addSubview:manyiBtn];
  285. //标题
  286. manyiBtn.tag = 6000+i;
  287. [manyiBtn addTarget:self action:@selector(youpaifDidClickPJ:) forControlEvents:UIControlEventTouchUpInside];
  288. UILabel *titleLabel = [UILabel new];
  289. [pjBgView1 addSubview:titleLabel];
  290. [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  291. make.top.mas_equalTo(manyiBtn.mas_bottom).offset(7);
  292. make.centerX.mas_equalTo(manyiBtn);
  293. }];
  294. titleLabel.tag = 7000+i;
  295. titleLabel.text =titleArr[i];
  296. titleLabel.font= [UIFont systemFontOfSize:10];
  297. titleLabel.textColor = HexColorFromRGB(0x9F9DA5);
  298. if (i ==0 ) {
  299. [manyiBtn setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_s"] forState:UIControlStateNormal];
  300. self.youpaipstatusBtn1 =manyiBtn;
  301. self.youpaiptitleLabel1 =titleLabel;
  302. self.youpaiptitleLabel1.textColor = HexColorFromRGB(0xFED64B);
  303. }else if (i==1){
  304. [manyiBtn setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_n"] forState:UIControlStateNormal];
  305. self.youpaipstatusBtn2 =manyiBtn;
  306. self.youpaiptitleLabel2 =titleLabel;
  307. }else{
  308. [manyiBtn setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_n"] forState:UIControlStateNormal];
  309. self.youpaipstatusBtn3 =manyiBtn;
  310. self.youpaiptitleLabel3 =titleLabel;
  311. }
  312. }
  313. // UIView *bgV = [[UIView alloc] init];
  314. // bgV.backgroundColor = HexColorFromRGB(0xffffff);
  315. // [tableFooterView addSubview:bgV];
  316. // [bgV mas_makeConstraints:^(MASConstraintMaker *make) {
  317. //
  318. // make.left.mas_equalTo(14.0f);
  319. // make.top.mas_equalTo(pjBgView.mas_bottom).offset(0);
  320. // make.right.mas_equalTo(-14.0f);
  321. // make.bottom.mas_equalTo(-49-30-20);
  322. //
  323. // }];
  324. //
  325. // UILabel* tipLabel = [[UILabel alloc]init];
  326. // tipLabel.textColor = [UIColor whiteColor];
  327. // tipLabel.font = LCFont16;
  328. // tipLabel.attributedText = [LCTools setRichTextWithTitle:@"标签" subTitle:@"(可多选)" titleColor:[UIColor whiteColor] subTitleColor:HexColorFromRGB(0x9F9DA5) titleFontSize:12 subTitleFontSize:10];;
  329. // [bgV addSubview:tipLabel];
  330. // [tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  331. // make.left.offset(14.0f);
  332. // make.right.offset(-14.0f);
  333. // make.height.offset(12.0f);
  334. // make.top.equalTo(0);
  335. // }];
  336. //
  337. //
  338. //
  339. //
  340. // YOUPAIZYSelectLabelView *labelView = [[YOUPAIZYSelectLabelView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 28.0f, 1000.0f) labelArray:self.youpaipfinishModel.youpaiplabel_list];
  341. // labelView.youpaipdelegate = self;
  342. // [bgV addSubview:labelView];
  343. // [labelView mas_makeConstraints:^(MASConstraintMaker *make) {
  344. // make.left.right.offset(0.0f);
  345. // make.top.equalTo(14.0f);
  346. // make.bottom.equalTo(0.0f);
  347. // }];
  348. // [bgV layoutIfNeeded];
  349. // [LCTools clipCorner:UIRectCornerBottomLeft|UIRectCornerBottomRight View:bgV size:CGSizeMake(5.0f, 5.0f)];
  350. //提交
  351. UIButton *submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  352. submitBtn.layer.cornerRadius = 24.5f;
  353. submitBtn.layer.masksToBounds = YES;
  354. [submitBtn setTitle:@"提交评价" forState:0];
  355. [submitBtn setTitleColor:HexColorFromRGB(0xffffff) forState:0];
  356. submitBtn.titleLabel.font = LCFont(16);
  357. [submitBtn addTarget:self action:@selector(youpaifsubmitBtnAction) forControlEvents:UIControlEventTouchUpInside];
  358. [pjBgView addSubview:submitBtn];
  359. self.youpaipsubmitBtn = submitBtn;
  360. [submitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  361. make.left.offset(47.5f);
  362. make.right.offset(-47.5f);
  363. make.bottom.offset(-75);
  364. make.height.offset(49.0f);
  365. }];
  366. [submitBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth-(47.5*2), 49) FromColors:kMainGradColors ByGradientType:1] forState:UIControlStateNormal];
  367. // if (self.youpaiplabelViewHeight == 52.0f+114.0f) {
  368. // self.youpaiplabelViewHeight = labelView.youpaipcollectionView.collectionViewLayout.collectionViewContentSize.height + 52.0f+114.0f;
  369. // tableFooterView.frame = CGRectMake(0,0,KScreenWidth, self.youpaiplabelViewHeight);
  370. // }
  371. return tableFooterView;
  372. }
  373. -(void)youpaifDidClickPJ:(UIButton*)sender{
  374. for (int i = 0; i < 3; i++) {
  375. UIButton *btn = (UIButton *)[[sender superview]viewWithTag:6000 + i];
  376. [btn setSelected:NO];
  377. }
  378. UIButton *button = (UIButton *)sender;
  379. [button setSelected:YES];
  380. NSInteger selectBotton = sender.tag%6000;
  381. if (selectBotton == 0) {
  382. self.youpaipdefaultEvaluate = 3;
  383. [self.youpaipstatusBtn1 setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_s"] forState:UIControlStateNormal];
  384. [self.youpaipstatusBtn2 setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_n"] forState:UIControlStateNormal];
  385. [self.youpaipstatusBtn3 setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_n"] forState:UIControlStateNormal];
  386. self.youpaiptitleLabel1.textColor = HexColorFromRGB(0xFED64B);
  387. self.youpaiptitleLabel2.textColor = HexColorFromRGB(0x9F9DA5);
  388. self.youpaiptitleLabel3.textColor = HexColorFromRGB(0x9F9DA5);
  389. [self submitScoreAction:self.youpaipdefaultEvaluate];
  390. }else if(selectBotton == 1){
  391. self.youpaipdefaultEvaluate = 2;
  392. [self.youpaipstatusBtn2 setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_s"] forState:UIControlStateNormal];
  393. [self.youpaipstatusBtn3 setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_n"] forState:UIControlStateNormal];
  394. [self.youpaipstatusBtn1 setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_n"] forState:UIControlStateNormal];
  395. self.youpaiptitleLabel2.textColor = HexColorFromRGB(0xFED64B);
  396. self.youpaiptitleLabel1.textColor = HexColorFromRGB(0x9F9DA5);
  397. self.youpaiptitleLabel3.textColor = HexColorFromRGB(0x9F9DA5);
  398. [self submitScoreAction:self.youpaipdefaultEvaluate];
  399. }else{
  400. self.youpaipdefaultEvaluate = 1;
  401. [self.youpaipstatusBtn3 setImage:[UIImage imageNamed:@"vqu_images_IM_bugaoxin_s"] forState:UIControlStateNormal];
  402. [self.youpaipstatusBtn1 setImage:[UIImage imageNamed:@"vqu_images_IM_gaoxin_n"] forState:UIControlStateNormal];
  403. [self.youpaipstatusBtn2 setImage:[UIImage imageNamed:@"vqu_images_IM_yukuai_n"] forState:UIControlStateNormal];
  404. self.youpaiptitleLabel3.textColor = HexColorFromRGB(0xFED64B);
  405. self.youpaiptitleLabel1.textColor = HexColorFromRGB(0x9F9DA5);
  406. self.youpaiptitleLabel2.textColor = HexColorFromRGB(0x9F9DA5);
  407. [self submitScoreAction:self.youpaipdefaultEvaluate];
  408. }
  409. }
  410. #pragma mark ZYSelectLabelViewDelegate
  411. -(void)youpaifselectLabel:(NSArray<YOUPAIZYLabelModel *> *)labelModelArr
  412. {
  413. NSMutableArray *tagArr = [NSMutableArray new];
  414. if (labelModelArr.count>0) {
  415. if (tagArr.count>0) {
  416. [tagArr removeAllObjects];
  417. }
  418. for (int i= 0; i<labelModelArr.count; i++) {
  419. YOUPAIZYLabelModel *model = labelModelArr[i];
  420. [tagArr addObject:model.youpaiptag_id];
  421. }
  422. self.youpaiptagStr = [tagArr componentsJoinedByString:@","];
  423. }
  424. if (!self.youpaipisScusses) {
  425. [self.youpaipsubmitBtn setTitle:@"提交评价" forState:0];
  426. self.youpaipsubmitBtn.userInteractionEnabled = YES;
  427. [self.youpaipsubmitBtn setBackgroundColor:[UIColor clearColor]];
  428. [self.youpaipsubmitBtn setTitleColor:[UIColor whiteColor] forState:0];
  429. [self.youpaipsubmitBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth - 80.0f, 49.0f) FromColors:kMainGradColors ByGradientType:GradientLeftToRight] forState:UIControlStateNormal];
  430. }
  431. }
  432. -(void)youpaifsubmitBtnAction{
  433. [self submitScoreAction:self.youpaipdefaultEvaluate];
  434. }
  435. //-(void)youpaifsubmitBtnAction:(UIButton *)sender
  436. //{
  437. //
  438. //
  439. // [LCHttpHelper requestWithURLString:ChatAddLabel parameters:@{@"to_uid":self.youpaipfinishModel.youpaipto_uid,@"room_id":self.youpaipvideoModel.youpaiproom_id} needToken:YES type:(HttpRequestTypePost) success:^(id responseObject) {
  440. // NSDictionary* dict = (NSDictionary*)responseObject;
  441. // NSInteger code = [[dict objectForKey:@"code"] integerValue];
  442. // if (code==0) {//成功
  443. // self.youpaipisScusses = YES;
  444. // [ZCHUDHelper showTitle:@"提交成功"];
  445. // [self dismissViewControllerAnimated:YES completion:^{
  446. //
  447. // }];
  448. //
  449. //
  450. //
  451. //
  452. // }
  453. //
  454. // } failure:^(NSError *error) {
  455. // }];
  456. //
  457. //}
  458. @end