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

code review

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