wenweiwei пре 4 година
родитељ
комит
7211f50878

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

@@ -122,9 +122,9 @@
 				417D86A3266A375D00DA2444 /* PQConfig.plist */,
 				4112DCF02668C45B00A5AFD9 /* MusicVideoPlus.entitlements */,
 				41CA6E39266782C900874B19 /* Classes */,
-				4185322F2665342100DCA2C1 /* AppDelegate.swift */,
 				418532382665342200DCA2C1 /* Assets.xcassets */,
 				4185323D2665342200DCA2C1 /* Info.plist */,
+				4185322F2665342100DCA2C1 /* AppDelegate.swift */,
 				4112DD492668D6A600A5AFD9 /* MusicVideoPlus-Bridging-Header.h */,
 			);
 			path = MusicVideoPlus;
@@ -640,7 +640,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 14.3;
+				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
 				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
 				MTL_FAST_MATH = YES;
 				ONLY_ACTIVE_ARCH = YES;
@@ -695,7 +695,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 14.3;
+				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_FAST_MATH = YES;
 				SDKROOT = iphoneos;
@@ -714,7 +714,7 @@
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CODE_SIGN_ENTITLEMENTS = MusicVideoPlus/MusicVideoPlus.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1000;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = UH52C8A7SN;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = MusicVideoPlus/Info.plist;
@@ -741,7 +741,7 @@
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CODE_SIGN_ENTITLEMENTS = MusicVideoPlus/MusicVideoPlus.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1000;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = UH52C8A7SN;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = MusicVideoPlus/Info.plist;

+ 22 - 0
MusicVideoPlus/MusicVideoPlus/Assets.xcassets/Login/mi_upload_share_friend.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "mi_upload_share_friend@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "mi_upload_share_friend@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicVideoPlus/MusicVideoPlus/Assets.xcassets/Login/mi_upload_share_friend.imageset/mi_upload_share_friend@2x.png


BIN
MusicVideoPlus/MusicVideoPlus/Assets.xcassets/Login/mi_upload_share_friend.imageset/mi_upload_share_friend@3x.png


+ 10 - 6
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Views/MVBannerCell.swift

