Bladeren bron

[new] 修改文案 新增添加好友弹窗

zhujieshan 2 maanden geleden
bovenliggende
commit
c47e4c8154
25 gewijzigde bestanden met toevoegingen van 489 en 67 verwijderingen
  1. BIN
      .DS_Store
  2. 8 0
      QuickSearchLocation.xcodeproj/project.pbxproj
  3. 1 1
      QuickSearchLocation/Classes/Common/Tool/QSLGuideusersToCommentManager.swift
  4. 0 1
      QuickSearchLocation/Classes/Common/Tool/QSLJumpManager.swift
  5. 40 0
      QuickSearchLocation/Classes/Common/View/QSLAlertView.swift
  6. 69 32
      QuickSearchLocation/Classes/Pages/QSLAdd/Controller/QSLAddController.swift
  7. 1 1
      QuickSearchLocation/Classes/Pages/QSLAlert/View/QSLFriendAddAlertView.swift
  8. 1 1
      QuickSearchLocation/Classes/Pages/QSLFriend/Controller/QSLFriendController.swift
  9. 7 0
      QuickSearchLocation/Classes/Pages/QSLHome/Controller/QSLHomeController.swift
  10. 142 0
      QuickSearchLocation/Classes/Pages/QSLHome/View/QSLAddFriendSuccessAlertView.swift
  11. 158 0
      QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeAddFriendAlertView.swift
  12. 2 2
      QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeEmptyView.swift
  13. 1 1
      QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeFriendFooterView.swift
  14. 1 1
      QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeFriendView.swift
  15. 7 10
      QuickSearchLocation/Classes/Pages/QSLMessage/Controller/QSLMessageController.swift
  16. 6 16
      QuickSearchLocation/Classes/Pages/QSLMessage/QSLRequest/QSLRequestController.swift
  17. 1 1
      QuickSearchLocation/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
  18. BIN
      QuickSearchLocation/Resources/Assets.xcassets/AppIcon.appiconset/app_logo.png
  19. BIN
      QuickSearchLocation/Resources/Assets.xcassets/AppIcon.appiconset/找人定位@2x 2.png
  20. 22 0
      QuickSearchLocation/Resources/Assets.xcassets/Friends/friends_alert_bg.imageset/Contents.json
  21. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Friends/friends_alert_bg.imageset/Group 42963@2x.png
  22. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Friends/friends_alert_bg.imageset/Group 42963@3x.png
  23. 22 0
      QuickSearchLocation/Resources/Assets.xcassets/Home/home_friends_alert_bg.imageset/Contents.json
  24. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Home/home_friends_alert_bg.imageset/主体-1.png
  25. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Home/home_friends_alert_bg.imageset/主体.png

BIN
.DS_Store


+ 8 - 0
QuickSearchLocation.xcodeproj/project.pbxproj

@@ -132,6 +132,8 @@
 		FED298DD2E3C682600F1E0F0 /* QSLRetainPopUpAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED298DC2E3C682600F1E0F0 /* QSLRetainPopUpAlertView.swift */; };
 		FEEB37CA2E28CC8F00BFFD7D /* QSAppleAdHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEEB37C92E28CC8F00BFFD7D /* QSAppleAdHandle.swift */; };
 		FEEB37CD2E28CD7A00BFFD7D /* QSWikiHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEEB37CC2E28CD7A00BFFD7D /* QSWikiHandle.swift */; };
+		FEF9D30E2E824870001F4660 /* QSLAddFriendSuccessAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF9D30D2E824870001F4660 /* QSLAddFriendSuccessAlertView.swift */; };
+		FEF9D3102E82521D001F4660 /* QSLHomeAddFriendAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF9D30F2E82521D001F4660 /* QSLHomeAddFriendAlertView.swift */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -266,6 +268,8 @@
 		FED298DC2E3C682600F1E0F0 /* QSLRetainPopUpAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLRetainPopUpAlertView.swift; sourceTree = "<group>"; };
 		FEEB37C92E28CC8F00BFFD7D /* QSAppleAdHandle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSAppleAdHandle.swift; sourceTree = "<group>"; };
 		FEEB37CC2E28CD7A00BFFD7D /* QSWikiHandle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSWikiHandle.swift; sourceTree = "<group>"; };
+		FEF9D30D2E824870001F4660 /* QSLAddFriendSuccessAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLAddFriendSuccessAlertView.swift; sourceTree = "<group>"; };
+		FEF9D30F2E82521D001F4660 /* QSLHomeAddFriendAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLHomeAddFriendAlertView.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -306,6 +310,8 @@
 				04B666CA2BC922120020BFBD /* QSLHomeFriendView.swift */,
 				FE8360B62D02F7A600978E03 /* QSLHomeAnnotatinView.swift */,
 				FE8360B82D02F9B500978E03 /* QSLHomeCallOutView.swift */,
