Commit bf00a47c authored by admin's avatar admin

上传代码

parent 1b093dd6
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#define Url_h #define Url_h
// url 测试环境 // 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/" // #define kRedStarURL @"http://219.235.234.212:7580/"
// 检查更新 // 检查更新
#define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa" #define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa"
......
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
}; };
[MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) { [http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"商场 resp === %@", response);
NSDictionary *dataDict = response[@"data"]; NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"]; NSArray *recordsArray = dataDict[@"records"];
...@@ -167,7 +166,7 @@ ...@@ -167,7 +166,7 @@
}; };
[MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) { [http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"商场 resp === %@", response);
NSDictionary *dataDict = response[@"data"]; NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"]; NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array]; NSMutableArray *tempArray = [NSMutableArray array];
......
...@@ -53,17 +53,23 @@ ...@@ -53,17 +53,23 @@
self.shopName.text = [NSString stringWithFormat:@"%@", storeDetail.store_name]; self.shopName.text = [NSString stringWithFormat:@"%@", storeDetail.store_name];
if ([storeDetail.state isEqualToString:@"finished"]) { if ([storeDetail.state isEqualToString:@"finished"]) {
NSString *str = [NSString stringWithFormat:@"处理状态:已处理"]; NSString *str = [NSString stringWithFormat:@"处理状态:已完成"];
NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str]; NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kLightGray,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(0,5)]; [strAttr addAttributes:@{NSForegroundColorAttributeName:kLightGray,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(0,5)];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kProgressDealWithColor,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(5,str.length - 5)]; [strAttr addAttributes:@{NSForegroundColorAttributeName:kProgressDealWithColor,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(5,str.length - 5)];
[self.stateLabel setAttributedText:strAttr]; [self.stateLabel setAttributedText:strAttr];
} else { } else if ([storeDetail.state isEqualToString:@"initial"]) {
NSString *str = [NSString stringWithFormat:@"处理状态:未处理"]; NSString *str = [NSString stringWithFormat:@"处理状态:未处理"];
NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str]; NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kLightGray,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(0,5)]; [strAttr addAttributes:@{NSForegroundColorAttributeName:kLightGray,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(0,5)];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kProgressUnSettledColor,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(5,str.length - 5)]; [strAttr addAttributes:@{NSForegroundColorAttributeName:kProgressUnSettledColor,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(5,str.length - 5)];
[self.stateLabel setAttributedText:strAttr]; [self.stateLabel setAttributedText:strAttr];
} else {
NSString *str = [NSString stringWithFormat:@"处理状态:已处理"];
NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kLightGray,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(0,5)];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kProgressDealWithColor,NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} range:NSMakeRange(5,str.length - 5)];
[self.stateLabel setAttributedText:strAttr];
} }
if (storeDetail.reportTime == nil || storeDetail.reportTime == NULL || [storeDetail.reportTime isEqual:[NSNull null]] || storeDetail.reportTime == Nil || [storeDetail.reportTime isEqualToString:@"(null)"]) { if (storeDetail.reportTime == nil || storeDetail.reportTime == NULL || [storeDetail.reportTime isEqual:[NSNull null]] || storeDetail.reportTime == Nil || [storeDetail.reportTime isEqualToString:@"(null)"]) {
......
...@@ -9,5 +9,8 @@ ...@@ -9,5 +9,8 @@
#import "StoreDetailModel.h" #import "StoreDetailModel.h"
@implementation StoreDetailModel @implementation StoreDetailModel
- (NSString *)description
{
return [NSString stringWithFormat:@"ssss.reportTime === %@", self.reportTime];
}
@end @end
...@@ -96,8 +96,24 @@ ...@@ -96,8 +96,24 @@
[storeModel setValuesForKeysWithDictionary:dict]; [storeModel setValuesForKeysWithDictionary:dict];
[tempArray addObject:storeModel]; [tempArray addObject:storeModel];
} }
// NSArray *sortedArray = [tempArray sortedArrayUsingComparator:^NSComparisonResult(StoreDetailModel *obj1, StoreDetailModel *obj2) {
// NSDateFormatter *formatter = [[NSDateFormatter alloc] init] ;
// [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
// NSDate *otherDate = [formatter dateFromString:obj2.reportTime];
// NSDate *currentDate = [formatter dateFromString:obj1.reportTime];
// //默认按年龄排序
// NSComparisonResult result = [otherDate compare:currentDate];//注意:基本数据类型要进行数据转换
// //如果年龄一样,就按照名字排序
// if (result == NSOrderedSame) {
// result = [obj1.reportTime compare:obj2.reportTime];
// }
// return result;
//
// }];
// NSLog(@"sort ==== %@", sortedArray);
//_allStoreArray = (NSMutableArray *)sortedArray;
_allStoreArray = tempArray; _allStoreArray = tempArray;
self.tableView.delegate = self; self.tableView.delegate = self;
self.tableView.dataSource = self; self.tableView.dataSource = self;
[self.tableView reloadData]; [self.tableView reloadData];
...@@ -106,6 +122,8 @@ ...@@ -106,6 +122,8 @@
} }
- (void)doBack:(id)sender - (void)doBack:(id)sender
{ {
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
......
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