Commit 89f5fe13 authored by 李震's avatar 李震

去掉page

parent 9e2c6e5a
......@@ -318,7 +318,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
"${BUILT_PRODUCTS_DIR}/GMBase/GMBase.framework",
"${BUILT_PRODUCTS_DIR}/GMCache/GMCache.framework",
......@@ -353,7 +353,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6B1A34007915B07651D26E10 /* [CP] Check Pods Manifest.lock */ = {
......
......@@ -103,7 +103,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase: 30084faea71c10d0f5670625940895f86723703a
GMBase: 98def7643acc4fe5df6603449a29eeaa0558dcff
GMCache: b7d48432ee2469eb0c6c86c720a1958bd373187e
GMHud: 9cc3942fc9f215db55b134cbfd05a458b124a964
GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be
......@@ -119,4 +119,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: b9c24bb8fb1ea50b58c59e079b456b4ca1d9b998
COCOAPODS: 1.5.3
COCOAPODS: 1.6.0.beta.2
......@@ -98,9 +98,6 @@
/** @brief 获取http数据分页第一页起始位置,默认为0,下一页为startNum+每页的数据条数(默认为10) */
@property (nonatomic,assign) NSInteger startNum;
/** @brief 获取http数据,按照页码进行获取(默认为1) */
@property (nonatomic,assign) NSInteger page;
/** @brief 获取http数据,每页获取数据(默认为10) */
@property (nonatomic,assign) NSInteger count;
......
......@@ -20,7 +20,6 @@
_dataArray = [[NSMutableArray alloc] init];
_startNum = 0;
_params = nil;
_page = 1;
_count = 10;
_deduplicationDic = [NSMutableDictionary dictionary];
_fetchDataErrorMsg = @"获取数据失败,请重试";
......@@ -42,7 +41,7 @@
}
- (BOOL)shouldClearDataForResponse:(id)response{
return self.startNum == 0 && self.page == 1;
return self.startNum == 0;
}
- (void)fetchRemoteData{
......@@ -67,7 +66,6 @@
NSArray *array = (NSArray *)responseObject;
[self buildModelWithRemoteArray:array];
self.page++;
[self setValue:@YES forKey:@"fetchDataSuccess"];
}else if([responseObject isKindOfClass:[NSDictionary class]]){
......@@ -76,12 +74,10 @@
self.message = responseObject[@"message"];
if (code == APIStatusCodeSuccess) {
[self buildModelWithRemoteDic:dic];
self.page++;
[self setValue:@YES forKey:@"fetchDataSuccess"];
}else if (code == APIStatusCodeEmpty){
self.message = responseObject[@"message"];
self.page++;
[self setValue:@YES forKey:@"fetchDataSuccess"];
}else{
......@@ -104,7 +100,6 @@
// 因为 clearData 可能会被外部调用,所以 self.startNum = 0 要确认执行,不能少
self.startNum = 0;
_deleteCount = 0;
self.page = 1;
[self.dataArray removeAllObjects];
[_deduplicationDic removeAllObjects];
}
......@@ -112,7 +107,6 @@
- (void)handleHeaderRefreshing
{
self.startNum = 0;
self.page = 1;
[self fetchRemoteData];
}
......
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