+				FEF9D30D2E824870001F4660 /* QSLAddFriendSuccessAlertView.swift */,
+				FEF9D30F2E82521D001F4660 /* QSLHomeAddFriendAlertView.swift */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -1043,6 +1049,7 @@
 				04B6B51A2BCCFDE700777EB4 /* Date+Extension.swift in Sources */,
 				04B666CD2BC922460020BFBD /* QSLHomeFriendTableViewCell.swift in Sources */,
 				FE638AB72D0ADD5700858121 /* QSLContactFailCell.swift in Sources */,
+				FEF9D3102E82521D001F4660 /* QSLHomeAddFriendAlertView.swift in Sources */,
 				FE638ABB2D19631900858121 /* QSLGravityManager.swift in Sources */,
 				FE638AA02D082FC400858121 /* QSLLoading.swift in Sources */,
 				FED298DD2E3C682600F1E0F0 /* QSLRetainPopUpAlertView.swift in Sources */,
@@ -1140,6 +1147,7 @@
 				04B666C92BC8E34D0020BFBD /* UITextField+Extension.swift in Sources */,
 				FE83608B2CF96CBA00978E03 /* QSLRoadController.swift in Sources */,
 				FE8360702CF5D1E300978E03 /* QSLFriendTableViewCell.swift in Sources */,
+				FEF9D30E2E824870001F4660 /* QSLAddFriendSuccessAlertView.swift in Sources */,
 				04B6B5242BCD33B100777EB4 /* String+Extension.swift in Sources */,
 				FE638AB52D0AD9A300858121 /* QSLContactSendFailAlertView.swift in Sources */,
 			);

+ 1 - 1
QuickSearchLocation/Classes/Common/Tool/QSLGuideusersToCommentManager.swift

@@ -134,7 +134,7 @@ class QSLGuideusersToCommentManager: NSObject {
 }
 
 
