Commit 396e4590 authored by admin's avatar admin

晚上在线抽查

parent d24f65b9
......@@ -19,6 +19,7 @@
35F68BDA1C30FFDE00994F53 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F68BD91C30FFDE00994F53 /* QuartzCore.framework */; };
35F68BDC1C30FFEA00994F53 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F68BDB1C30FFEA00994F53 /* OpenGLES.framework */; };
35F68BDE1C30FFF300994F53 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F68BDD1C30FFF300994F53 /* Security.framework */; };
84014A091C46384700E7963B /* LookOnLineDetailCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84014A081C46384700E7963B /* LookOnLineDetailCell.m */; };
8409BDF81C281ACD00354460 /* CheckBoxButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8409BDE81C281ACD00354460 /* CheckBoxButton.m */; };
8409BDF91C281ACD00354460 /* SelectYetTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8409BDEA1C281ACD00354460 /* SelectYetTableViewCell.m */; };
8409BDFA1C281ACD00354460 /* TreeNodeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8409BDEC1C281ACD00354460 /* TreeNodeCell.m */; };
......@@ -211,6 +212,8 @@
35F68BDB1C30FFEA00994F53 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
35F68BDD1C30FFF300994F53 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
6C6D8B0ECF8531E34D0DFF6B /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
84014A071C46384700E7963B /* LookOnLineDetailCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookOnLineDetailCell.h; sourceTree = "<group>"; };
84014A081C46384700E7963B /* LookOnLineDetailCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LookOnLineDetailCell.m; sourceTree = "<group>"; };
8409BDE71C281ACD00354460 /* CheckBoxButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckBoxButton.h; sourceTree = "<group>"; };
8409BDE81C281ACD00354460 /* CheckBoxButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CheckBoxButton.m; sourceTree = "<group>"; };
8409BDE91C281ACD00354460 /* SelectYetTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectYetTableViewCell.h; sourceTree = "<group>"; };
......@@ -1865,6 +1868,8 @@
84CC34E41C09AD58002F10E2 /* Cell */ = {
isa = PBXGroup;
children = (
84014A071C46384700E7963B /* LookOnLineDetailCell.h */,
84014A081C46384700E7963B /* LookOnLineDetailCell.m */,
);
path = Cell;
sourceTree = "<group>";
......@@ -2448,6 +2453,7 @@
84CC34D11C093C5E002F10E2 /* LookOnLineViewController.m in Sources */,
84D863731C11923F00E4F4CC /* AddQuestionTableCell.m in Sources */,
84D8257F1BDD2F7E00CC61F7 /* MineTableFooterView.m in Sources */,
84014A091C46384700E7963B /* LookOnLineDetailCell.m in Sources */,
84F57C501BEC7AA300DDEEB1 /* AddQuestionFooterView.m in Sources */,
84CF0F1E1BE9B40400C855CE /* InspectDetailFooterView.m in Sources */,
84F30DA41BFC19F200CBAD13 /* RankListModel.m in Sources */,
......
......@@ -10,10 +10,10 @@
#define Url_h
// url 测试环境
#define kRedStarURL @"http://218.244.151.129:7580/"
// #define kRedStarURL @"http://218.244.151.129:7580/"
// 正式环境
//#define kRedStarURL @"http://219.235.234.225:7580/"
#define kRedStarURL @"http://219.235.234.225:7580/"
// 最新正式环境
// #define kRedStarURL @"http://219.235.234.212:7580/"
......
......@@ -52,7 +52,6 @@
NSString *url = [NSString stringWithFormat:@"%@%@%@", kRedStarURL, kAnnounceDetailURL, self.affiche_uuid];
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
[httpCilent getAnnounceDetailWithCompletion:^(id response, NSError *error) {
NSLog(@"anno 公告详情 = %@", response);
NSDictionary *dict = response[@"data"];
AnnounceDetailModel *annoDetail = [AnnounceDetailModel announceDetailModelWithDict:dict];
_annoDetail = annoDetail;
......@@ -80,9 +79,7 @@
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
NSLog(@"uuurl = %@", url);
[httpCilent settingAnnounceYetReadWithCompletion:^(id response, NSError *error) {
NSLog(@"已读 response = %@", response);
}];
}
......@@ -156,9 +153,7 @@
NSString *fileName = [NSString stringWithFormat:@"%@/%@", aSavePath, aFileName];
//检查附件是否存在
if ([fileManager fileExistsAtPath:fileName]) {
NSLog(@"存在了");
}else{
NSLog(@"不存在");
//创建附件存储目录
if (![fileManager fileExistsAtPath:aSavePath]) {
......@@ -177,13 +172,11 @@
//已完成下载
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"responseObject == %@", responseObject);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"下载成功!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
[self.tableView reloadData];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"error == %@", error);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"警告" message:@"下载失败!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
......@@ -197,48 +190,6 @@
}
//- (void)downloadFileURL:(NSString *)aUrl savePath:(NSString *)aSavePath fileName:(NSString *)aFileName
//{
// NSFileManager *fileManager = [NSFileManager defaultManager];
//
// //检查本地文件是否已存在
// NSString *fileName = [NSString stringWithFormat:@"%@/%@", aSavePath, aFileName];
// //检查附件是否存在
// if ([fileManager fileExistsAtPath:fileName]) {
// NSLog(@"存在了");
// }else{
// NSLog(@"不存在");
//
// //创建附件存储目录
// if (![fileManager fileExistsAtPath:aSavePath]) {
// [fileManager createDirectoryAtPath:aSavePath withIntermediateDirectories:YES attributes:nil error:nil];
// }
//
// //下载附件
// aUrl = [aUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
// NSURL *url = [[NSURL alloc] initWithString:aUrl];
// NSURLRequest *request = [NSURLRequest requestWithURL:url];
//
// AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
// operation.inputStream = [NSInputStream inputStreamWithURL:url];
// operation.outputStream = [NSOutputStream outputStreamToFileAtPath:fileName append:NO];
//
//
// //已完成下载
// [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
// UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"下载成功!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
// alert.tag = 66690;
// [alert show];
// } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
//
// UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"警告" message:@"下载失败!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
// [alert show];
// }];
//
// [operation start];
// }
//}
#pragma mark - UIAlertViewDelegate
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
......
......@@ -78,7 +78,6 @@
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient getAnnounceListWithCompletion:^(id response, NSError *error) {
NSLog(@"公告response = %@", response);
if (response[@"success"]) {
NSDictionary *dict = response[@"data"];
NSArray *array = dict[@"records"];
......@@ -152,7 +151,6 @@
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient getAnnounceListWithCompletion:^(id response, NSError *error) {
NSLog(@"segemnt 公告 = %@ error = %@", response, error);
if (response[@"success"]) {
NSDictionary *dict = response[@"data"];
NSArray *array = dict[@"records"];
......@@ -192,7 +190,6 @@
#pragma mark - UITableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSLog(@"cooount = %d", (int)_allAnnoArray.count);
return _allAnnoArray.count;
}
......
......@@ -124,7 +124,6 @@
-(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
NSLog(@"image.siz=== %@ scrll.contentSize = %@ ", NSStringFromCGSize(_takeImageView.size), NSStringFromCGSize(scrollView.contentSize) );
return _takeImageView;
}
......
......@@ -118,7 +118,6 @@
-(void)scrollViewDidZoom:(UIScrollView *)scrollView{
NSLog(@"Did zoom!");
UIView *v = [scrollView.subviews objectAtIndex:0];
if ([v isKindOfClass:[UIImageView class]]){
if (scrollView.zoomScale<1.0){
......@@ -155,7 +154,6 @@
}
-(CGRect)resizeImageSize:(CGRect)rect{
// NSLog(@"x:%f y:%f width:%f height:%f ", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
CGRect newRect;
CGSize newSize;
......
......@@ -165,7 +165,6 @@
NSString *url = [NSString stringWithFormat:@"%@%@%@&operId=%@&operName=%@", kRedStarURL, kSaveSportcheckURL, dateString, operId, operName];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSLog(@"发起抽查url = %@", url);
HttpClient *httpClient= [[HttpClient alloc] initWithUrl:url];
......@@ -175,10 +174,8 @@
@"state":@"initial",
@"stores":_uuidArray};
NSLog(@"发起抽查par = %@", parameters);
[httpClient saveSportCheckWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"发起抽查 response = %@", response);
NSLog(@"发起抽查 error = %@", error);
if ([response[@"message"] isEqualToString:@"ok"]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"下达任务成功!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
......
......@@ -113,8 +113,7 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"获取 商场 抽查列表 response= %@", response);
NSLog(@"获取 商场 抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -165,8 +164,7 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"上拉加载获取 更多 商场 抽查列表 response= %@", response);
NSLog(@"上拉加载获取 更多 商场 抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -430,12 +428,10 @@
@"direction":@"asc"}];
[parameters setObject:array forKey:@"queryOrders"];
}
NSLog(@"parrr = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"获取 商场 抽查列表 response= %@", response);
NSLog(@"获取 商场 抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -556,8 +552,7 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"获取 商场 抽查列表 response= %@", response);
NSLog(@"获取 商场 抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......
//
// LookOnLineDetailCell.h
// redstar
//
// Created by admin on 16/1/13.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@class LookOnLineModel;
@interface LookOnLineDetailCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *shopnameLabel; // 商店名称
@property (nonatomic, strong) UILabel *overDateLabel; // 截止时间
@property (nonatomic, strong) UILabel *peopleLabel; // 发起人
@property (nonatomic, strong) UILabel *startDateLabel; // 起始时间
@property (nonatomic, strong) UILabel *taskContentLabel; // 起始时间
@property (nonatomic, strong) UILabel *dayLabel; // 剩余天数
@property (nonatomic, strong) LookOnLineModel *lookOnLine;
@end
......@@ -32,6 +32,7 @@
// 背景ImageView
UIImageView *bgImageView = [[UIImageView alloc] init];
bgImageView.translatesAutoresizingMaskIntoConstraints = NO;
bgImageView.userInteractionEnabled = YES;
UIImage *image = [UIImage imageNamed:@"textbox"];
UIImage *resizingName = [image resizableImageWithCapInsets:UIEdgeInsetsMake(1, 1, 24, 24) resizingMode:UIImageResizingModeStretch];
bgImageView.image = resizingName;
......@@ -109,6 +110,8 @@
for (int i = 0; i < picArray.count; i++) {
UIImageView *imageView = [[UIImageView alloc] init];
imageView.userInteractionEnabled = YES;
imageView.contentMode = UIViewContentModeScaleToFill;
imageView.clipsToBounds = YES;
imageView.tag = 1116 + i;
NSDictionary *dict = (NSDictionary *)picArray[i];
NSURL *imageUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@", kRedStarURL ,dict[@"fileUrl"]]];
......@@ -132,7 +135,6 @@
returnButton.backgroundColor = kNavigationBarColor;
returnButton.layer.cornerRadius = 4;
[returnButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[returnButton setTitle:@"打分评论" forState:UIControlStateNormal];
returnButton.titleLabel.font = [UIFont systemFontOfSize:20.0];
[self addSubview:returnButton];
_returnButton = returnButton;
......
......@@ -74,10 +74,6 @@
[_allStoreImageURL addObject:imageUrl];
}
}
}
#pragma mark - Private Mothods
......@@ -267,7 +263,6 @@
NSString *url = [NSString stringWithFormat:@"%@%@%@&operId=%@&operName=%@", kRedStarURL, kGradeCheckResultURL, dateString, operId, operName];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSLog(@"抽查评分 = %@", url);
HttpClient *httpClient= [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{
......@@ -277,8 +272,7 @@
@"comment":_commentView.contentTextView.text,
};
[httpClient gradeCheckResultWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"抽查评分的 response = %@", response);
NSLog(@"抽查评分的 error = %@", error);
if ([response[@"message"] isEqualToString:@"ok"]) {
[self.navigationController popViewControllerAnimated:YES];
}
......@@ -320,7 +314,17 @@
{
if (!_footView) {
_footView = [[OnLineResultFootView alloc] initWithPicArray:_storeDetail.attachments];
[_footView.returnButton addTarget:self action:@selector(returnClick:) forControlEvents:UIControlEventTouchUpInside];
if ([_storeDetail.state isEqualToString:@"initial"]) {
[_footView.returnButton addTarget:self action:@selector(returnClick:) forControlEvents:UIControlEventTouchUpInside];
[_footView.returnButton setTitle:@"打分评论" forState:UIControlStateNormal];
_footView.textView.userInteractionEnabled = YES;
} else {
[_footView.returnButton addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
[_footView.returnButton setTitle:@"返回上一页" forState:UIControlStateNormal];
_footView.textView.userInteractionEnabled = NO;
}
_footView.textView.text = _storeDetail.processNote;
_footView.delegate = self;
}
......
......@@ -32,6 +32,8 @@
self.navigationController.navigationBar.hidden = NO;
self.tabBarController.tabBar.hidden = YES;
[self requestOnLineTaskComplete];
}
- (void)viewDidLoad
{
......@@ -52,7 +54,6 @@
self.tableView.dataSource = self;
self.allStoreArray = [NSMutableArray array];
[self requestOnLineTaskComplete];
_isOpen = NO;
}
......@@ -84,17 +85,18 @@
HttpClient *httpClient= [[HttpClient alloc] initWithUrl:url];
[httpClient getSportCheckDetailWithCompletion:^(id response, NSError *error) {
NSLog(@"5.4 抽查明细 response = %@, error = %@", response, error);
NSDictionary *dataDict = response[@"data"];
OnLineDetailModel *onlineDetail = [[OnLineDetailModel alloc] init];
[onlineDetail setValuesForKeysWithDictionary:dataDict];
_onLineDetail = onlineDetail;
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *dict in _onLineDetail.stores) {
StoreDetailModel *storeModel = [[StoreDetailModel alloc] init];
[storeModel setValuesForKeysWithDictionary:dict];
[_allStoreArray addObject:storeModel];
[tempArray addObject:storeModel];
}
_allStoreArray = tempArray;
self.tableView.delegate = self;
self.tableView.dataSource = self;
......@@ -135,12 +137,13 @@
// cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *indetifier = [NSString stringWithFormat:@"onLine%ld%ld",indexPath.section, indexPath.row];
if (indexPath.section == 0) {
OnLineCompleteDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:kOnLineCompleteDetailCell];
if (!cell) {
cell = [[OnLineCompleteDetailCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kOnLineCompleteDetailCell];
}
cell.titleLabel.text = [NSString stringWithFormat:@"%@", _onLineDetail.title];
cell.startDate.text = [NSString stringWithFormat:@"发起时间:%@", _onLineDetail.create_time];
......@@ -157,9 +160,13 @@
return cell;
} else {
OnLineCompleteCell *cell = [tableView dequeueReusableCellWithIdentifier:kOnLineCompleteCell];
// OnLineCompleteCell *cell = [tableView dequeueReusableCellWithIdentifier:kOnLineCompleteCell];
// if (!cell) {
// cell = [[OnLineCompleteCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kOnLineCompleteCell];
// }
OnLineCompleteCell *cell = [tableView dequeueReusableCellWithIdentifier:indetifier];
if (!cell) {
cell = [[OnLineCompleteCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kOnLineCompleteCell];
cell = [[OnLineCompleteCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:indetifier];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
......@@ -238,8 +245,8 @@
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 200.0;
[_tableView registerClass:[OnLineCompleteCell class] forCellReuseIdentifier:kOnLineCompleteCell];
[_tableView registerClass:[OnLineCompleteDetailCell class] forCellReuseIdentifier:kOnLineCompleteDetailCell];
//[_tableView registerClass:[OnLineCompleteCell class] forCellReuseIdentifier:kOnLineCompleteCell];
[_tableView registerClass:[OnLineCompleteDetailCell class] forCellReuseIdentifier:kOnLineCompleteDetailCell];
[self.view addSubview:_tableView];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
......
......@@ -118,8 +118,6 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getManageSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"管理层的抽查列表 response= %@", response);
NSLog(@"管理层的抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -172,8 +170,7 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getManageSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"上拉加载更多 管理层抽查列表 response= %@", response);
NSLog(@"上拉加载更多 管理层抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -444,11 +441,9 @@
@"direction":@"asc"}];
[parameters setObject:array forKey:@"queryOrders"];
}
NSLog(@"parrr = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getManageSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"管理层的抽查列表 response= %@", response);
NSLog(@"管理层的抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -536,8 +531,6 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getManageSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"管理层的抽查列表 response= %@", response);
NSLog(@"管理层的抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......
......@@ -132,7 +132,6 @@
@"type":self.category
};
[http1 savePicturePraiseWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"6.1保存图说口碑 resp = %@, error = %@", response, error);
_praiseUuid = response[@"data"];
}];
}
......@@ -159,7 +158,6 @@
@"fileContent":imageBase64
};
[http1 upLoadPraisePictureWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"6.2上传口碑图片 resp = %@, error = %@", response, error);
}];
_rowNumber++;
[self.tableView reloadData];
......@@ -311,13 +309,11 @@
};
[httpClinet upLoadPraisePictureWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"6.2上传口碑图片 resp = %@, error = %@", response, error);
NSString *url = [NSString stringWithFormat:@"%@%@%@/submit?time=%@&operId=%@&operName=%@", kRedStarURL, kSubmitPicturePraiseURL,_praiseUuid, dateString, operId, operName];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
HttpClient *http1 = [[HttpClient alloc] initWithUrl:url];
[http1 submitPicturePraiseWithCompletion:^(id response, NSError *error) {
NSLog(@"6.3接口上传口碑图片 res = %@, error = %@", response, error);
if (response[@"success"]) {
[self.navigationController popViewControllerAnimated:YES];
}
......
......@@ -226,7 +226,6 @@
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient getLikePicturePraiseWithCompletion:^(id response, NSError *error) {
NSLog(@"图说口碑 点赞 response=%@, error = %@", response, error);
if (response[@"success"]) {
int likeCount = [sender.titleLabel.text intValue];
[sender setTitle:[NSString stringWithFormat:@"%d", likeCount + 1] forState:UIControlStateNormal];
......@@ -243,7 +242,6 @@
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient cancelLikePicturePraiseWithCompletion:^(id response, NSError *error) {
NSLog(@"图说口碑 取消点赞response = %@ error = %@" , response, error);
if (response[@"success"]) {
int likeCount = [sender.titleLabel.text intValue];
[sender setTitle:[NSString stringWithFormat:@"%d", likeCount - 1] forState:UIControlStateNormal];
......@@ -326,12 +324,9 @@
UIImageView *showImageView = (UIImageView *)sender.view;
PictureTextTableCell *cell = (PictureTextTableCell *)showImageView.superview.superview;
NSIndexPath *indexPath = [_tableView indexPathForCell:cell];
NSLog(@"indexPath.row ==== %ld", indexPath.row);
PicTextModel *picText = _picTextArray[indexPath.row];
NSString *imageHttp = [NSString stringWithFormat:@"%@%@", kRedStarURL, picText.fileUrl];
NSLog(@"imageHttp === %@", imageHttp);
NSInteger index = [_realImageArray indexOfObject:imageHttp];
NSLog(@"indexxxxxxxxx====== %ld", index);
// 获取到点击的显示图片的按钮
LargePictureViewController *largeVC = [[LargePictureViewController alloc] init];
......@@ -339,10 +334,6 @@
largeVC.pictureSaveMode = PictureNetWorkMode;
largeVC.allImageArray = _realImageArray;
[self.navigationController pushViewController:largeVC animated:YES];
// CheckPicViewController *checkVC = [[CheckPicViewController alloc] init];
// checkVC.checkImage = showImageView.image;
// [self.navigationController pushViewController:checkVC animated:YES];
}
- (void)didReceiveMemoryWarning {
......@@ -625,16 +616,13 @@
NSString *url = [NSString stringWithFormat:@"%@%@?time=%@&operId=%@&operName=%@", kRedStarURL, kAddCommentURL , dateString , operId, operName];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSLog(@"url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{@"entityType":@"legendPraise",
@"entityUuid":_pictureUuid,
@"comment":_commentView.contentTextView.text};
NSLog(@"parameters = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient submitCommentWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"respo = %@, error = %@", response , error);
if ([response[@"message"] isEqualToString:@"ok"]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"添加评论成功" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
alert.delegate = self;
......
......@@ -160,7 +160,6 @@
__block PictureViewController *weakSelf = self;
// 请求问题列表
[httpClient queryPicturePraiseWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"图说口碑 response = %@ error = %@" , response, error);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -209,7 +208,6 @@
// 请求问题列表
[httpClient queryPicturePraiseWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"加载更多的 托说口碑 = %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -457,7 +455,6 @@
NSDate *oneMonth = [self getPriousorLaterDateFromDate:today withMonth:-1];
NSString *oneMonthStr = [dateFormatter stringFromDate:oneMonth];
NSLog(@"oneMonth = %@", oneMonthStr);
[parameters setObject:oneMonthStr forKey:@"submitTimeFrom"];
[parameters setObject:todayStr forKey:@"submitTimeTo"];
......@@ -485,12 +482,10 @@
[parameters setObject:array forKey:@"queryOrders"];
}
NSLog(@"parameters rrrrrrrr = %@",parameters);
// 请求问题列表
[httpClient getQuestionListWithParameters:parameters completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"图说口碑 筛选排序 resp = %@ error = %@", response ,error);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *pictureDict in recordsDict) {
PictureListModel *picture = [[PictureListModel alloc] init];
......@@ -585,7 +580,6 @@
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"图说口碑 按点赞数排序 resp = %@ error = %@", response ,error);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *pictureDict in recordsDict) {
PictureListModel *picture = [[PictureListModel alloc] init];
......
......@@ -107,7 +107,6 @@
{
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionGroupURL]];
[httpClient getQuestionGroupWithCompletion:^(id response, NSError *error) {
NSLog(@"问题与专业分组 === %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
......@@ -137,7 +136,6 @@
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
HttpClient *http = [[HttpClient alloc] initWithUrl:url];
[http getQuestionCategoryWithCompletion:^(id response, NSError *error) {
NSLog(@"分类categaory response= %@", response);
if (response[@"success"]) {
NSDictionary *dictData = response[@"data"];
NSArray *array = dictData[@"records"];
......@@ -353,8 +351,6 @@
@"attachments":imageArray};
}
NSLog(@"par = %@", parameters);
NSDate *date = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
......@@ -552,7 +548,6 @@
[cell.photoButton1 setImage:image00 forState:UIControlStateNormal];
NSString *imageName1 = _imageNameArray[(indexPath.row - 3) * 2 + 1];
NSLog(@"imageName = %@", imageName1);
NSString *fullPath1 = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:imageName1];
UIImage *image1 = [UIImage imageWithContentsOfFile:fullPath1];
UIImage *image11 = [UIImage image:image1 fillSize:CGSizeMake((kScreenWidth - 60) / 2, 90)];
......
......@@ -88,7 +88,6 @@
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient getQuestionDetailWithParameters:nil completion:^(id response, NSError *error) {
NSDictionary *dict = response[@"data"];
NSLog(@"问题详情 = %@", dict);
QuestionDetailModel *quesDetail = [[QuestionDetailModel alloc] init];
[quesDetail setValuesForKeysWithDictionary:dict];
_questionDetailModel = quesDetail;
......@@ -258,7 +257,6 @@
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient likeCountWithParameters:nil completion:^(id response, NSError *error) {
NSLog(@"取消点赞response = %@", response);
if (response[@"success"]) {
int likeCount = [sender.titleLabel.text intValue];
[sender setTitle:[NSString stringWithFormat:@"%d", likeCount - 1] forState:UIControlStateNormal];
......@@ -479,16 +477,13 @@
NSString *url = [NSString stringWithFormat:@"%@%@?time=%@&operId=%@&operName=%@", kRedStarURL, kAddCommentURL , dateString , operId, operName];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSLog(@"url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{@"entityType":@"question",
@"entityUuid":_questionUuid,
@"comment":_commentView.contentTextView.text};
NSLog(@"parameters = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient submitCommentWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"respo = %@, error = %@", response , error);
if ([response[@"message"] isEqualToString:@"ok"]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"添加评论成功" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
alert.delegate = self;
......@@ -514,7 +509,6 @@
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient getQuestionDetailWithParameters:nil completion:^(id response, NSError *error) {
NSDictionary *dict = response[@"data"];
NSLog(@"问题详情 = %@", dict);
QuestionDetailModel *quesDetail = [[QuestionDetailModel alloc] init];
[quesDetail setValuesForKeysWithDictionary:dict];
_questionDetailModel = quesDetail;
......
......@@ -69,7 +69,6 @@
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
HttpClient *http = [[HttpClient alloc] initWithUrl:url];
[http getQuestionCategoryWithCompletion:^(id response, NSError *error) {
NSLog(@"分类categaory response= %@", response);
if (response[@"success"]) {
NSDictionary *dictData = response[@"data"];
NSArray *array = dictData[@"records"];
......
......@@ -93,7 +93,6 @@
self.allGroupNameArray = [NSMutableArray array];
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionGroupURL]];
[httpClient getQuestionGroupWithCompletion:^(id response, NSError *error) {
NSLog(@"问题与专业分组 === %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
......@@ -150,7 +149,6 @@
[httpClient getQuestionListWithParameters:parameters completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"问题与知识列表recods = %@", response);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *questionDict in recordsDict) {
QuestionModel *question = [[QuestionModel alloc] init];
......@@ -195,7 +193,6 @@
[httpClient getQuestionListWithParameters:parameters completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"问题与知识列表recods = %@", response);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *questionDict in recordsDict) {
QuestionModel *question = [[QuestionModel alloc] init];
......@@ -547,7 +544,6 @@
NSDate *oneMonth = [self getPriousorLaterDateFromDate:today withMonth:-1];
NSString *oneMonthStr = [dateFormatter stringFromDate:oneMonth];
NSLog(@"oneMonth = %@", oneMonthStr);
[parameters setObject:oneMonthStr forKey:@"beginDateFrom"];
[parameters setObject:todayStr forKey:@"endDateTo"];
......@@ -575,12 +571,10 @@
[parameters setObject:array forKey:@"queryOrders"];
}
NSLog(@"parameters = %@",parameters);
// 请求问题列表
[httpClient getQuestionListWithParameters:parameters completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"问题与知识列表recods = %@", response);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *questionDict in recordsDict) {
QuestionModel *question = [[QuestionModel alloc] init];
......@@ -688,7 +682,6 @@
[httpClient getQuestionListWithParameters:parameters completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"问题与知识列表recods = %@", response);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *questionDict in recordsDict) {
QuestionModel *question = [[QuestionModel alloc] init];
......
......@@ -165,7 +165,6 @@
@"encode":encode
};
[http getAttachmentsWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"7.1 口碑标注附件列表 = %@, error = %@", response, error);
NSArray *dataArray = response[@"data"];
for (NSDictionary *attaDict in dataArray) {
......@@ -270,18 +269,14 @@
NSString *fileName = [NSString stringWithFormat:@"%@/%@", aSavePath, aFileName];
//检查附件是否存在
if ([fileManager fileExistsAtPath:fileName]) {
NSLog(@"存在了");
}else{
NSLog(@"不存在");
//创建附件存储目录
if (![fileManager fileExistsAtPath:aSavePath]) {
[fileManager createDirectoryAtPath:aSavePath withIntermediateDirectories:YES attributes:nil error:nil];
}
//下载附件
NSLog(@"aaaurl === %@", aUrl);
aUrl = [aUrl stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSLog(@"aaaurl === %@", aUrl);
NSURL *url = [[NSURL alloc] initWithString:aUrl];
......@@ -293,23 +288,7 @@
operation.outputStream = [NSOutputStream outputStreamToFileAtPath:fileName append:NO];
//下载进度控制
[operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) {
// 设置进度条进度
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeAnnularDeterminate;
// if (expectedContentLength > 0 && progressContentLength <= expectedContentLength)
// progress = (CGFloat) progressContentLength / expectedContentLength;
// else
// progress = (progressContentLength % 1000000l) / 1000000.0f;
CGFloat precent = totalBytesRead / totalBytesExpectedToRead;
hud.labelText = [NSString stringWithFormat:@"%f", precent];
NSLog(@"prrrrrrrrrrrrrr ==== %f", precent);
}];
//已完成下载
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
[self closeRedView];
......
......@@ -310,7 +310,6 @@
NSString *url = [NSString stringWithFormat:@"%@%@%@?time=%@&operId=%@&operName=%@",kRedStarURL, kUpLoadInspectResult, self.praiseUuid, dateString, operId, operName];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSLog(@"上传检查点url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
......@@ -321,7 +320,6 @@
};
[httpClient uploadInspectResultWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"上传检查点 respose =%@ error = %@", response, error);
if (response[@"success"]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"检查点上报成功!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
alert.delegate = self;
......
......@@ -128,8 +128,6 @@
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"巡检列表%@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *taskArray = [NSMutableArray array];
......@@ -167,8 +165,6 @@
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"巡检列表%@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *taskArray = [NSMutableArray array];
......@@ -200,7 +196,6 @@
- (void)taxisBtnCilck:(UIButton *)sender
{
NSLog(@"拍讯");
}
-(void)doBack:(id)sender
......@@ -225,7 +220,6 @@
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"inspect List ---11-- 巡检列表%@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
......@@ -486,7 +480,6 @@
[parameters setObject:weekStr forKey:@"beginDateFrom"];
[parameters setObject:todayStr forKey:@"endDateTo"];
NSLog(@"onwek = %@", parameters);
} else if (_timeSelectNum == 1) {
NSDate *oneMonth = [self getPriousorLaterDateFromDate:today withMonth:-1];
......@@ -494,7 +487,6 @@
[parameters setObject:oneMonthStr forKey:@"beginDateFrom"];
[parameters setObject:todayStr forKey:@"endDateTo"];
NSLog(@"oneMonth = %@", parameters);
} else if (_timeSelectNum == 2) {
NSDate *threeMonth = [self getPriousorLaterDateFromDate:today withMonth:-3];
NSString *threeMonthStr = [dateFormatter stringFromDate:threeMonth];
......@@ -519,16 +511,8 @@
}
NSLog(@"parameters = %@",parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"respones = %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -619,7 +603,6 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"测试 rresponse = %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......
......@@ -71,10 +71,8 @@
NSDate *date = [NSDate date];
NSString *strDate = [dateFormatter stringFromDate:date];
NSDate *today = [dateFormatter dateFromString:strDate];
NSLog(@"today = %@", today);
// endTime
NSDate *endTime = [dateFormatter dateFromString:[NSString stringWithFormat:@"%@", taskDetail.endDate]];
NSLog(@"endTime = %@", endTime);
NSCalendar *cal = [NSCalendar currentCalendar];
unsigned int unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit;
NSDateComponents *d = [cal components:unitFlags fromDate:today toDate:endTime options:0];
......
......@@ -105,7 +105,6 @@
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient getPraiseDetailWithParameters:nil completion:^(id response, NSError *error) {
NSLog(@"口碑巡检明细PraiseDetail = %@", response);
NSDictionary *dataDict = response[@"data"];
TaskDetailModel *taskDetail = [TaskDetailModel taskDetailModelWithDict:dataDict];
_taskDetail = taskDetail;
......@@ -135,13 +134,10 @@
- (void)requestRankingDetail
{
NSString *url = [NSString stringWithFormat:@"%@%@%@/%@",kRedStarURL, kInspectDetailURL, self.uuid, self.store_uuid];
NSLog(@"url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient getPraiseDetailWithParameters:nil completion:^(id response, NSError *error) {
NSLog(@"口碑巡检明细PraiseDetail = %@", response);
NSLog(@"error = %@", error);
NSDictionary *dataDict = response[@"data"];
TaskDetailModel *taskDetail = [TaskDetailModel taskDetailModelWithDict:dataDict];
_taskDetail = taskDetail;
......
......@@ -95,11 +95,9 @@
- (void)requestRankingDetail
{
NSString *url = [NSString stringWithFormat:@"%@%@%@/%@",kRedStarURL, kInspectDetailURL, self.uuid, self.store_uuid];
NSLog(@"url = %@" , url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient getPraiseDetailWithParameters:nil completion:^(id response, NSError *error) {
NSLog(@"口碑巡检明细PraiseDetail = %@", response);
NSDictionary *dataDict = response[@"data"];
TaskDetailModel *taskDetail = [TaskDetailModel taskDetailModelWithDict:dataDict];
self.rankDetailHeaderView.taskDetail = taskDetail;
......@@ -527,17 +525,13 @@
NSString *url = [NSString stringWithFormat:@"%@%@?time=%@&operId=%@&operName=%@", kRedStarURL, kAddCommentURL , dateString , operId, operName];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSLog(@"url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
NSLog(@"selll = %@", self.commentId);
NSDictionary *parameters = @{@"entityType":@"praise",
@"entityUuid":self.commentId,
@"comment":_commentView.contentTextView.text};
NSLog(@"parameters = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient submitCommentWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"respo = %@, error = %@", response , error);
if ([response[@"message"] isEqualToString:@"ok"]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"添加评论成功" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
alert.delegate = self;
......
......@@ -140,7 +140,6 @@
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
__block RankingListViewController *weakSelf = self;
[httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"口碑报告response = %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
......@@ -179,10 +178,8 @@
{
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
NSString *url = [NSString stringWithFormat:@"%@%@%@", kRedStarURL, kQueryShortPraiseURL, user_uuid];
NSLog(@"url = %@",url);
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
[httpCilent queryShortPraiseWithCompletion:^(id response, NSError *error) {
NSLog(@"查询所有列表 response = %@ error= %@", response, error);
NSArray *dataArray = response[@"data"];
for (NSDictionary *dict in dataArray) {
[_titleArray addObject:dict];
......@@ -211,10 +208,8 @@
@"statisMode":@(_statisMode),
@"orgUuids":_uuidArray,
};
NSLog(@"parrrrrters = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"分区域 口碑报告response = %@ error = %@", response, error);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
......@@ -394,7 +389,6 @@
cell = [[RankCommentCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kRankingCell];
}
RankListModel *rankListModel = _rankData[indexPath.section - 1];
NSLog(@"~~~~~ = %@", rankListModel.comments);
NSDictionary *dict = rankListModel.comments[indexPath.row];
RankCommentModel *commentModel = [[RankCommentModel alloc] init];
[commentModel setValuesForKeysWithDictionary:dict];
......
......@@ -241,7 +241,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
// 请求问题列表
[httpClient queryPicturePraiseWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"刷新!!== 图说口碑 response = %@ error = %@" , response, error);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -333,7 +332,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[httpClient2 getQuestionListWithParameters:parameters2 completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"刷新!! = 问题与知识列表recods = %@", response);
NSMutableArray *questionTempArr = [NSMutableArray array];
......@@ -364,8 +362,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getManageSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"管理层的抽查列表 response= %@", response);
NSLog(@"管理层的抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -395,8 +391,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"获取 商场 抽查列表 response= %@", response);
NSLog(@"获取 商场 抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -607,8 +601,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getManageSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"管理层的抽查列表 response= %@", response);
NSLog(@"管理层的抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -641,8 +634,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"获取 商场 抽查列表 response= %@", response);
NSLog(@"获取 商场 抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......
......@@ -414,9 +414,7 @@
[httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) {
// [self requestPicturePraise];
NSLog(@"口碑报告response = %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
......@@ -490,8 +488,6 @@
};
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"巡检列表%@", response);
NSLog(@"error = %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -547,8 +543,6 @@
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"问题与知识列表recods = %@", response);
NSLog(@"error = %@", error);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *questionDict in recordsDict) {
QuestionModel *question = [[QuestionModel alloc] init];
......@@ -658,8 +652,6 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getManageSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"管理层的抽查列表 response= %@", response);
NSLog(@"管理层的抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......@@ -710,8 +702,6 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"获取 商场 抽查列表 response= %@", response);
NSLog(@"获取 商场 抽查列表 error= %@", error);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......
......@@ -71,7 +71,6 @@
{
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kCheckUpdateURL]];
[httpCilent checkAndUpdateCurrentVersionWithCompletion:^(id response, NSError *error) {
NSLog(@"检查更新 = %@", response);
if (response[@"data"] == nil || response[@"data"] == NULL || [response[@"data"] isEqual:[NSNull null]] || response[@"data"] == Nil) {
return;
......@@ -90,7 +89,6 @@
// 获取当前版本
NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary];
NSString *currentVersion = [NSString stringWithFormat:@"%@",infoDic[@"CFBundleShortVersionString"]];
NSLog(@"当前版本是:%@", currentVersion);
if (![currentVersion isEqualToString:newVersion]) {
......@@ -146,8 +144,6 @@
UIWindow *window = [[UIApplication sharedApplication].windows lastObject];
[MBProgressHUD showHUDAddedTo:window animated:YES];
[httpClient loginWithUsername:username password:password completion:^(id response, NSError *error) {
NSLog(@"登陆 respo = %@", response);
NSLog(@"error = %@", error);
if ([response[@"message"] isEqualToString:@"ok"]) {
// 保存登陆信息
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
......@@ -191,10 +187,6 @@
- (void)addAllClick
{
[self.loginView.loginButton addTarget:self action:@selector(loginButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self.loginView.retrieveButton addTarget:self action:@selector(retrieveButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self.loginView.registerButton addTarget:self action:@selector(registerButtonClick:) forControlEvents:UIControlEventTouchUpInside];
}
/**
......@@ -213,7 +205,6 @@
UIWindow *window = [[UIApplication sharedApplication].windows lastObject];
[MBProgressHUD showHUDAddedTo:window animated:YES];
[httpClient loginWithUsername:self.loginView.usernameTextFiled.text password:self.loginView.passwordTextFiled.text completion:^(id response, NSError *error) {
NSLog(@"response = %@, error = %@", response, error);
if ([response[@"message"] isEqualToString:@"ok"]) {
// 保存登陆信息
......@@ -262,18 +253,6 @@
}
// 找回密码
- (void)retrieveButtonClick:(UIButton *)sender
{
NSLog(@"找回密码");
}
// 找回密码
- (void)registerButtonClick:(UIButton *)sender
{
NSLog(@"用户注册");
}
#pragma mark - TableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
......
......@@ -156,14 +156,12 @@
{
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kCheckUpdateURL]];
[httpCilent checkAndUpdateCurrentVersionWithCompletion:^(id response, NSError *error) {
NSLog(@"检查更新 = %@", response);
if (response[@"data"] == nil || response[@"data"] == NULL || [response[@"data"] isEqual:[NSNull null]] || response[@"data"] == Nil) {
return;
} else {
NSDictionary *dict = response[@"data"];
NSString *newVersion = [NSString stringWithFormat:@"%@", dict[@"version"]];
self.jumpURL = [NSString stringWithFormat:@"%@", dict[@"url"]];
NSLog(@"newVersion = %@, _jumpURL = %@", newVersion, _jumpURL);
[self checkAppUpdate:newVersion];
}
}];
......@@ -174,7 +172,6 @@
// 获取当前版本
NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary];
NSString *currentVersion = [NSString stringWithFormat:@"%@",infoDic[@"CFBundleShortVersionString"]];
NSLog(@"当前版本是:%@", currentVersion);
if (![currentVersion isEqualToString:newVersion]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示!" message:[NSString stringWithFormat:@"发现新版本:%@", newVersion] delegate:self cancelButtonTitle:@"稍后再说" otherButtonTitles:@"前往更新", nil];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment