Forráskód Böngészése

fix:优化购买引导弹窗。

“HeShaoZe” 4 hónapja
szülő
commit
4ce0088821

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

@@ -24,7 +24,7 @@ class QSLGuideusersToCommentManager: NSObject {
     func manageWhetherTriggerPopUpWindow(_ showType : QSLGuideusersToCommentType) {
         //print("showTypesdfsdfs---\(showType)")
         QSLNetwork().request(.guideIsTriggered(dict: [String : Any]())) { response in
-            //print("responsesfsdfsf-----\(response)")
+            //print("responsesfsdfsf-----\(response)---\(showType)")
             let guideIsModel : QSLGuideIsTriggeredModel = response.mapObject(QSLGuideIsTriggeredModel.self, modelKey: "data")
             self.commentType = showType
             self.guideGobalModel = guideIsModel
@@ -41,6 +41,7 @@ class QSLGuideusersToCommentManager: NSObject {
             }
             
         } fail: { code, msg in
+            //print("failsfdsdfsdf-----\(code)---\(code)")
         }
     }
     

+ 8 - 2
QuickSearchLocation/Classes/Main/SceneDelegate.swift

@@ -10,6 +10,8 @@ import UIKit
 class SceneDelegate: UIResponder, UIWindowSceneDelegate {
 
     var window: UIWindow?
+    
+    var isShowTipView : Bool = true
 
     func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
         
@@ -26,8 +28,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
     func sceneDidBecomeActive(_ scene: UIScene) {
         // Called when the scene has moved from an inactive state to an active state.
         // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
-        ///判断要不要弹引导用户去评价
-        QSLGuideusersToCommentManager.commentShare.manageWhetherTriggerPopUpWindow(QSLGuideusersToCommentType.nonMember)
+        if self.isShowTipView {
+            ///判断要不要弹引导用户去评价
+            QSLGuideusersToCommentManager.commentShare.manageWhetherTriggerPopUpWindow(QSLGuideusersToCommentType.nonMember)
+        }
+        self.isShowTipView = false
     }
 
     func sceneWillResignActive(_ scene: UIScene) {
@@ -41,6 +46,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
     }
 
     func sceneDidEnterBackground(_ scene: UIScene) {
+        self.isShowTipView = true
         // Called as the scene transitions from the foreground to the background.
         // Use this method to save data, release shared resources, and store enough scene-specific state information
         // to restore the scene back to its current state.

+ 1 - 0
QuickSearchLocation/Classes/Pages/QSLVip/View/QSLVipAlertView.swift

@@ -239,6 +239,7 @@ class QSLVipAlertView: UIView {
         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()
         }