-//管理各种类型的痰喘
+//管理各种类型的弹窗
 extension QSLGuideusersToCommentManager {
     
     ///会员的好评弹窗

+ 0 - 1
QuickSearchLocation/Classes/Common/Tool/QSLJumpManager.swift

@@ -59,7 +59,6 @@ extension QSLJumpManager {
     
     // 跳转到添加好友页面
     func pushToAdd(type: QSLAddJumpType) {
-        
         let vc = QSLAddController()
         vc.type = type
         self.rootViewController()?.pushVC(vc: vc)

+ 40 - 0
QuickSearchLocation/Classes/Common/View/QSLAlertView.swift

@@ -131,6 +131,46 @@ class QSLAlertView: UIView {
         }
     }
     
+    class func alertPic(view: UIView,
+                     title: String,
+                     content: String,
+                     isOneBtn: Bool = false,
+                     contentTextAlignment: NSTextAlignment = .center,
+                     oneBtnText: String = "去登录",
+                     oneBtnClosure: @escaping () -> () = {},
+                     firstBtnClosure: @escaping () -> () = {},
+                     secondBtnClosure: @escaping () -> () = {},
+                     closeBtnClosure: @escaping () -> () = {}) {
+        
+        let window = QSLAlertView(frame: CGRect(x: 0, y: 0, width: QSLConst.qsl_kScreenW, height: QSLConst.qsl_kScreenH))
+        window.titleLabel.text = title
+        window.contentLabel.text = content
+        window.contentLabel.changeLineSpace(space: 4)
+        window.contentLabel.textAlignment = contentTextAlignment
+        window.oneButton.title(oneBtnText)
+        window.oneButton.isHidden = !isOneBtn
+        window.firstButton.isHidden = isOneBtn
+        window.secondButton.isHidden = isOneBtn
+        window.oneBtnClosure = oneBtnClosure
+        window.firstBtnClosure = firstBtnClosure
+        window.secondBtnClosure = secondBtnClosure
+        window.closeBtnClosure = closeBtnClosure
+        
+        let contentHeight = content.heightAccording(width: QSLConst.qsl_kScreenW - 108.rpx, font: UIFont.textF(15), lineSpacing: 4)
+        window.contentView.snp.remakeConstraints { make in
+            make.size.equalTo(CGSize(width: QSLConst.qsl_kScreenW - 60.rpx, height: 65.rpx + contentHeight + 92.0.rpx))
+            make.center.equalToSuperview()
+        }
+        view.addSubview(window)
+        
+        gravityInstance?.track(QSLGravityConst.friend_delete_show)
+        
+        UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 0.95, initialSpringVelocity: 0.05) {
+            window.backgroundColor = .hexStringColor(hexString: "#000000", alpha: 0.7)
+            window.contentView.isHidden = false
+        }
+    }
+    
     override init(frame: CGRect) {
         super.init(frame: frame)
         

+ 69 - 32
QuickSearchLocation/Classes/Pages/QSLAdd/Controller/QSLAddController.swift

@@ -14,6 +14,7 @@ enum QSLAddJumpType: Int {
     case homesmall
     case homebig
     case friend
+    case homealert
 }
 
 class QSLAddController: QSLBaseController {
@@ -31,7 +32,7 @@ class QSLAddController: QSLBaseController {
        
         let button = UIButton()
         button.image(UIImage(named: "public_back_btn"))
-        button.title("添加好友")
+        button.title("查找好友")
         button.mediumFont(17)
         button.textColor(QSLColor.Color_202020)
         button.setImageTitleLayout(.imgLeft, spacing: 4.rpx)
@@ -47,11 +48,35 @@ class QSLAddController: QSLBaseController {
         return view
     }()
     
-    lazy var addTitleIcon: UIImageView = {
-       
-        let imageView = UIImageView()
-        imageView.image = UIImage(named: "add_title_icon")
-        return imageView
+    lazy var addTitleIcon: UILabel = {
+        let label = UILabel()
+        label.text("查找好友的手机号码")
+        label.textColor = .hexStringColor(hexString: "#202020")
+        label.mediumFont(17)
+        return label
+    }()
+    
+    lazy var addTitleIconBg: UIView = {
+        let view = UIView(frame: CGRectMake(0, 0, 82.rpx, 12.rpx))
+        view.addRadius(radius: 6.rpx)
+            
+        // 创建渐变色层
+        let gradientLayer = CAGradientLayer()
+        gradientLayer.colors = [
+            UIColor.hexStringColor(hexString: "#00DDAA",alpha: 1).cgColor,
+            UIColor.hexStringColor(hexString: "#00DDAA",alpha: 0).cgColor
+        ]
+        gradientLayer.startPoint = CGPoint(x: 0, y: 0.4) // 左中
+        gradientLayer.endPoint = CGPoint(x: 1, y: 0.4)   // 右中
+        gradientLayer.frame = view.bounds
+        
+        // 确保在布局变化时更新frame
+        view.layer.insertSublayer(gradientLayer, at: 0)
+        
+        // 添加布局变化的监听
+        view.layoutIfNeeded()
+        view.layoutSubviews()
+        return view
     }()
     
     lazy var addInputView: UIView = {
@@ -98,7 +123,7 @@ class QSLAddController: QSLBaseController {
         let btn = UIButton()
         btn.addRadius(radius: 22.rpx)
         btn.gradientBackgroundColor(color1: .hexStringColor(hexString: "#15CBA1"), color2: .hexStringColor(hexString: "#1FE0BA"), width: QSLConst.qsl_kScreenW - 32.rpx, height: 44.rpx, direction: .horizontal)
-        btn.title("添加")
+        btn.title("查找")
         btn.mediumFont(16)
         btn.textColor(.white)
         btn.setImageTitleLayout(.imgLeft, spacing: 0)
@@ -106,14 +131,14 @@ class QSLAddController: QSLBaseController {
         return btn
     }()
     
-    lazy var infoLabel: UILabel = {
-      
-        let label = UILabel()
-        label.text("定位功能需要双方同意方可使用")
-        label.textColor = .hexStringColor(hexString: "#A7A7A7")
-        label.font(13)
-        return label
-    }()    
+//    lazy var infoLabel: UILabel = {
+//      
+//        let label = UILabel()
+//        label.text("定位功能需要双方同意方可使用")
+//        label.textColor = .hexStringColor(hexString: "#A7A7A7")
+//        label.font(13)
+//        return label
+//    }()    
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -128,6 +153,8 @@ class QSLAddController: QSLBaseController {
                 gravityInstance?.track(QSLGravityConst.add_show, properties: ["id": 1002])
             case .friend:
                 gravityInstance?.track(QSLGravityConst.add_show, properties: ["id": 1003])
+            case .homealert:
+                gravityInstance?.track(QSLGravityConst.add_show, properties: ["id": 1004])
             }
         }
     }
@@ -139,19 +166,22 @@ class QSLAddController: QSLBaseController {
         
         gravityInstance?.track(QSLGravityConst.add_click)
         
-        if !QSLBaseManager.shared.isLogin() {
-            
-            QSLAlertView.alert(view: self.view, title: "温馨提示", content: "登录之后才可以发送好友申请", oneBtnClosure:  {
-                
-                QSLJumpManager.shared.pushToLogin(type: .add)
-            })
-            
-            return
-        }
-        
+//        if !QSLBaseManager.shared.isLogin() {
+//            
+//            QSLAlertView.alert(view: self.view, title: "温馨提示", content: "登录之后才可以发送好友申请", oneBtnClosure:  {
+//                
+//                QSLJumpManager.shared.pushToLogin(type: .add)
+//            })
+//            
+//            return
+//        }
+//        
         if !QSLBaseManager.shared.isVip() {
-            
-            QSLJumpManager.shared.pushToVip(type: .add)
+            if let currentWindow = UIApplication.keyWindow {
+                QSLAddFriendSuccessAlertView.alert(view: currentWindow) {
+                    QSLJumpManager.shared.pushToVip(type: .add)
+                }
+            }
             return
         }
         
@@ -306,6 +336,13 @@ extension QSLAddController {
             make.height.equalTo(236.rpx)
         }
         
+        addView.addSubview(addTitleIconBg)
+        addTitleIconBg.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 82.rpx, height: 12.rpx))
+            make.left.equalTo(24.rpx)
+            make.top.equalTo(38.rpx)
+        }
+        
         addView.addSubview(addTitleIcon)
         addTitleIcon.snp.makeConstraints { make in
             make.size.equalTo(CGSize(width: 157.rpx, height: 26.rpx))
@@ -349,10 +386,10 @@ extension QSLAddController {
             make.bottom.equalTo(-30.rpx)
         }
         
-        self.view.addSubview(infoLabel)
-        infoLabel.snp.makeConstraints { make in
-            make.centerX.equalToSuperview()
-            make.bottom.equalTo(-QSLConst.qsl_kTabbarBottom - 26.rpx)
-        }
+//        self.view.addSubview(infoLabel)
+//        infoLabel.snp.makeConstraints { make in
+//            make.centerX.equalToSuperview()
+//            make.bottom.equalTo(-QSLConst.qsl_kTabbarBottom - 26.rpx)
+//        }
     }
 }

+ 1 - 1
QuickSearchLocation/Classes/Pages/QSLAlert/View/QSLFriendAddAlertView.swift

@@ -81,7 +81,7 @@ class QSLFriendAddAlertView: UIView {
         let label = UILabel()
         label.mediumFont(20)
         label.textColor = QSLColor.textColor_333
-        label.text = "添加好友"
+        label.text = "查找好友"
         return label
     }()
     

+ 1 - 1
QuickSearchLocation/Classes/Pages/QSLFriend/Controller/QSLFriendController.swift

@@ -67,7 +67,7 @@ class QSLFriendController: QSLBaseController {
         btn.addRadius(radius: 22.rpx)
         btn.gradientBackgroundColor(color1: .hexStringColor(hexString: "#15CBA1"), color2: .hexStringColor(hexString: "#1FE0BA"), width: QSLConst.qsl_kScreenW - 32.rpx, height: 44.rpx, direction: .horizontal)
         btn.image(UIImage(named: "home_friends_header_add_icon"))
-        btn.title("添加好友")
+        btn.title("查找好友")
         btn.mediumFont(16)
         btn.textColor(.white)
         btn.setImageTitleLayout(.imgLeft, spacing: 0)

+ 7 - 0
QuickSearchLocation/Classes/Pages/QSLHome/Controller/QSLHomeController.swift

@@ -42,6 +42,13 @@ class QSLHomeController: QSLBaseController {
         
         //处理第一次进入首页定位
         firstEnterLocationHomepage()
+        
+        if let currentWindow = UIApplication.keyWindow {
+            QSLHomeAddFriendView.alert(view: currentWindow) {
+                QSLJumpManager.shared.pushToAdd(type: .homealert)
+            }
+        }
+        
     }
     
     //处理第一次进入首页定位

+ 142 - 0
QuickSearchLocation/Classes/Pages/QSLHome/View/QSLAddFriendSuccessAlertView.swift

@@ -0,0 +1,142 @@
+//
+//  QSLAddFriendSuccessAlertView.swift
+//  QuickSearchLocation
+//
+//  Created by Destiny on 2025/9/23.
+//
+
+import UIKit
+
+class QSLAddFriendSuccessAlertView: UIView {
+    
+    lazy var contentView: UIView = {
+        
+        let contentViewW = QSLConst.qsl_kScreenW - 60.rpx
+        let contentViewH =  298.0.rpx
+        let contentView = UIView(frame: CGRect(x: 0, y: 0, width: contentViewW, height: contentViewH))
+        contentView.backgroundColor = .white
+        contentView.addRadius(radius: 8.rpx)
+        return contentView
+    }()
+    
+    lazy var centerImage : UIImageView = {
+        let centerImage = UIImageView()
+        centerImage.contentMode = .scaleAspectFit
+        centerImage.image = UIImage(named: "friends_alert_bg")
+        return centerImage
+    }()
+    
+    lazy var titleLabel: UILabel = {
+      
+        let label = UILabel()
+        label.text("您已成功定位到好友!")
+        label.mediumFont(20)
+        label.textColor = QSLColor.textColor_333
+        return label
+    }()
+    
+    lazy var oneButton: UIButton = {
+      
+        let btn = UIButton()
+        btn.addRadius(radius: 20.rpx)
+        btn.title("立即查看")
+        btn.textColor(.white)
+        btn.mediumFont(16)
+        btn.gradientBackgroundColor(color1: .hexStringColor(hexString: "#15CBA1"), color2: .hexStringColor(hexString: "#1FE0BA"), width: 150.rpx, height: 40.rpx, direction: .horizontal)
+        btn.addTarget(self, action: #selector(oneBtnAction), for: .touchUpInside)
+        return btn
+    }()
+    
+    lazy var closeButton: UIButton = {
+       
+        let btn = UIButton()
+        btn.setBackgroundImage(UIImage(named: "public_btn_close_AAA"), for: .normal)
+        btn.addTarget(self, action: #selector(removeView), for: .touchUpInside)
+        return btn
+    }()
+    
+    var oneBtnClosure: (() -> ())?
+    
+    class func alert(view: UIView,
+                     clickBtnClosure: @escaping () -> () = {}) {
+        
+        let window = QSLAddFriendSuccessAlertView(frame: CGRect(x: 0, y: 0, width: QSLConst.qsl_kScreenW, height: QSLConst.qsl_kScreenH))
+        view.addSubview(window)
+        window.oneBtnClosure = clickBtnClosure
+        
+        UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 0.95, initialSpringVelocity: 0.05) {
+            window.backgroundColor = .hexStringColor(hexString: "#000000", alpha: 0.7)
+            window.contentView.isHidden = false
+        }
+    }
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        
+        initView()
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    
+    // 单按钮点击事件
+    @objc func oneBtnAction() {
+        if let oneBtnClosure = self.oneBtnClosure {
+            oneBtnClosure()
+        }
+        removeView()
+    }
+    
+    // 移除
+    @objc func removeView() {
+        
+        UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 0.95, initialSpringVelocity: 0.05) { [weak self] in
+            self?.backgroundColor = UIColor.init(white: 0, alpha: 0)
+            self?.contentView.isHidden = true
+            self?.centerImage.isHidden = true
+        } completion: { [weak self] finished in
+            self?.removeFromSuperview()
+        }
+    }
+}
+
+extension QSLAddFriendSuccessAlertView {
+    
+    func initView() {
+        
+        addSubview(contentView)
+        contentView.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: QSLConst.qsl_kScreenW - 60.rpx, height: 298.0.rpx))
+            make.center.equalToSuperview()
+        }
+        
+        contentView.addSubview(centerImage)
+        centerImage.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 190.rpx, height: 175.rpx))
+            make.centerX.equalToSuperview()
+            make.top.equalTo(12.rpx)
+        }
+        
+        contentView.addSubview(titleLabel)
+        titleLabel.snp.makeConstraints { make in
+            make.centerX.equalToSuperview()
+            make.top.equalTo(192.rpx)
+        }
+        
+        contentView.addSubview(closeButton)
+        closeButton.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 24.rpx, height: 24.rpx))
+            make.top.equalTo(12.rpx)
+            make.right.equalTo(-12.rpx)
+        }
+ 
+        contentView.addSubview(oneButton)
+        oneButton.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 150.rpx, height: 40.rpx))
+            make.centerX.equalToSuperview()
+            make.bottom.equalTo(-24.rpx)
+        }
+    }
+}

