|
@@ -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: "卡点视频数据上报-(点击上报:用户在搜索框输入文字然后按回车)")
|