123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- //
- // ShowCommentVC.m
- // jiaPei
- //
- // Created by apple on 16/6/27.
- // Copyright © 2016年 JCZ. All rights reserved.
- //
- #import "ShowCommentVC.h"
- @interface ShowCommentVC ()
- {
- UILabel *timeLabel;
- UILabel *remarkLabel;
- UILabel *tslxLabel;
- }
- @end
- @implementation ShowCommentVC
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- [self myInit];
- }
- -(void)myInit
- {
- self.view.backgroundColor = backGroundColor;
- self.title = @"学员投诉";
- [self configNavBar];
-
- CGFloat x,y,w,h,wid;
- x = 20;
- y = 20 + kNavOffSet;
- w = kSize.width - 2*x;
- h = 30;
- timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, y, w, h)];
- [timeLabel setText:@"" Font:Font16 TextColor:contentTextColor Alignment:NSTextAlignmentRight];
- [self.view addSubview:timeLabel];
- [timeLabel addViewWithRect:CGRectMake(10, y+h, kSize.width - 20, 1)];
-
- y += h + 10;
- wid = 90;
- UILabel *tslx = [[UILabel alloc]initWithFrame:CGRectMake(x, y, wid, h)];
- [tslx setText:@"投诉类型:" Font:Font16 TextColor:titleColor Alignment:NSTextAlignmentLeft];
- [self.view addSubview:tslx];
-
- x += wid+5;
- w -= wid;
- h = 60;
- tslxLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, y, w, h)];
- tslxLabel.numberOfLines = 0;
- [tslxLabel setText:@"" Font:Font16 TextColor:titleColor Alignment:NSTextAlignmentLeft];
- [self.view addSubview:tslxLabel];
-
- x = 20;
- y += h + 10;
- h = 30;
- UILabel *tsnrLab = [[UILabel alloc]initWithFrame:CGRectMake(x, y, wid, h)];
- [tsnrLab setText:@"投诉内容:" Font:Font16 TextColor:titleColor Alignment:NSTextAlignmentLeft];
- [self.view addSubview:tsnrLab];
-
- x += wid+5;
- h = 150;
- remarkLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, y, w, h)];
- remarkLabel.numberOfLines = 0;
- [remarkLabel setText:@"" Font:Font16 TextColor:titleColor Alignment:NSTextAlignmentLeft];
- [self.view addSubview:remarkLabel];
-
- [self getOrderComplaintsById];
- }
- #pragma mark 数据请求
- -(void)getOrderComplaintsById
- {
- [LoadingView showHUD];
- if (![Util connectedToNetWork]) {
- return;
- }
-
- NSMutableArray *arr=[NSMutableArray array];
- [arr addPro:@"classId" Value:_classID];
- [arr addPro:@"userId" Value:_stuId];//传outid
-
- NSString* method = @"getOrderComplaintsByClassId";
- [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary * root) {
- RemoveHUD();
- //执行同步并取得结果
-
- //NSLog(@"投诉内容-->%@-->%@",arr,root);
- if (!root) {
- ShowMsgFailed();
- return;
- }
- if ([root[@"code"] isEqualToString:@"1"]) {
- ShowMsg(root[@"body"]);
- return;
- }
-
- NSDictionary *dic = root[@"body"];
-
-
- timeLabel.text = [dic[@"RC_CRDATE"] substringToIndex:16];
-
- NSString *titleString = [NSString stringWithFormat:@"%@",dic[@"RT_TITLE"]];
- if ([dic[@"RT_TITLE"] length] < 1) {
- titleString = @"暂无";
- }
- tslxLabel.height = [titleString heightForWid:kSize.width - 40 - 95 Font:Font16];
- tslxLabel.text = titleString;
-
- NSString *contentString = [NSString stringWithFormat:@"%@",dic[@"RC_MARK"]];
- if ([dic[@"RC_MARK"] length] < 1) {
- contentString = @"暂无";
- }
- remarkLabel.height = [contentString heightForWid:kSize.width - 40 - 95 Font:Font16];
- remarkLabel.text = contentString;
- }];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- }
- @end
|