Commit 303d6765 authored by 井庆林's avatar 井庆林

code review

parent 29d7889e
...@@ -601,8 +601,10 @@ static NSString *sdkVersion = @"110"; ...@@ -601,8 +601,10 @@ static NSString *sdkVersion = @"110";
NSData *compressedData = [PhobosUtil compressData:JSON]; NSData *compressedData = [PhobosUtil compressData:JSON];
if (compressedData) { if (compressedData) {
[PhobosUtil sendData:compressedData currentAPI:currentAPI success:^(NSInteger code) { [PhobosUtil sendData:compressedData currentAPI:currentAPI success:^(NSInteger code) {
if (code == 200) {
phobosLog(@"✈ ---------- ✈ data arrived Mars"); phobosLog(@"✈ ---------- ✈ data arrived Mars");
[GMCache removeObjectAtDocumentPathWithkey:PhobosTempCacheKeyStr]; [GMCache removeObjectAtDocumentPathWithkey:PhobosTempCacheKeyStr];
}
}]; }];
} }
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
[total addObjectsFromArray:immiDataArray]; [total addObjectsFromArray:immiDataArray];
if (total.count > 0) { if (total.count > 0) {
[self sendDataArray:total currentAPI:Phobos.sharedClient.serverAPI success:^(NSInteger code) { [self sendDataArray:total currentAPI:Phobos.sharedClient.serverAPI success:^(NSInteger code) {
if (code) { if (code == 200) {
[GMCache removeObjectAtDocumentPathWithkey:PhobosCacheKey]; [GMCache removeObjectAtDocumentPathWithkey:PhobosCacheKey];
[GMCache removeObjectAtDocumentPathWithkey:PhobosTempCacheKey]; [GMCache removeObjectAtDocumentPathWithkey:PhobosTempCacheKey];
} }
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
NSArray *exposureArray = [GMCache fetchObjectAtDocumentPathWithkey:[PhobosUtil MD5String:exposureAPI]]; NSArray *exposureArray = [GMCache fetchObjectAtDocumentPathWithkey:[PhobosUtil MD5String:exposureAPI]];
if (exposureArray.count > 0) { if (exposureArray.count > 0) {
[self sendDataArray:exposureArray currentAPI:exposureAPI success:^(NSInteger code) { [self sendDataArray:exposureArray currentAPI:exposureAPI success:^(NSInteger code) {
if (code) { if (code = 200) {
[GMCache removeObjectAtDocumentPathWithkey:[PhobosUtil MD5String:exposureAPI]]; [GMCache removeObjectAtDocumentPathWithkey:[PhobosUtil MD5String:exposureAPI]];
} }
}]; }];
......
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