Kaynağa Gözat

1,缓存调整

jsonwang 3 yıl önce
ebeveyn
işleme
43284be0c1

+ 8 - 6
MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

@@ -235,15 +235,17 @@ class MVHomeController: MVBaseController {
                 if(MVHotVideoModel.getCacheData().count == 0){
                 if(MVHotVideoModel.getCacheData().count == 0){
                     self?.showNetworkError(isHidden: false)
                     self?.showNetworkError(isHidden: false)
                 }
                 }
+                
+                //没有网时查看有无缓存
+                let cacheData = MVHotVideoModel.getCacheData()
+                if(cacheData.count > 0){
+                    BFLog(message: "有缓存数据 ")
+                    self?.refreshData(hotVideos: cacheData)
+                }
                
                
             }
             }
         }
         }
-        
-        let cacheData = MVHotVideoModel.getCacheData()
-        if(cacheData.count > 0){
-            BFLog(message: "有缓存数据 ")
-            refreshData(hotVideos: cacheData)
-        }
+   
 
 
         // 播放器进度和状态回调
         // 播放器进度和状态回调
         PQSingletoVideoPlayer.shared.progressBloc = { [weak self] _, playProgress, duration in
         PQSingletoVideoPlayer.shared.progressBloc = { [weak self] _, playProgress, duration in