|
@@ -458,7 +458,7 @@
|
|
|
{
|
|
|
NSInteger row = indexPath.row;
|
|
|
if(row < _curNASFileAudioMod.data.list.count){
|
|
|
-
|
|
|
+
|
|
|
// NASFileAudioDataModel*dataModel = _curNASFileAudioMod.data.list[row];
|
|
|
// videoPlayByAVPlayerViewController *vc = [videoPlayByAVPlayerViewController new];
|
|
|
// NASFilePicDataArrModel *VideoDataMode = [NASFilePicDataArrModel new];
|
|
@@ -470,6 +470,12 @@
|
|
|
// [self.navigationController pushViewController:vc animated:YES];
|
|
|
|
|
|
NASFileAudioDataModel*dataModel = _curNASFileAudioMod.data.list[row];
|
|
|
+
|
|
|
+ if(dataModel.isOffLineType && !dataModel.isDidCacheType){
|
|
|
+ [self showPlayOffAndNotCacheLineFile];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
audioPlayerViewController * vc = [audioPlayerViewController new];
|
|
|
vc.isfirstEnterType = YES;
|
|
|
vc.outSideDataModel = dataModel;
|
|
@@ -823,6 +829,18 @@
|
|
|
_curNASFileAudioMod = [[NASFileAudioModel alloc] initWithDictionary:DataDict error:nil];
|
|
|
}
|
|
|
|
|
|
+ //没有网络
|
|
|
+ //if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable)
|
|
|
+ {
|
|
|
+ for (NASFileAudioDataModel*model in _curNASFileAudioMod.data.list) {
|
|
|
+ model.isOffLineType = YES;
|
|
|
+ //判断是否有缓存
|
|
|
+ BOOL isDidCacheType = [[audioPlayListManager shareManager] checkFileToDownloadDonewithPath:model.path];
|
|
|
+ model.isDidCacheType = isDidCacheType;
|
|
|
+ HLog(@"isDidCacheType: %d-%@",isDidCacheType,model.name)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
[self getFileListFun:NO];
|
|
|
[self queryShareSwitchFunFun];
|
|
|
}
|
|
@@ -1222,4 +1240,24 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+#pragma mark 文件未缓存提示弹框
|
|
|
+- (void)showPlayOffAndNotCacheLineFile
|
|
|
+{
|
|
|
+ //KWeakSelf
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"File_upload_Record_clear_Tip_title",nil)
|
|
|
+ msg:NSLocalizedString(@"audio_not_Cache_Tip",nil)
|
|
|
+ imageStr:@""
|
|
|
+ cancelTitle:NSLocalizedString(@"common_I_know",nil)
|
|
|
+ okTitle:@""
|
|
|
+ isOkBtnHighlight:NO
|
|
|
+ didClickOk:^{
|
|
|
+ } didClickCancel:^{
|
|
|
+
|
|
|
+ }];
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
@end
|