Преглед на файлове

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

dinglingui преди 1 седмица
родител
ревизия
1b70230371
променени са 1 файла, в които са добавени 5 реда и са изтрити 7 реда
  1. 5 7
      PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

+ 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