wenweiwei 4 лет назад
Родитель
Сommit
90e90dd0ab

+ 2 - 2
MusicVideoPlus/MusicVideoPlus.xcodeproj/project.pbxproj

@@ -443,7 +443,7 @@
 				418532292665342100DCA2C1 /* Frameworks */,
 				4185322A2665342100DCA2C1 /* Resources */,
 				3115904EEDD5A7932018A62B /* [CP] Embed Pods Frameworks */,
-				7EA76EEB18443B8F15F6D8BC /* [CP] Copy Pods Resources */,
+				B4D6DF670E78DECAE0A8DDF5 /* [CP] Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -538,7 +538,7 @@
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MusicVideoPlus/Pods-MusicVideoPlus-frameworks.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
-		7EA76EEB18443B8F15F6D8BC /* [CP] Copy Pods Resources */ = {
+		B4D6DF670E78DECAE0A8DDF5 /* [CP] Copy Pods Resources */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (

+ 4 - 2
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Base/Views/PQServerProtocalView.swift

@@ -57,6 +57,9 @@ class PQServerProtocalView: UIView {
 
     override init(frame: CGRect) {
         super.init(frame: frame)
+        addSubview(contentView)
+        contentView.addSubview(titleLab)
+        contentView.addSubview(confirmBtn)
         contentView.addSubview(protocolLab)
         titleLab.text = "服务协议与隐私政策"
         titleLab.textAlignment = .center
@@ -75,7 +78,6 @@ class PQServerProtocalView: UIView {
     func addLayout() {
         let normalH: CGFloat = cDefaultMargin * 2.5
         var protocolH: CGFloat = protocolLab.getSizeWithWidth(cScreenWidth - cDefaultMargin * 12).height
-
         if cScreenHeigth <= 568.0 {
             protocolH = protocolH + cDefaultMargin * 4
         }
@@ -111,11 +113,11 @@ class PQServerProtocalView: UIView {
     }
 
     @objc func btnClck(sender: UIButton) {
+        saveUserDefaults(key: cShowProtocal, value: "1")
         removeFromSuperview()
         if remindBlock != nil {
             remindBlock!(sender, nil)
         }
-        saveUserDefaults(key: cShowProtocal, value: "1")
     }
 }
 

+ 7 - 3
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/MVHomeController.swift

@@ -143,10 +143,14 @@ class MVHomeController: MVBaseController {
             protocalView.remindBlock = { [weak self] sender, webUrl in
                 if sender == nil, webUrl != nil {
                     let detail = PQBaseWebViewController()
-//                    detail.evaluateJavaScript = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='210%'"
+                    detail.evaluateJavaScript = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='210%'"
                     detail.baseUrl = webUrl
                     self?.navigationController?.pushViewController(detail, animated: true)
                 }
+                // 移除继续播放
+                if sender != nil {
+                    PQSingletoVideoPlayer.shared.resetPlayer()
+                }
             }
             UIApplication.shared.keyWindow?.addSubview(protocalView)
         }
@@ -294,8 +298,8 @@ extension MVHomeController: MVBannerDataSource, MVBannerDelegate {
         BFLog(message: "page is \(page)")
 
         let cell: MVBannerCell? = banner.collectionView.cellForItem(at: IndexPath(row: page, section: 0)) as? MVBannerCell
-
-        if mVideos.count > 0, cell != nil {
+        let showProtocal: String? = getUserDefaults(key: cShowProtocal) as? String
+        if mVideos.count > 0, cell != nil, showProtocal != nil, showProtocal == "1" {
             cell?.pauseView.isHidden = true
             PQSingletoVideoPlayer.shared.configPlyer(videoData: mAllVideos[page], controllerView: cell!.converView)
 

+ 1 - 0
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Login/Controllers/MVLoginController.swift

@@ -221,6 +221,7 @@ extension MVLoginController: TYAttributedLabelDelegate {
         }
         let detail = PQBaseWebViewController()
         detail.baseUrl = link
+        detail.evaluateJavaScript = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='210%'"
         navigationController?.pushViewController(detail, animated: true)
     }
 }

+ 1 - 0
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Setting/Controllers/MVSettingController.swift

@@ -132,6 +132,7 @@ extension MVSettingController: TYAttributedLabelDelegate {
             }
         }
         let detail = PQBaseWebViewController()
+        detail.evaluateJavaScript = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='210%'"
         detail.baseUrl = link
         navigationController?.pushViewController(detail, animated: true)
     }