wenweiwei 3 лет назад
Родитель
Сommit
263d45b3de

+ 4 - 2
BFFramework/Classes/PModels/PQVideoListModel.swift

@@ -127,9 +127,11 @@ public class PQVideoListModel: PQBaseModel {
     // add by ak 发布视频来源类型
     public var videoFromScene: videoFromScene = .UploadNormal
     
-    //视频分类
+    // 视频分类
     public var categoryName:String = ""
-
+    // 视频分类图
+    public var categoryImage:String?
+    
     override public init(jsonDict: [String: Any]) {
         super.init(jsonDict: jsonDict)
 

+ 1 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicContentController.swift

@@ -125,7 +125,7 @@ class PQStuckPointMusicContentController: PQBaseViewController {
         } else {
             itemList = itemList + musicListData
         }
-        if musicListData.count < 20 || itemList.first is PQEmptyModel {
+        if (contentType != .serach && musicListData.count < 20) || (contentType == .serach && musicListData.count <= 0) || itemList.first is PQEmptyModel {
             collectionView.mj_footer?.endRefreshingWithNoMoreData()
         } else {
             collectionView.mj_footer?.endRefreshing()

+ 5 - 6
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicSearchController.swift

@@ -32,9 +32,8 @@ class PQStuckPointMusicSearchController: PQStuckPointMusicContentController {
         emptyRemindView.remindLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
         emptyRemindView.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: 200)
         emptyRemindView.emptyData = emptyData
-        emptyRemindView.backgroundColor = UIColor.hexColor(hexadecimal: "#111111")
         refreshHandle = { [weak self] _, _ in
-            self?.loadRequestData()
+            self?.loadRequestData(isRefresh: false)
         }
     }
 
@@ -59,7 +58,7 @@ class PQStuckPointMusicSearchController: PQStuckPointMusicContentController {
     }
 
     // 发起搜索请求
-    @objc func loadRequestData() {
+    @objc func loadRequestData(isRefresh: Bool = true) {
         pageNum = pageNum + 1
         PQLoadingHUB.shared.showHUB(superView: view)
         PQBaseViewModel.searchBGMListData(searchWord, pageNum, 20, videoCount: selectedDataCount - selectedImageDataCount, imageCount: selectedImageDataCount, totalDuration: selectedTotalDuration) { [weak self] bgmList, msg in
@@ -71,11 +70,11 @@ class PQStuckPointMusicSearchController: PQStuckPointMusicContentController {
             if self?.view != nil {
                 PQLoadingHUB.shared.dismissHUB(superView: (self?.view)!)
             }
-            if bgmList.count <= 0, (self?.hotList.count ?? 0) > 0 {
+            if bgmList.count <= 0, (self?.itemList.count ?? 0) <= 0, (self?.hotList.count ?? 0) > 0 {
                 self?.hotList.insert(PQEmptyModel(), at: 0)
-                self?.configMusicListData(musicListData: self?.hotList ?? [])
+                self?.configMusicListData(isRefresh: true, musicListData: self?.hotList ?? [])
             } else {
-                self?.configMusicListData(musicListData: bgmList)
+                self?.configMusicListData(isRefresh: isRefresh, musicListData: bgmList)
             }
             // 点击上报:用户在搜索框输入文字然后按回车-返回结果后上报
             PQEventTrackViewModel.baseReportUpload(businessType: .bt_buttonClick, objectType: .ot_click_searchSyncedUpMusic, pageSource: .sp_stuck_searchSyncedUpMusic, extParams: ["searchText": self?.searchWord ?? "", "searchResultNumber": bgmList.count, "isSuccess": msg == nil], remindmsg: "卡点视频数据上报-(点击上报:用户在搜索框输入文字然后按回车)")