Commit 4adb0e52 authored by admin's avatar admin

修改部分bug

parent 2069e0d8
...@@ -4,4 +4,5 @@ platform:ios, ‘7.0’ ...@@ -4,4 +4,5 @@ platform:ios, ‘7.0’
pod 'AFNetworking', '~> 2.0' pod 'AFNetworking', '~> 2.0'
pod 'SDWebImage' pod 'SDWebImage'
pod 'MBProgressHUD' pod 'MBProgressHUD'
pod 'MJRefresh' pod 'MJRefresh'
\ No newline at end of file pod 'RATreeView'
\ No newline at end of file
...@@ -22,6 +22,7 @@ PODS: ...@@ -22,6 +22,7 @@ PODS:
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- MBProgressHUD (0.9.1) - MBProgressHUD (0.9.1)
- MJRefresh (2.2.0) - MJRefresh (2.2.0)
- RATreeView (1.0.3)
- SDWebImage (3.7.2): - SDWebImage (3.7.2):
- SDWebImage/Core (= 3.7.2) - SDWebImage/Core (= 3.7.2)
- SDWebImage/Core (3.7.2) - SDWebImage/Core (3.7.2)
...@@ -30,12 +31,14 @@ DEPENDENCIES: ...@@ -30,12 +31,14 @@ DEPENDENCIES:
- AFNetworking (~> 2.0) - AFNetworking (~> 2.0)
- MBProgressHUD - MBProgressHUD
- MJRefresh - MJRefresh
- RATreeView
- SDWebImage - SDWebImage
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad
MJRefresh: 65a2bf14abb6feeaed8696aa1551f70e15ab0a08 MJRefresh: 65a2bf14abb6feeaed8696aa1551f70e15ab0a08
RATreeView: abb5e11bb2f955c7f58b1295d2b0eab1de7c2920
SDWebImage: 71b7cdc1d1721d6a82ed62889030225f2c249e29 SDWebImage: 71b7cdc1d1721d6a82ed62889030225f2c249e29
COCOAPODS: 0.38.2 COCOAPODS: 0.38.2
...@@ -22,6 +22,7 @@ PODS: ...@@ -22,6 +22,7 @@ PODS:
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- MBProgressHUD (0.9.1) - MBProgressHUD (0.9.1)
- MJRefresh (2.2.0) - MJRefresh (2.2.0)
- RATreeView (1.0.3)
- SDWebImage (3.7.2): - SDWebImage (3.7.2):
- SDWebImage/Core (= 3.7.2) - SDWebImage/Core (= 3.7.2)
- SDWebImage/Core (3.7.2) - SDWebImage/Core (3.7.2)
...@@ -30,12 +31,14 @@ DEPENDENCIES: ...@@ -30,12 +31,14 @@ DEPENDENCIES:
- AFNetworking (~> 2.0) - AFNetworking (~> 2.0)
- MBProgressHUD - MBProgressHUD
- MJRefresh - MJRefresh
- RATreeView
- SDWebImage - SDWebImage
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad
MJRefresh: 65a2bf14abb6feeaed8696aa1551f70e15ab0a08 MJRefresh: 65a2bf14abb6feeaed8696aa1551f70e15ab0a08
RATreeView: abb5e11bb2f955c7f58b1295d2b0eab1de7c2920
SDWebImage: 71b7cdc1d1721d6a82ed62889030225f2c249e29 SDWebImage: 71b7cdc1d1721d6a82ed62889030225f2c249e29
COCOAPODS: 0.38.2 COCOAPODS: 0.38.2
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
buildForAnalyzing = "YES"> buildForAnalyzing = "YES">
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "17AE95F7A9A9C3B92C332D3E" BlueprintIdentifier = "31805CC1CF27E8C7755D8815"
BuildableName = "libAFNetworking.a" BuildableName = "libAFNetworking.a"
BlueprintName = "AFNetworking" BlueprintName = "AFNetworking"
ReferencedContainer = "container:Pods.xcodeproj"> ReferencedContainer = "container:Pods.xcodeproj">
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
buildForAnalyzing = "YES"> buildForAnalyzing = "YES">
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "199D7984E4C79F2FE827B9F7" BlueprintIdentifier = "EDCF6CB78FDFACBCABC012BC"
BuildableName = "libPods.a" BuildableName = "libPods.a"
BlueprintName = "Pods" BlueprintName = "Pods"
ReferencedContainer = "container:Pods.xcodeproj"> ReferencedContainer = "container:Pods.xcodeproj">
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
buildForAnalyzing = "YES"> buildForAnalyzing = "YES">
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "16353C21856B847C437DDF61" BlueprintIdentifier = "0A64513C1B78725A36C743FF"
BuildableName = "libSDWebImage.a" BuildableName = "libSDWebImage.a"
BlueprintName = "SDWebImage" BlueprintName = "SDWebImage"
ReferencedContainer = "container:Pods.xcodeproj"> ReferencedContainer = "container:Pods.xcodeproj">
......
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
<key>isShown</key> <key>isShown</key>
<false/> <false/>
</dict> </dict>
<key>RATreeView.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>SDWebImage.xcscheme</key> <key>SDWebImage.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
...@@ -32,27 +37,32 @@ ...@@ -32,27 +37,32 @@
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>
<dict> <dict>
<key>4082B3C59B8C69587CDAABCA983AFFE3</key> <key>0A84A7AEED2585FA18F182B740F5DE4C</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>5352D432641F0656C90741034E32F31E</key>
<dict> <dict>
<key>primary</key> <key>primary</key>
<true/> <true/>
</dict> </dict>
<key>4150E8A3021008E6683A19FD6B05DAA6</key> <key>BAE21A624CC684DE7190C8516D5C1D79</key>
<dict> <dict>
<key>primary</key> <key>primary</key>
<true/> <true/>
</dict> </dict>
<key>5352D432641F0656C90741034E32F31E</key> <key>BB58AC6D7CE35348B874113DF4C0EF45</key>
<dict> <dict>
<key>primary</key> <key>primary</key>
<true/> <true/>
</dict> </dict>
<key>933B39CD36B6FAC0DA6DDB684400CB16</key> <key>BB698F8AC1978892388DCBBBB644ACFB</key>
<dict> <dict>
<key>primary</key> <key>primary</key>
<true/> <true/>
</dict> </dict>
<key>977186E6F9960A96887076F1E839B1A1</key> <key>D2622CD5BD5433C58B2785DDFB9B0573</key>
<dict> <dict>
<key>primary</key> <key>primary</key>
<true/> <true/>
......
#include "AFNetworking.xcconfig" #include "AFNetworking.xcconfig"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/SDWebImage" HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RATreeView" "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_LDFLAGS = ${AFNETWORKING_OTHER_LDFLAGS} OTHER_LDFLAGS = ${AFNETWORKING_OTHER_LDFLAGS}
PODS_ROOT = ${SRCROOT} PODS_ROOT = ${SRCROOT}
SKIP_INSTALL = YES SKIP_INSTALL = YES
\ No newline at end of file
...@@ -69,6 +69,29 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ...@@ -69,6 +69,29 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
## RATreeView
The MIT License (MIT)
Copyright (c) 2013 Rafał Augustyniak
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## SDWebImage ## SDWebImage
Copyright (c) 2009 Olivier Poitrey <rs@dailymotion.com> Copyright (c) 2009 Olivier Poitrey <rs@dailymotion.com>
......
...@@ -92,6 +92,33 @@ THE SOFTWARE. ...@@ -92,6 +92,33 @@ THE SOFTWARE.
<key>Type</key> <key>Type</key>
<string>PSGroupSpecifier</string> <string>PSGroupSpecifier</string>
</dict> </dict>
<dict>
<key>FooterText</key>
<string>The MIT License (MIT)
Copyright (c) 2013 Rafa&#322;&#160;Augustyniak
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</string>
<key>Title</key>
<string>RATreeView</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict> <dict>
<key>FooterText</key> <key>FooterText</key>
<string>Copyright (c) 2009 Olivier Poitrey &lt;rs@dailymotion.com&gt; <string>Copyright (c) 2009 Olivier Poitrey &lt;rs@dailymotion.com&gt;
......
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/SDWebImage" HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RATreeView" "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/RATreeView" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBProgressHUD" -l"MJRefresh" -l"SDWebImage" -framework "CoreGraphics" -framework "ImageIO" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBProgressHUD" -l"MJRefresh" -l"RATreeView" -l"SDWebImage" -framework "CoreGraphics" -framework "ImageIO" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
PODS_ROOT = ${SRCROOT}/Pods PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/SDWebImage" HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RATreeView" "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/RATreeView" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBProgressHUD" -l"MJRefresh" -l"SDWebImage" -framework "CoreGraphics" -framework "ImageIO" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBProgressHUD" -l"MJRefresh" -l"RATreeView" -l"SDWebImage" -framework "CoreGraphics" -framework "ImageIO" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
PODS_ROOT = ${SRCROOT}/Pods PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
#include "SDWebImage.xcconfig" #include "SDWebImage.xcconfig"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/SDWebImage" HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RATreeView" "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_LDFLAGS = ${SDWEBIMAGE_OTHER_LDFLAGS} OTHER_LDFLAGS = ${SDWEBIMAGE_OTHER_LDFLAGS}
PODS_ROOT = ${SRCROOT} PODS_ROOT = ${SRCROOT}
SKIP_INSTALL = YES SKIP_INSTALL = YES
\ No newline at end of file
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#import "OnLineTableViewCell.h" #import "OnLineTableViewCell.h"
#import "OnLineFooterView.h" #import "OnLineFooterView.h"
#import "SpotCheckOnLineViewController.h" #import "SpotCheckOnLineViewController.h"
#import "SelectStoreViewController.h"
#import "HttpClient.h" #import "HttpClient.h"
#define kOnLineTableViewCell @"onlineTableViewCell" #define kOnLineTableViewCell @"onlineTableViewCell"
...@@ -140,7 +140,11 @@ ...@@ -140,7 +140,11 @@
return 50; return 50;
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
SelectStoreViewController *select = [[SelectStoreViewController alloc] init];
[self.navigationController pushViewController:select animated:YES];
}
#pragma mark - lazy loading #pragma mark - lazy loading
- (UITableView *)tableView - (UITableView *)tableView
......
//
// SelectAreaTableCell.h
// redstar
//
// Created by admin on 15/12/15.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SelectAreaTableCell : UITableViewCell
@property (nonatomic, strong) UIImageView *checkBoxImageView;
@property (nonatomic, strong) UIImageView *iconImageView;
@end
//
// SelectAreaTableCell.m
// redstar
//
// Created by admin on 15/12/15.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SelectAreaTableCell.h"
@implementation SelectAreaTableCell
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// SelectProvinceTableCell.h
// redstar
//
// Created by admin on 15/12/15.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SelectProvinceTableCell : UITableViewCell
@end
//
// SelectProvinceTableCell.m
// redstar
//
// Created by admin on 15/12/15.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SelectProvinceTableCell.h"
@implementation SelectProvinceTableCell
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// SelectStoreTableCell.h
// redstar
//
// Created by admin on 15/12/15.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SelectStoreTableCell : UITableViewCell
@end
//
// SelectStoreTableCell.m
// redstar
//
// Created by admin on 15/12/15.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SelectStoreTableCell.h"
@implementation SelectStoreTableCell
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// AreaModel.h
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface AreaModel : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, strong) NSArray *provinceArray;
- (id)initWithName:(NSString *)name children:(NSArray *)children;
+ (id)dataObjectWithName:(NSString *)name children:(NSArray *)children;
@end
//
// AreaModel.m
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AreaModel.h"
@implementation AreaModel
- (id)initWithName:(NSString *)name children:(NSArray *)children
{
self = [super init];
if (self) {
self.provinceArray = [NSArray arrayWithArray:children];
self.name = name;
}
return self;
}
+ (id)dataObjectWithName:(NSString *)name children:(NSArray *)children
{
return [[self alloc] initWithName:name children:children];
}
@end
//
// ProvinceModel.h
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ProvinceModel : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, strong) NSArray *storeArray;
- (id)initWithName:(NSString *)name children:(NSArray *)children;
+ (id)dataObjectWithName:(NSString *)name children:(NSArray *)children;
@end
//
// ProvinceModel.m
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "ProvinceModel.h"
@implementation ProvinceModel
- (id)initWithName:(NSString *)name children:(NSArray *)children
{
self = [super init];
if (self) {
self.storeArray = [NSArray arrayWithArray:children];
self.name = name;
}
return self;
}
+ (id)dataObjectWithName:(NSString *)name children:(NSArray *)children
{
return [[self alloc] initWithName:name children:children];
}
@end
//
// StoreModel.h
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface StoreModel : NSObject
@property (nonatomic, copy) NSString *name;
- (id)initWithName:(NSString *)name;
+ (id)dataObjectWithName:(NSString *)name;
@end
//
// StoreModel.m
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "StoreModel.h"
@implementation StoreModel
- (id)initWithName:(NSString *)name
{
self = [super init];
if (self) {
self.name = name;
}
return self;
}
+ (id)dataObjectWithName:(NSString *)name
{
return [[self alloc] initWithName:name];
}
@end
//
// SelectStoreViewController.h
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SelectStoreViewController : UIViewController
@end
//
// SelectStoreViewController.m
// redstar
//
// Created by admin on 15/12/13.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SelectStoreViewController.h"
#import <RATreeView.h>
#import "AreaModel.h"
#import "ProvinceModel.h"
#import "StoreModel.h"
@interface SelectStoreViewController () <RATreeViewDelegate, RATreeViewDataSource>
@property (nonatomic, strong) RATreeView *treeView;
@property (nonatomic, strong) NSMutableArray *allAreaData;
@end
@implementation SelectStoreViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
UILabel *customLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 30)];
[customLab setTextColor:[UIColor whiteColor]];
[customLab setText:@"选择商场"];
customLab.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = customLab;
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 30, 44);
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
[self loadData];
self.treeView.delegate = self;
self.treeView.dataSource = self;
[self.treeView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])];
self.treeView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.treeView reloadData];
}
- (void)doBack:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)loadData
{
StoreModel *notebook1 = [StoreModel dataObjectWithName:@"南京中央路店"];
StoreModel *notebook2 = [StoreModel dataObjectWithName:@"镇江新区店"];
StoreModel *notebook3 = [StoreModel dataObjectWithName:@"南京卡子门店"];
ProvinceModel *phone1 = [ProvinceModel dataObjectWithName:@"江苏" children:[NSArray arrayWithObjects:notebook1, notebook2, notebook3,nil]];
ProvinceModel *phone2 = [ProvinceModel dataObjectWithName:@"苏北" children:nil];
ProvinceModel *phone3 = [ProvinceModel dataObjectWithName:@"皖南" children:nil];
ProvinceModel *phone4 = [ProvinceModel dataObjectWithName:@"皖北" children:nil];
AreaModel *huadong = [AreaModel dataObjectWithName:@"华东大区"
children:[NSArray arrayWithObjects:phone1, phone2, phone3, phone4, nil]];
ProvinceModel *computer1 = [ProvinceModel dataObjectWithName:@"黑龙江"
children:nil];
ProvinceModel *computer2 = [ProvinceModel dataObjectWithName:@"吉林" children:nil];
ProvinceModel *computer3 = [ProvinceModel dataObjectWithName:@"哈尔滨" children:nil];
AreaModel *huabei = [AreaModel dataObjectWithName:@"华北东北大区"
children:[NSArray arrayWithObjects:computer1, computer2, computer3, nil]];
AreaModel *jinghu = [AreaModel dataObjectWithName:@"京沪西南"
children:[NSArray arrayWithObjects:computer1, computer2, computer3, nil]];
self.allAreaData = [NSMutableArray arrayWithObjects:huadong ,huabei, jinghu, nil];
}
#pragma mark - RAtreeView Delegate/DataSource
- (NSInteger)treeView:(RATreeView *)treeView numberOfChildrenOfItem:(id)item
{
NSInteger level = [treeView levelForCellForItem:item];
NSLog(@"11level = %ld", level);
if (level == -1) {
return [self.allAreaData count];
} else if (level == 0) {
AreaModel *data = item;
return data.provinceArray.count;
} else if (level == 1) {
ProvinceModel *data = item;
return data.storeArray.count;
} else {
return 0;
}
}
- (id)treeView:(RATreeView *)treeView child:(NSInteger)index ofItem:(id)item
{
NSInteger level = [treeView levelForCellForItem:item];
NSLog(@"22level = %ld", level);
if (level == -1) {
return [self.allAreaData objectAtIndex:index];
} else if (level == 0) {
AreaModel *data = item;
return data.provinceArray[index];
} else if (level == 1) {
ProvinceModel *data = item;
return data.storeArray[index];
} else {
return nil;
}
}
- (UITableViewCell *)treeView:(RATreeView *)treeView cellForItem:(id)item
{
NSInteger level = [self.treeView levelForCellForItem:item];
NSLog(@"33level = %ld", level);
if (level == 0) {
AreaModel *data = item;
NSInteger numberOfChildren = [data.provinceArray count];
NSString *detailText = [NSString localizedStringWithFormat:@"Number of children %@ level = %ld", [@(numberOfChildren) stringValue], level];
UITableViewCell *cell = [self.treeView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])];
cell.contentView.backgroundColor = [UIColor brownColor];
cell.textLabel.text = data.name;
cell.detailTextLabel.text = detailText;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
} else if (level == 1) {
ProvinceModel *data = item;
NSInteger numberOfChildren = [data.storeArray count];
NSString *detailText = [NSString localizedStringWithFormat:@"Number of children %@ level = %ld", [@(numberOfChildren) stringValue], level];
UITableViewCell *cell = [self.treeView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])];
cell.contentView.backgroundColor = [UIColor yellowColor];
cell.textLabel.text = data.name;
cell.detailTextLabel.text = detailText;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
} else {
StoreModel *data = item;
NSInteger numberOfChildren = 0;
NSString *detailText = [NSString localizedStringWithFormat:@"Number of children %@ level = %ld", [@(numberOfChildren) stringValue], level];
UITableViewCell *cell = [self.treeView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])];
cell.contentView.backgroundColor = [UIColor orangeColor];
cell.textLabel.text = data.name;
cell.detailTextLabel.text = detailText;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
}
- (CGFloat)treeView:(RATreeView *)treeView heightForRowForItem:(id)item
{
return 44;
}
- (BOOL)treeView:(RATreeView *)treeView canEditRowForItem:(id)item
{
return NO;
}
#pragma mark - Lazy loading
- (RATreeView *)treeView
{
if (!_treeView) {
_treeView = [[RATreeView alloc] initWithFrame:self.view.bounds];
_treeView.treeFooterView = [UIView new];
[self.view addSubview:_treeView];
}
return _treeView;
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "CommentModel.h"
@interface PictureCommentTableCell : UITableViewCell @interface PictureCommentTableCell : UITableViewCell
@property (nonatomic, strong) UILabel *suggestLabel; // 评论 @property (nonatomic, strong) UILabel *suggestLabel; // 评论
...@@ -14,4 +15,6 @@ ...@@ -14,4 +15,6 @@
@property (nonatomic, strong) UILabel *positionLabel; // 职位 @property (nonatomic, strong) UILabel *positionLabel; // 职位
@property (nonatomic, strong) UILabel *dateLabel; // 时间 @property (nonatomic, strong) UILabel *dateLabel; // 时间
@property (nonatomic, strong) CommentModel *comment; // 时间
@end @end
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
@implementation PictureCommentTableCell @implementation PictureCommentTableCell
- (void)setComment:(CommentModel *)comment
{
_comment = comment;
self.suggestLabel.text = [NSString stringWithFormat:@"%@", comment.comment];
self.peopleLabel.text = [NSString stringWithFormat:@"%@", comment.commentor_name];
self.dateLabel.text = [NSString stringWithFormat:@"%@", comment.commentTime];
}
#pragma mark - lazy loading #pragma mark - lazy loading
- (UILabel *)suggestLabel - (UILabel *)suggestLabel
{ {
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
@interface PictureDetailModel : NSObject @interface PictureDetailModel : NSObject
@property (nonatomic, strong) NSArray *attachments; @property (nonatomic, strong) NSArray *attachments;
@property (nonatomic, copy) NSString *content; @property (nonatomic, copy) NSString *content;
@property (nonatomic, assign) int commentCount;
@property (nonatomic, strong) NSArray *comments;
@property (nonatomic, copy) NSString *create_id; @property (nonatomic, copy) NSString *create_id;
@property (nonatomic, copy) NSString *create_operName; @property (nonatomic, copy) NSString *create_operName;
@property (nonatomic, copy) NSString *create_time; @property (nonatomic, copy) NSString *create_time;
......
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
- (void)requestPicturePraiseDetail - (void)requestPicturePraiseDetail
{ {
self.allCommentArray = [NSMutableArray array];
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"]; NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
NSString *url = [NSString stringWithFormat:@"%@%@%@?userUuid=%@", kRedStarURL, kPicturePraiseDetailURL, self.uuid, user_uuid]; NSString *url = [NSString stringWithFormat:@"%@%@%@?userUuid=%@", kRedStarURL, kPicturePraiseDetailURL, self.uuid, user_uuid];
...@@ -79,6 +81,14 @@ ...@@ -79,6 +81,14 @@
[picDetail setValuesForKeysWithDictionary:dataDict]; [picDetail setValuesForKeysWithDictionary:dataDict];
_pictureDetail = picDetail; _pictureDetail = picDetail;
_pictureUuid = picDetail.uuid; _pictureUuid = picDetail.uuid;
NSArray *commentArray = picDetail.comments;
for (NSDictionary *dict in commentArray) {
CommentModel *comment = [[CommentModel alloc] init];
[comment setValuesForKeysWithDictionary:dict];
[_allCommentArray addObject:comment];
}
for (NSDictionary *picTextDict in picDetail.attachments) { for (NSDictionary *picTextDict in picDetail.attachments) {
PicTextModel *picText = [[PicTextModel alloc] init]; PicTextModel *picText = [[PicTextModel alloc] init];
[picText setValuesForKeysWithDictionary:picTextDict]; [picText setValuesForKeysWithDictionary:picTextDict];
...@@ -246,7 +256,7 @@ ...@@ -246,7 +256,7 @@
} else if (section == 1) { } else if (section == 1) {
return _picTextArray.count; return _picTextArray.count;
} else { } else {
return 2; return _allCommentArray.count;
} }
} }
...@@ -305,9 +315,7 @@ ...@@ -305,9 +315,7 @@
if (!cell) { if (!cell) {
cell = [[PictureCommentTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kPictureCommentTableCell]; cell = [[PictureCommentTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kPictureCommentTableCell];
} }
cell.suggestLabel.text = [NSString stringWithFormat:@"干的不错!"]; cell.comment = _allCommentArray[indexPath.row];
cell.peopleLabel.text = [NSString stringWithFormat:@"集团某总"];
cell.dateLabel.text = [NSString stringWithFormat:@"2015-12-11 18:52:29"];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell; return cell;
} }
...@@ -459,7 +467,7 @@ ...@@ -459,7 +467,7 @@
NSLog(@"url = %@", url); NSLog(@"url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url]; HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{@"entityType":@"question", NSDictionary *parameters = @{@"entityType":@"legendPraise",
@"entityUuid":_pictureUuid, @"entityUuid":_pictureUuid,
@"comment":_commentView.contentTextView.text}; @"comment":_commentView.contentTextView.text};
NSLog(@"parameters = %@", parameters); NSLog(@"parameters = %@", parameters);
...@@ -484,30 +492,32 @@ ...@@ -484,30 +492,32 @@
} else if (alertView.tag == 455232) { } else if (alertView.tag == 455232) {
// 刷新当前问题详情的评论列表 // 刷新当前问题详情的评论列表
if (buttonIndex == 0) { if (buttonIndex == 0) {
// NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
// NSString *url = [NSString stringWithFormat:@"%@%@%@?userUuid=%@", kRedStarURL, kQuestionDetailURL, _questionUuid ,user_uuid]; NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
//
// HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url]; NSString *url = [NSString stringWithFormat:@"%@%@%@?userUuid=%@", kRedStarURL, kPicturePraiseDetailURL, self.uuid, user_uuid];
// [MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
// [httpClient getQuestionDetailWithParameters:nil completion:^(id response, NSError *error) { HttpClient *http = [[HttpClient alloc] initWithUrl:url];
// NSDictionary *dict = response[@"data"]; __block PictureStoryViewController *weakSelf = self;
// NSLog(@"问题详情 = %@", dict); [http getPicturePraiseDetailWithCompletion:^(id response, NSError *error) {
// QuestionDetailModel *quesDetail = [[QuestionDetailModel alloc] init]; NSLog(@"图说口碑详情 res ===%@, error = %@", response, error);
// [quesDetail setValuesForKeysWithDictionary:dict];
// _questionDetailModel = quesDetail; NSDictionary *dataDict = response[@"data"];
// PictureDetailModel *picDetail = [[PictureDetailModel alloc] init];
// NSArray *commentArray = _questionDetailModel.comments; [picDetail setValuesForKeysWithDictionary:dataDict];
// NSMutableArray *tempArray = [NSMutableArray array]; _pictureDetail = picDetail;
// for (NSDictionary *dict in commentArray) { NSArray *commentArray = picDetail.comments;
// CommentModel *comment = [[CommentModel alloc] init]; NSMutableArray *tempArray = [NSMutableArray array];
// [comment setValuesForKeysWithDictionary:dict]; for (NSDictionary *dict in commentArray) {
// [tempArray addObject:comment]; CommentModel *comment = [[CommentModel alloc] init];
// } [comment setValuesForKeysWithDictionary:dict];
// _allCommentArray = tempArray; [tempArray addObject:comment];
// [self.tableView reloadData]; }
// [MBProgressHUD hideHUDForView:self.view animated:YES]; _allCommentArray = tempArray;
// [weakSelf.tableView reloadData];
// }]; [MBProgressHUD hideHUDForView:self.view animated:YES];
}];
} }
} }
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
} }
[self.thumbBtn setTitle:[NSString stringWithFormat:@"%d", pictureList.likeCount] forState:UIControlStateNormal]; [self.thumbBtn setTitle:[NSString stringWithFormat:@"%d", pictureList.likeCount] forState:UIControlStateNormal];
[self.commentBtn setTitle:@"18" forState:UIControlStateNormal]; [self.commentBtn setTitle:[NSString stringWithFormat:@"%d", pictureList.commentCount] forState:UIControlStateNormal];
} }
#pragma mark - Lazy loading #pragma mark - Lazy loading
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
@interface PictureListModel : NSObject @interface PictureListModel : NSObject
@property (nonatomic, strong) NSArray *attachments; @property (nonatomic, strong) NSArray *attachments;
@property (nonatomic, copy) NSString *content; @property (nonatomic, copy) NSString *content;
@property (nonatomic, assign) int commentCount;
@property (nonatomic, strong) NSArray *comments;
@property (nonatomic, copy) NSString *create_id; @property (nonatomic, copy) NSString *create_id;
@property (nonatomic, copy) NSString *create_operName; @property (nonatomic, copy) NSString *create_operName;
@property (nonatomic, copy) NSString *create_time; @property (nonatomic, copy) NSString *create_time;
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
UIImage *image = [UIImage imageNamed:@"progress-bar"]; UIImage *image = [UIImage imageNamed:@"progress-bar"];
image = [image resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeTile]; image = [image resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeTile];
self.alreadyView.image = image; self.alreadyView.image = image;
NSLog(@"taskList = %@", taskList.state);
if ([taskList.state isEqualToString:@"initial"]) { if ([taskList.state isEqualToString:@"initial"]) {
NSString *str = [NSString stringWithFormat:@"巡检进度:未处理"]; NSString *str = [NSString stringWithFormat:@"巡检进度:未处理"];
NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str]; NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str];
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
[self.progressLabel setAttributedText:strAttr]; [self.progressLabel setAttributedText:strAttr];
self.alreadyLabel.textColor = kProgressDealWithColor; self.alreadyLabel.textColor = kProgressDealWithColor;
self.allLabel.textColor = kProgressDealWithColor; self.allLabel.textColor = kProgressDealWithColor;
} else { } else if ([taskList.state isEqualToString:@"expired"]){
NSString *str = [NSString stringWithFormat:@"巡检进度:已过期"]; NSString *str = [NSString stringWithFormat:@"巡检进度:已过期"];
NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str]; NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kCellDetailColor,NSFontAttributeName:[UIFont systemFontOfSize:14.0f]} range:NSMakeRange(0,5)]; [strAttr addAttributes:@{NSForegroundColorAttributeName:kCellDetailColor,NSFontAttributeName:[UIFont systemFontOfSize:14.0f]} range:NSMakeRange(0,5)];
...@@ -114,6 +114,16 @@ ...@@ -114,6 +114,16 @@
[self.progressLabel setAttributedText:strAttr]; [self.progressLabel setAttributedText:strAttr];
self.alreadyLabel.textColor = kProgressOverDueColor; self.alreadyLabel.textColor = kProgressOverDueColor;
self.allLabel.textColor = kProgressOverDueColor; self.allLabel.textColor = kProgressOverDueColor;
} else if ([taskList.state isEqualToString:@"submitted"]) {
NSString *str = [NSString stringWithFormat:@"巡检进度:已提交"];
NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kCellDetailColor,NSFontAttributeName:[UIFont systemFontOfSize:14.0f]} range:NSMakeRange(0,5)];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kProgressDealWithColor,NSFontAttributeName:[UIFont systemFontOfSize:14.0f]} range:NSMakeRange(5,str.length - 5)];
[self.progressLabel setAttributedText:strAttr];
self.alreadyLabel.textColor = kProgressDealWithColor;
self.allLabel.textColor = kProgressDealWithColor;
} else {
} }
} }
......
...@@ -212,13 +212,15 @@ ...@@ -212,13 +212,15 @@
{ {
NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kInspectListURL]; NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kInspectListURL];
NSLog(@"urlllll = %@", url);
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url]; HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{ NSDictionary *parameters = @{
@"userUuid":[[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"], @"userUuid":[[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"],
//@"queryOrders":@[@{@"field":@"lastModifyInfo"}], @"queryOrders":@[@{@"field":@"lastModifyInfo"}],
@"pageNumber":@(0), @"pageNumber":@(0),
@"pageSize":@(10) @"pageSize":@(10)
}; };
NSLog(@"parametersssssss = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) { [httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
...@@ -669,16 +671,13 @@ ...@@ -669,16 +671,13 @@
// cell显示的内容 // cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
NSString *CellIdentifier = [NSString stringWithFormat:@"Cell%ld%ld", (long)[indexPath section], (long)[indexPath row]];
InspectListCell *cell=[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; InspectListCell *cell=[tableView dequeueReusableCellWithIdentifier:kInspectListCell];
if (!cell) { if (!cell) {
cell = [[InspectListCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier]; cell = [[InspectListCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kInspectListCell];
} }
cell.taskList = (TaskListModel *)_taskListDataArray[indexPath.row]; cell.taskList = (TaskListModel *)_taskListDataArray[indexPath.row];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell; return cell;
} }
...@@ -741,6 +740,7 @@ ...@@ -741,6 +740,7 @@
_tableView.tableFooterView = [[UIView alloc] init]; _tableView.tableFooterView = [[UIView alloc] init];
_tableView.rowHeight = UITableViewAutomaticDimension; _tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 150.0; _tableView.estimatedRowHeight = 150.0;
[_tableView registerClass:[InspectListCell class] forCellReuseIdentifier:kInspectListCell];
[self.view addSubview:_tableView]; [self.view addSubview:_tableView];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:45]; NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:45];
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
@property (nonatomic, copy) NSString *weight; @property (nonatomic, copy) NSString *weight;
@property (nonatomic, copy) NSString *originScore; @property (nonatomic, copy) NSString *originScore;
@property (nonatomic, copy) NSString *readonlyType; @property (nonatomic, copy) NSString *readonlyType;
@property (nonatomic, copy) NSString *orderNo;
+ (instancetype)taskModelWithDict:(NSDictionary *)dict; + (instancetype)taskModelWithDict:(NSDictionary *)dict;
- (instancetype)initWithDict:(NSDictionary *)dict; - (instancetype)initWithDict:(NSDictionary *)dict;
@end @end
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