Prechádzať zdrojové kódy

【会员系统】免费版、付费版显示试用相关逻辑

dinglingui 1 týždeň pred
rodič
commit
1b70230371

+ 5 - 7
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

@@ -547,8 +547,7 @@ class KMUserInfoViewController: NSViewController {
 
 #endif
 #endif
-        
-        
+        var isShowFreeTraalBtn = false
         if KMMemberInfo.shared.userScenarioType == .lite_type1 { //未试用
             buyBox.contentView = buyView1
             buyNow1ImageView.isHidden = false
@@ -561,6 +560,8 @@ class KMUserInfoViewController: NSViewController {
             if isTrialPeriod == true {
                 buyNow2Box.isHidden = true
                 buyNow1BoxLeftConst.constant = (CGRectGetWidth(view.bounds) - CGRectGetWidth(buyNow1Box.frame))/2
+            } else {
+                isShowFreeTraalBtn = true
             }
         } else if KMMemberInfo.shared.userScenarioType == .pro_type3  {
             buyBox.contentView = buyView1
@@ -809,13 +810,10 @@ class KMUserInfoViewController: NSViewController {
             self.viewModel.closeAccountAction()
         }
         
-        if isTrialPeriod == false { //没有试用过,才能显示,不然就算远程支持,功能上也不支持远程控制
+        if isShowFreeTraalBtn == true { //没有试用过,才能显示,不然就算远程支持,功能上也不支持远程控制
             //远程控制
             if let userViewInfoContent = KMAdvertisementManager.manager.info.userViewInfoContent {
-                
-                buyNow1BoxLeftConst.constant = 0
-                buyNow2Box.isHidden = false
-                
+                            
                 if userViewInfoContent.content?.isEmpty == false {
                     buyNow2Box.isHidden = true
                     buyNow1BoxLeftConst.constant = (CGRectGetWidth(view.bounds) - CGRectGetWidth(buyNow1Box.frame))/2