jsonwang 4 лет назад
Родитель
Сommit
190a748482

+ 16 - 0
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Base/Views/PQServerProtocalView.swift

@@ -239,6 +239,19 @@ public class PQBandingPhoneRemindView: UIView {
             bandingPhoneRemindHandle!(sender)
         }
     }
+    
+    /// 账号被封禁提示
+    /// - Returns: <#description#>
+   class func accountBlockRemindView(remindTitle: String) {
+        let remindData = PQBaseModel()
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.lineSpacing = 3.0
+        paragraphStyle.alignment = .center
+        remindData.attributedTitle = NSMutableAttributedString(string: "您的账号已被封禁,\(remindTitle)\n有疑问可拨打客服电话:\n0731-85676658", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14), NSAttributedString.Key.foregroundColor: UIColor.hexColor(hexadecimal: "#666666"), NSAttributedString.Key.paragraphStyle: paragraphStyle])
+        let remindView = PQUploadRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
+        UIApplication.shared.keyWindow?.addSubview(remindView)
+        remindView.remindData = remindData
+    }
 }
 
 
@@ -258,3 +271,6 @@ extension PQBandingPhoneRemindView: TYAttributedLabelDelegate {
         }
     }
 }
+
+
+

+ 8 - 0
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

@@ -281,6 +281,14 @@ class MVHomeController: MVBaseController {
             return false
         }
         
+        // 用户被封禁
+        BFLog(message: "userStatus is \(BFLoginUserInfo.shared.userStatus)")
+        if BFLoginUserInfo.shared.userStatus == "3" {
+            
+            PQBandingPhoneRemindView.accountBlockRemindView(remindTitle:"无法进行再创作")
+            return false
+        }
+        
         // 未绑定手机号
         BFLog(message: "phoneNumber is \(BFLoginUserInfo.shared.phoneNumber)")
         if BFLoginUserInfo.shared.phoneNumber.count <= 0 || BFLoginUserInfo.shared.phoneNumber == "<null>" {