|
@@ -823,15 +823,11 @@
|
|
|
[self checkFileTransferTask];
|
|
|
|
|
|
if(!_curNASFileAudioMod){
|
|
|
- //数据缓存
|
|
|
- NSString *key = stringKeyAddSn(@"getFileList_audio");
|
|
|
- NSDictionary *DataDict = [HWDataManager getObjectWithKey:key];
|
|
|
- if(DataDict){
|
|
|
- _curNASFileAudioMod = [[NASFileAudioModel alloc] initWithDictionary:DataDict error:nil];
|
|
|
- }
|
|
|
|
|
|
- [self checkNetWorkStateFun];
|
|
|
[self getFileListFun:NO];
|
|
|
+
|
|
|
+ [self checkNetWorkStateFun];
|
|
|
+
|
|
|
[self queryShareSwitchFunFun];
|
|
|
}
|
|
|
}
|
|
@@ -927,6 +923,23 @@
|
|
|
#pragma mark 获取文件数据
|
|
|
- (void)getFileListFun:(BOOL)isMoreDataType
|
|
|
{
|
|
|
+ //无网 拿数据缓存
|
|
|
+ if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable)
|
|
|
+ {
|
|
|
+ //数据缓存
|
|
|
+ NSString *fullPath = [[NSString alloc] initWithFormat:@"getFileList_audio_%@",self.defaultDiskPath];
|
|
|
+ NSString *key = stringKeyAddSn(fullPath);
|
|
|
+ NSDictionary *DataDict = [HWDataManager getObjectWithKey:key];
|
|
|
+ if(DataDict){
|
|
|
+ _curNASFileAudioMod = [[NASFileAudioModel alloc] initWithDictionary:DataDict error:nil];
|
|
|
+
|
|
|
+ if(_curNASFileAudioMod && _curNASFileAudioMod.status == 0){
|
|
|
+ [self.tableView reloadData];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
NSMutableDictionary*paraDict = [NSMutableDictionary new];
|
|
|
if(_isAudioType){
|
|
|
[paraDict setValue:@"audio" forKey:@"type"];
|
|
@@ -985,7 +998,8 @@
|
|
|
}
|
|
|
|
|
|
//数据缓存
|
|
|
- NSString *key = stringKeyAddSn(@"getFileList_audio");
|
|
|
+ NSString *fullPath = [[NSString alloc] initWithFormat:@"getFileList_audio_%@",self.defaultDiskPath];
|
|
|
+ NSString *key = stringKeyAddSn(fullPath);
|
|
|
[HWDataManager setObjectWithKey:key value:IdDataDict];
|
|
|
}
|
|
|
|