|
@@ -82,11 +82,23 @@ class MVHomeController: MVBaseController {
|
|
|
}()
|
|
|
//网络错误提示
|
|
|
lazy var emptyRemindView: PQEmptyRemindView = {
|
|
|
- let emptyRemindView = PQEmptyRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth - 120 - cAKSafeAreaHeight))
|
|
|
+ let emptyRemindView = PQEmptyRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
|
|
|
emptyRemindView.fullRefreshBloc = { [weak self] _, _ in
|
|
|
self?.getData()
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
+ emptyRemindView.isNetLost = true
|
|
|
+ emptyRemindView.remindLab.textColor = .black
|
|
|
+ emptyRemindView.remindLab.text = "网络错误"
|
|
|
+ emptyRemindView.remindLab.font = UIFont.boldSystemFont(ofSize: 20)
|
|
|
+ emptyRemindView.imageView.image = nil
|
|
|
+ emptyRemindView.remindSubLab.text = "请检查网络后重试"
|
|
|
+ emptyRemindView.remindSubLab.isHidden = false
|
|
|
+ emptyRemindView.refreshBtn.isHidden = false
|
|
|
+ emptyRemindView.refreshBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
|
|
|
+ emptyRemindView.refreshBtn.setTitle("重试", for: .normal)
|
|
|
+
|
|
|
+
|
|
|
return emptyRemindView
|
|
|
}()
|
|
|
|
|
@@ -177,17 +189,10 @@ class MVHomeController: MVBaseController {
|
|
|
//显示网络未连接提示
|
|
|
func showNetworkError(isHidden:Bool) {
|
|
|
|
|
|
- emptyRemindView.isHidden = isHidden
|
|
|
-
|
|
|
- emptyRemindView.remindLab.textColor = .black
|
|
|
- emptyRemindView.remindLab.text = "网络错误"
|
|
|
- emptyRemindView.remindLab.font = UIFont.boldSystemFont(ofSize: 20)
|
|
|
- emptyRemindView.imageView.image = nil
|
|
|
- emptyRemindView.remindSubLab.text = "请检查网络后重试"
|
|
|
- emptyRemindView.remindSubLab.isHidden = false
|
|
|
- emptyRemindView.refreshBtn.isHidden = false
|
|
|
- emptyRemindView.refreshBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
|
|
|
- emptyRemindView.refreshBtn.setTitle("重试", for: .normal)
|
|
|
+ //有数据时不进行操作
|
|
|
+ if(MVHotVideoModel.getCacheData().count != 0){
|
|
|
+ return
|
|
|
+ }
|
|
|
if(isHidden){
|
|
|
emptyRemindView.removeFromSuperview()
|
|
|
}else{
|