@@ -12,6 +12,7 @@ import UIKit
 class MVBannerCell: UICollectionViewCell {
     // 做同款
     var reCreateBtnClicHandle: ((_ sender: UIButton, _ videoInfo: PQVideoListModel?) -> Void)?
+    let musicWidth: CGFloat = cScreenWidth - 90 - (16 + cDefaultMargin) * 2 - (10 + 106 + 10)
     // 封面
     lazy var converView: UIImageView = {
         let iv = UIImageView()
@@ -75,14 +76,13 @@ class MVBannerCell: UICollectionViewCell {
 
     /// 音乐歌曲名称
     lazy var musicNameLab: LMJHorizontalScrollText = {
-//        let name: String = ""
-//        let nameWidth: CGFloat = sizeWithText(text: "\(name)", font: UIFont.systemFont(ofSize: 13), size: CGSize(width: cScreenWidth - ((cDefaultMargin * 6 + 16 * 2) * 2) - (25 + cDefaultMargin * 3), height: cDefaultMargin * 3)).width
-        let musicNameLab = LMJHorizontalScrollText(frame: CGRect(x: 16 + cDefaultMargin, y: 0, width: cScreenWidth - 90 - (16 + cDefaultMargin) * 2 - (10 + 106 + 10), height: 32))
+        let musicNameLab = LMJHorizontalScrollText(frame: CGRect(x: 16 + cDefaultMargin, y: 0, width: musicWidth, height: 32))
         musicNameLab.textColor = UIColor.white
         musicNameLab.textFont = UIFont.systemFont(ofSize: 15, weight: .semibold)
         musicNameLab.speed = 0.03
         musicNameLab.moveDirection = LMJTextScrollMoveLeft
         musicNameLab.moveMode = LMJTextScrollContinuous
+        musicNameLab.stop()
         return musicNameLab
     }()
 
@@ -151,13 +151,17 @@ class MVBannerCell: UICollectionViewCell {
         } else {
             typeImage.image = UIImage(named: "categary_icon")
         }
-        musicNameLab.text = "\(videoData?.reCreateVideoData?.rhythmMusicName ?? "")  "
         let coverImg = (videoData?.videoCoverSnapshotPath != nil && (videoData?.videoCoverSnapshotPath?.count ?? 0) > 0) ? videoData?.videoCoverSnapshotPath ?? "" : (videoData?.coverImg?["coverImgPath"] as? String ?? "")
         BFLog(message: "coverImg url is \(coverImg)")
         netImage(url: coverImg, mainView: converView)
+        let nameWidth: CGFloat = sizeWithText(text: "\(videoData?.reCreateVideoData?.rhythmMusicName ?? "")  ", font: UIFont.systemFont(ofSize: 15, weight: .semibold), size: CGSize(width: cScreenWidth, height: 32)).width
         musicNameLab.stop()
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2) { [weak self] in
-            self?.musicNameLab.move()
+        if nameWidth > musicWidth {
+            musicNameLab.move()
+            musicNameLab.text = "\(videoData?.reCreateVideoData?.rhythmMusicName ?? "")  "
+        } else {
+            musicNameLab.stop()
+            musicNameLab.text = "\(videoData?.reCreateVideoData?.rhythmMusicName ?? "")                                  "
         }
     }
 

+ 17 - 9
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Login/Controllers/MVLoginController.swift

@@ -16,9 +16,8 @@ class MVLoginController: MVBaseController {
 
     @available(iOS 13.0, *)
     lazy var appleSignBtn: ASAuthorizationAppleIDButton = {
-        let appleSignBtn: ASAuthorizationAppleIDButton = ASAuthorizationAppleIDButton(type: .signIn, style: .white)
+        let appleSignBtn: ASAuthorizationAppleIDButton = ASAuthorizationAppleIDButton(type: .signIn, style: .black)
         appleSignBtn.cornerRadius = nomalH / 2
-        //      appleSignBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#333333")
         appleSignBtn.isHidden = true
         appleSignBtn.frame = CGRect(x: 0, y: 0, width: nomalH, height: nomalH)
         appleSignBtn.center = view.center
@@ -28,11 +27,15 @@ class MVLoginController: MVBaseController {
 
     lazy var protocolLab: TYAttributedLabel = {
         let protocolLab = TYAttributedLabel()
-        protocolLab.highlightedLinkBackgroundColor = UIColor.black
-        protocolLab.backgroundColor = UIColor.white
+        protocolLab.highlightedLinkBackgroundColor = UIColor.white
         protocolLab.delegate = self
         protocolLab.numberOfLines = 0
         protocolLab.font = UIFont.systemFont(ofSize: 12)
+        protocolLab.text = "登录即表明同意"
+        protocolLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
+        protocolLab.appendLink(withText: "《软件许可及服务协议》", linkFont: UIFont.systemFont(ofSize: 12), linkColor: UIColor.hexColor(hexadecimal: "#08B706"), underLineStyle: CTUnderlineStyle.single, linkData: cUserProtocol)
+        protocolLab.appendLink(withText: "和", linkFont: UIFont.systemFont(ofSize: 12), linkColor: UIColor.hexColor(hexadecimal: "#999999"), underLineStyle: CTUnderlineStyle(), linkData: nil)
+        protocolLab.appendLink(withText: "《隐私政策》", linkFont: UIFont.systemFont(ofSize: 12), linkColor: UIColor.hexColor(hexadecimal: "#08B706"), underLineStyle: CTUnderlineStyle.single, linkData: cPrivacy)
         protocolLab.textAlignment = CTTextAlignment.center
         return protocolLab
     }()
@@ -57,7 +60,7 @@ class MVLoginController: MVBaseController {
 
         phoneLoginBtn.titleLabel?.font = UIFont.systemFont(ofSize: 12)
         phoneLoginBtn.setImage(UIImage(named: "icon_phone"), for: .normal)
-        phoneLoginBtn.backgroundColor = UIColor.white
+        phoneLoginBtn.backgroundColor = UIColor.black
         phoneLoginBtn.addCorner(corner: nomalH / 2)
         return phoneLoginBtn
     }()
@@ -65,7 +68,6 @@ class MVLoginController: MVBaseController {
     //icon
     lazy var IconView: UIImageView = {
         let IconView = UIImageView.init(image: UIImage(named: "1024x1024px"))
-
         return IconView
     }()
 
@@ -100,6 +102,7 @@ class MVLoginController: MVBaseController {
             self?.view.addSubview(self!.loginBtn)
             self?.view.addSubview(self!.phoneLoginBtn)
             self?.view.addSubview(self!.protocolLab)
+            PQSingletoMemoryUtil.shared.needLogin = true
             if PQSingletoMemoryUtil.shared.needLogin {
                 if #available(iOS 13.0, *) {
                     self?.view.addSubview(self!.appleSignBtn)
@@ -107,14 +110,18 @@ class MVLoginController: MVBaseController {
                     self?.loginBtn.setTitle(nil, for: .normal)
                     self?.phoneLoginBtn.setTitle(nil, for: .normal)
                 }
+                self?.loginBtn.setImage(UIImage.init(named: "mi_upload_share_friend"), for: .normal)
+                self?.loginBtn.backgroundColor = UIColor.black
+            }else{
+                self?.loginBtn.setImage(UIImage.init(named: "weichatLogin"), for: .normal)
+                self?.loginBtn.backgroundColor = UIColor.white
             }
             self?.addLayout()
             self?.phoneLoginBtn.isHidden = !PQSingletoMemoryUtil.shared.needLogin
         }
         
         IconView.snp.makeConstraints { make in
-            make.top.equalTo(view).offset(241)
-            make.centerX.equalTo(view)
+            make.center.equalToSuperview()
             make.height.width.equalTo(260)
         }
     }
@@ -218,8 +225,9 @@ extension MVLoginController: TYAttributedLabelDelegate {
             }
         }
         let detail = PQBaseWebViewController()
+        detail.modalPresentationStyle = .fullScreen
         detail.baseUrl = link
-        navigationController?.pushViewController(detail, animated: true)
+        present(detail, animated: true, completion: nil)
     }
 }
 

+ 2 - 0
MusicVideoPlus/MusicVideoPlus/Info.plist

@@ -44,6 +44,8 @@
 		<key>NSAllowsArbitraryLoads</key>
 		<true/>
 	</dict>
+	<key>NSCameraUsageDescription</key>
+	<string>请点击"允许"以允许访问,以便于反馈,上传头像等功能图片上传</string>
 	<key>NSLocalNetworkUsageDescription</key>
 	<string>请点击"允许"以允许访问,以便于更精确的推荐喜欢的视频</string>
 	<key>NSPhotoLibraryAddUsageDescription</key>