Ver código fonte

【会员系统】- 会员中心,到期日期显示逻辑跳转,统一判断试用、订阅、订阅到期

wangshuai 6 dias atrás
pai
commit
ac0621679b

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

@@ -428,25 +428,17 @@ class KMUserInfoViewController: NSViewController {
         endDateLabel.font = NSFont.SFProTextRegularFont(12)
         spliLineImageView.isHidden = true
         endDateLabel.isHidden = true
-        if KMMemberInfo.shared.userScenarioType == .lite_type2 ||
-            KMMemberInfo.shared.userScenarioType == .lite_type4 ||
-            KMMemberInfo.shared.userScenarioType == .lite_type6 ||
-            KMMemberInfo.shared.userScenarioType == .lite_type7 ||
-            KMMemberInfo.shared.userScenarioType == .lite_type8 ||
-            KMMemberInfo.shared.userScenarioType == .lite_type10 ||
-            KMMemberInfo.shared.userScenarioType == .lite_type12 ||
-            KMMemberInfo.shared.userScenarioType == .lite_type13 ||
-            KMMemberInfo.shared.userScenarioType == .pro_type2 ||
-            KMMemberInfo.shared.userScenarioType == .pro_type5 {
+        if KMMemberInfo.shared.vip_levels != "1" &&
+            KMMemberInfo.shared.vip_paymentModel == "1" &&
+            (KMMemberInfo.shared.vip_status == 1 || KMMemberInfo.shared.vip_status == 3) {
+            // 订阅中、试用中,显示到期日期
             if KMMemberInfo.shared.vip_endDate.count > 0 {
                 spliLineImageView.isHidden = false
                 endDateLabel.isHidden = false
             }
-        } else if KMMemberInfo.shared.userScenarioType == .lite_type9 ||
-                    KMMemberInfo.shared.userScenarioType == .pro_type1 ||
-                    KMMemberInfo.shared.userScenarioType == .pro_type3 {
-            if KMMemberInfo.shared.vip_endDate.count > 0 &&
-                KMMemberInfo.shared.vip_status == 2 {
+        } else if KMMemberInfo.shared.vip_status == 2 {
+            // 订阅到期,显示到期日期
+            if KMMemberInfo.shared.vip_endDate.count > 0 {
                 spliLineImageView.isHidden = false
                 endDateLabel.isHidden = false
             }