浏览代码

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

wangshuai 1 周之前
父节点
当前提交
ac0621679b
共有 1 个文件被更改,包括 7 次插入15 次删除
  1. 7 15
      PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

+ 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
             }