YOUPAILCVideoFinishVC.m 21 KB

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