Browse Source

【fix】账号单买ai工具的sku,个人中心未展示权益信息

tangchao 2 months ago
parent
commit
4eca3961a1

+ 4 - 2
PDF Office/PDF Master/Class/Account/Controller/AccountProfileController.swift

@@ -85,7 +85,8 @@ class AccountProfileController: NSViewController {
         
         let isVip = model?.isVip ?? 0
         self.tipLabel.isHidden = isVip == 1
-        if isVip == 1 {
+        let datas = (model?.rightsInterestsData ?? []) + (model?.expiredBenefits ?? [])
+        if datas.isEmpty == false {
             self.showRight()
         } else {
             self.showBenefit()
@@ -147,7 +148,8 @@ class AccountProfileController: NSViewController {
                 AccountManager.manager.saveRights(model: model)
                 
                 NotificationCenter.default.post(name: .loginStatusChanged, object: nil)
-                if isVip == 1 {
+                let datas = model.rightsInterestsData + model.expiredBenefits
+                if datas.isEmpty == false {
                     self.showRight()
                 } else {
                     self.showBenefit()