|
@@ -60,18 +60,18 @@ class PQStuckPointMusicSearchController: PQStuckPointMusicContentController {
|
|
|
// 发起搜索请求
|
|
|
@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
|
|
|
// 处理请求数据
|
|
|
BFLog(message: "背景音乐--搜索背景音乐成功")
|
|
|
if bgmList.count <= 0 {
|
|
|
self?.pageNum = (self?.pageNum ?? 0) - 1
|
|
|
}
|
|
|
- if self?.view != nil {
|
|
|
- PQLoadingHUB.shared.dismissHUB(superView: (self?.view)!)
|
|
|
- }
|
|
|
+
|
|
|
if bgmList.count <= 0, (self?.itemList.count ?? 0) <= 0, (self?.hotList.count ?? 0) > 0 {
|
|
|
- self?.hotList.insert(PQEmptyModel(), at: 0)
|
|
|
+ if !(self?.hotList.first is PQEmptyModel){
|
|
|
+ self?.hotList.insert(PQEmptyModel(), at: 0)
|
|
|
+ }
|
|
|
+
|
|
|
self?.configMusicListData(isRefresh: true, musicListData: self?.hotList ?? [])
|
|
|
} else {
|
|
|
self?.configMusicListData(isRefresh: isRefresh, musicListData: bgmList)
|