+ 158 - 0
QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeAddFriendAlertView.swift

@@ -0,0 +1,158 @@
+//
+//  QSLHomeAddFriendView.swift
+//  QuickSearchLocation
+//
+//  Created by Destiny on 2025/9/23.
+//
+
+import UIKit
+
+class QSLHomeAddFriendView: UIView {
+    
+    lazy var contentView: UIView = {
+        
+        let contentViewW = QSLConst.qsl_kScreenW
+        let contentViewH =  365.0.rpx
+        let contentView = UIView(frame: CGRect(x: 0, y: 0, width: contentViewW, height: contentViewH))
+        return contentView
+    }()
+    
+    lazy var centerImage : UIImageView = {
+        let centerImage = UIImageView()
+        centerImage.contentMode = .scaleAspectFit
+        centerImage.image = UIImage(named: "home_friends_alert_bg")
+        return centerImage
+    }()
+    
+    lazy var titleLabel: UILabel = {
+      
+        let label = UILabel()
+        label.text("实时定位轨迹")
+        label.boldFont(30)
+        label.textColor = QSLColor.textColor_333
+        return label
+    }()
+    
+    lazy var contentLabel: UILabel = {
+      
+        let label = UILabel()
+        label.text("去添加Ta的好友开启守护!")
+        label.font(12)
+        label.textColor = .hexStringColor(hexString: "#61877F")
+        return label
+    }()
+    
+    lazy var oneButton: UIButton = {
+      
+        let btn = UIButton()
+        btn.addRadius(radius: 22.rpx)
+        btn.title("查找好友")
+        btn.textColor(.white)
+        btn.mediumFont(16)
+        btn.gradientBackgroundColor(color1: .hexStringColor(hexString: "#15CBA1"), color2: .hexStringColor(hexString: "#1FE0BA"), width: 250.rpx, height: 44.rpx, direction: .horizontal)
+        btn.addTarget(self, action: #selector(oneBtnAction), for: .touchUpInside)
+        return btn
+    }()
+    
+    lazy var hideButton: UIButton = {
+        let btn = UIButton()
+        btn.title("下次再说")
+        btn.textColor(.init(white: 0, alpha: 0.4))
+        btn.font(11)
+        btn.addTarget(self, action: #selector(removeView), for: .touchUpInside)
+        return btn
+    }()
+    
+    var oneBtnClosure: (() -> ())?
+    
+    class func alert(view: UIView,
+                     clickBtnClosure: @escaping () -> () = {}) {
+        
+        let window = QSLHomeAddFriendView(frame: CGRect(x: 0, y: 0, width: QSLConst.qsl_kScreenW, height: QSLConst.qsl_kScreenH))
+        view.addSubview(window)
+        window.oneBtnClosure = clickBtnClosure
+        
+        UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 0.95, initialSpringVelocity: 0.05) {
+            window.backgroundColor = .hexStringColor(hexString: "#000000", alpha: 0.7)
+            window.contentView.isHidden = false
+        }
+    }
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        
+        initView()
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    
+    // 单按钮点击事件
+    @objc func oneBtnAction() {
+        if let oneBtnClosure = self.oneBtnClosure {
+            oneBtnClosure()
+        }
+        removeView()
+    }
+    
+    // 移除
+    @objc func removeView() {
+        
+        UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 0.95, initialSpringVelocity: 0.05) { [weak self] in
+            self?.backgroundColor = UIColor.init(white: 0, alpha: 0)
+            self?.contentView.isHidden = true
+            self?.centerImage.isHidden = true
+        } completion: { [weak self] finished in
+            self?.removeFromSuperview()
+        }
+    }
+}
+
+extension QSLHomeAddFriendView {
+    
+    func initView() {
+        
+        addSubview(contentView)
+        contentView.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: QSLConst.qsl_kScreenW, height: 365.0.rpx))
+            make.center.equalToSuperview()
+        }
+        
+        contentView.addSubview(centerImage)
+        centerImage.snp.makeConstraints { make in
+            make.top.bottom.left.right.equalTo(0)
+        }
+        
+        contentView.addSubview(titleLabel)
+        titleLabel.snp.makeConstraints { make in
+            make.left.equalTo(54.rpx)
+            make.right.equalTo(-54.rpx)
+            make.top.equalTo(22.rpx)
+            make.height.equalTo(42.rpx)
+        }
+        
+        contentView.addSubview(contentLabel)
+        contentLabel.snp.makeConstraints { make in
+            make.left.equalTo(54.rpx)
+            make.right.equalTo(-54.rpx)
+            make.top.equalTo(titleLabel.snp.bottom)
+            make.height.equalTo(14.rpx)
+        }
+        
+        contentView.addSubview(hideButton)
+        hideButton.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 60.rpx, height: 28.rpx))
+            make.centerX.equalToSuperview()
+            make.bottom.equalTo(-20.rpx)
+        }
+        
+        contentView.addSubview(oneButton)
+        oneButton.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 250.rpx, height: 44.rpx))
+            make.centerX.equalToSuperview()
+            make.bottom.equalTo(-56.rpx)
+        }
+    }
+}

