|
@@ -149,14 +149,14 @@ class BFChooseMusicView: UIView {
|
|
|
tb.separatorColor = UIColor.hexColor(hexadecimal: "#272727")
|
|
|
tb.register(BFMuicInfoCell.self, forCellReuseIdentifier: "BFMuicInfoCell")
|
|
|
tb.backgroundColor = .clear
|
|
|
- tb.mj_footer = MJRefreshAutoFooter.init(refreshingBlock: {[weak self] in
|
|
|
- guard let wself = self else { return }
|
|
|
-
|
|
|
- let cate = wself.categories[wself.categorySelectIndex]
|
|
|
- if (wself.musicDic[cate.id]?.count ?? 0) > 0 {
|
|
|
- wself.getMusicsForCategory()
|
|
|
- }
|
|
|
- })
|
|
|
+// tb.mj_footer = MJRefreshAutoFooter.init(refreshingBlock: {[weak self] in
|
|
|
+// guard let wself = self else { return }
|
|
|
+//
|
|
|
+// let cate = wself.categories[wself.categorySelectIndex]
|
|
|
+// if (wself.musicDic[cate.id]?.count ?? 0) > 0 {
|
|
|
+// wself.getMusicsForCategory()
|
|
|
+// }
|
|
|
+// })
|
|
|
return tb
|
|
|
}()
|
|
|
|
|
@@ -294,8 +294,8 @@ class BFChooseMusicView: UIView {
|
|
|
|
|
|
func getMusicsForCategory() {
|
|
|
let musicListUrl = "produce-center/bgm/pageCateBgm"
|
|
|
- var cate = categories[categorySelectIndex]
|
|
|
- BFNetRequestAdaptor.postRequestData(url: onlinePQTvApi + musicListUrl, parames: ["cateId": cate.id, "pageNum": cate.page, "pageSize": 20], commonParams: commonParams(), encoding: JSONEncoding.default) {[weak self] response, _, error, _ in
|
|
|
+ let cate = categories[categorySelectIndex]
|
|
|
+ BFNetRequestAdaptor.postRequestData(url: onlinePQTvApi + musicListUrl, parames: ["cateId": cate.id, "pageNum": cate.page, "pageSize": 100], commonParams: commonParams(), encoding: JSONEncoding.default) {[weak self] response, _, error, _ in
|
|
|
guard let wself = self else { return }
|
|
|
|
|
|
wself.musicTb.mj_footer?.endRefreshing()
|
|
@@ -477,8 +477,9 @@ extension BFChooseMusicView:UITableViewDelegate, UITableViewDataSource {
|
|
|
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: player.currentItem, queue: .main) {[weak self] notice in
|
|
|
guard let wself = self else { return }
|
|
|
wself.player.currentItem?.seek(to: .zero, completionHandler: nil)
|
|
|
- wself.choseCell()?.status = .pause
|
|
|
- wself.chosedCellStatu = .pause
|
|
|
+// wself.choseCell()?.status = .pause
|
|
|
+// wself.chosedCellStatu = .pause
|
|
|
+ wself.player.play()
|
|
|
}
|
|
|
}else {
|
|
|
cell.status = .playing
|