+ 2 - 2
QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeEmptyView.swift

@@ -48,7 +48,7 @@ class QSLHomeEmptyView: UIView {
         let _emptyFriTitleLabel = UILabel()
         _emptyFriTitleLabel.boldFont(15)
         _emptyFriTitleLabel.textColor = QSLColor.textColor_333
-        _emptyFriTitleLabel.text = "添加好友"
+        _emptyFriTitleLabel.text = "查找好友"
         return _emptyFriTitleLabel
     }()
     
@@ -86,7 +86,7 @@ class QSLHomeEmptyView: UIView {
         let _emptyFriAddLabel = UILabel()
         _emptyFriAddLabel.mediumFont(14)
         _emptyFriAddLabel.textColor = QSLColor.textColor_333
-        _emptyFriAddLabel.text = "添加"
+        _emptyFriAddLabel.text = "查找"
         return _emptyFriAddLabel
     }()
     

+ 1 - 1
QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeFriendFooterView.swift

@@ -37,7 +37,7 @@ class QSLHomeFriendFooterView: UIView {
         btn.addRadius(radius: 22.rpx)
         btn.gradientBackgroundColor(color1: .hexStringColor(hexString: "#15CBA1"), color2: .hexStringColor(hexString: "#1FE0BA"), width: 280.rpx, height: 44.rpx, direction: .horizontal)
         btn.image(UIImage(named: "home_friends_header_add_icon"))
-        btn.title("添加好友")
+        btn.title("查找好友")
         btn.mediumFont(15)
         btn.textColor(.white)
         btn.setImageTitleLayout(.imgLeft, spacing: 0)

+ 1 - 1
QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeFriendView.swift

@@ -106,7 +106,7 @@ class QSLHomeFriendView: UIView {
         let btn = UIButton()
         btn.setBackgroundImage(UIImage(named: "home_friends_header_add_btn_bg"), for: .normal)
         btn.image(UIImage(named: "home_friends_header_add_icon"))
-        btn.title("添加好友")
+        btn.title("查找好友")
         btn.mediumFont(15)
         btn.textColor(.white)
         btn.setImageTitleLayout(.imgLeft, spacing: 0)

+ 7 - 10
QuickSearchLocation/Classes/Pages/QSLMessage/Controller/QSLMessageController.swift

@@ -160,16 +160,13 @@ extension QSLMessageController: QSLMessageHeaderViewDelegate, QSLMessageTableVie
     
     // 同意点击
     func accpetBtnAction(model: QSLRequestModel) {
-        
-        QSLAlertView.alert(view: self.view, title: "添加好友", content: "1.您同意添加该用户为好友,则视为您同意本应用合法收集储存和使用信息;\n2.并同意将您的位置、轨迹等信息分享给该好友。", isOneBtn: true, oneBtnText: "确认添加", oneBtnClosure:  {
-            QSLNetwork().request(.requestAccept(dict: ["id": model.requestId])) { response in
-                
-                // 发送通知
-                NotificationCenter.default.post(name: QSLNotification.QSLRefreshRequest, object: nil)
-            } fail: { code, error in
-                self.view.toast(text: error)
-            }
-        })
+        QSLNetwork().request(.requestAccept(dict: ["id": model.requestId])) { response in
+            
+            // 发送通知
+            NotificationCenter.default.post(name: QSLNotification.QSLRefreshRequest, object: nil)
+        } fail: { code, error in
+            self.view.toast(text: error)
+        }
     }
     
     func jumpToRequest() {

+ 6 - 16
QuickSearchLocation/Classes/Pages/QSLMessage/QSLRequest/QSLRequestController.swift

@@ -94,22 +94,12 @@ extension QSLRequestController: QSLRequestCellDelegate {
     
     // 同意点击
     func accpetBtnAction(model: QSLRequestModel) {
-        
-        gravityInstance?.track(QSLGravityConst.message_request_agree)
-        gravityInstance?.track(QSLGravityConst.message_request_agree_show)
-        QSLAlertView.alert(view: self.view, title: "添加好友", content: "1.您同意添加该用户为好友,则视为您同意本应用合法收集储存和使用信息;\n2.并同意将您的位置、轨迹等信息分享给该好友。", isOneBtn: true, oneBtnText: "确认添加", oneBtnClosure:  {
-            gravityInstance?.track(QSLGravityConst.message_request_agree_show_confirm)
-            QSLNetwork().request(.requestAccept(dict: ["id": model.requestId])) { response in
-                
-                // 发送通知
-                NotificationCenter.default.post(name: QSLNotification.QSLRefreshRequest, object: nil)
-            } fail: { code, error in
-                self.view.toast(text: error)
-            }
-        }, closeBtnClosure: {
-            
-            gravityInstance?.track(QSLGravityConst.message_request_agree_show_cancel)
-        })
+        QSLNetwork().request(.requestAccept(dict: ["id": model.requestId])) { response in
+            // 发送通知
+            NotificationCenter.default.post(name: QSLNotification.QSLRefreshRequest, object: nil)
+        } fail: { code, error in
+            self.view.toast(text: error)
+        }
     }
 }
 

+ 1 - 1
QuickSearchLocation/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -1,7 +1,7 @@
 {
   "images" : [
     {
-      "filename" : "app_logo.png",
+      "filename" : "找人定位@2x 2.png",
       "idiom" : "universal",
       "platform" : "ios",
       "size" : "1024x1024"

BIN
QuickSearchLocation/Resources/Assets.xcassets/AppIcon.appiconset/app_logo.png


BIN
QuickSearchLocation/Resources/Assets.xcassets/AppIcon.appiconset/找人定位@2x 2.png


+ 22 - 0
QuickSearchLocation/Resources/Assets.xcassets/Friends/friends_alert_bg.imageset/Contents.json

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

BIN
QuickSearchLocation/Resources/Assets.xcassets/Friends/friends_alert_bg.imageset/Group 42963@2x.png


BIN
QuickSearchLocation/Resources/Assets.xcassets/Friends/friends_alert_bg.imageset/Group 42963@3x.png


+ 22 - 0
QuickSearchLocation/Resources/Assets.xcassets/Home/home_friends_alert_bg.imageset/Contents.json

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

BIN
QuickSearchLocation/Resources/Assets.xcassets/Home/home_friends_alert_bg.imageset/主体-1.png


BIN
QuickSearchLocation/Resources/Assets.xcassets/Home/home_friends_alert_bg.imageset/主体.png