Browse Source

【会员系统】用户中心平台排序

dinglingui 1 week ago
parent
commit
d77eb164c0
1 changed files with 24 additions and 2 deletions
  1. 24 2
      PDF Office/PDF Master/MemberCenter/ViewModel/KMUserInfoVCModel.swift

+ 24 - 2
PDF Office/PDF Master/MemberCenter/ViewModel/KMUserInfoVCModel.swift

@@ -142,7 +142,7 @@ class KMUserInfoVCModel: ObservableObject {
                 }
             }
         } else {
-            if KMMemberInfo.shared.vip_status == 1 {
+            if KMMemberInfo.shared.vip_paymentModel == "1" && (KMMemberInfo.shared.vip_status == 1 || KMMemberInfo.shared.ai_status == 1) {
                 // 订阅用户提示退订
                 NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
                 KMMemberPromptWC.shared.showWindow(nil)
@@ -275,7 +275,29 @@ class KMUserInfoVCModel: ObservableObject {
         let platformsArray = platforms
             .components(separatedBy: ",")
             .map { $0.trimmingCharacters(in: .whitespaces) }
-        return platformsArray
+        
+        
+        let containsMac = platforms.contains("mac")
+        let containsiOS = platforms.contains("ios")
+        let containsWin = platforms.contains("windows")
+        let containsAn = platforms.contains("android")
+        var newPlatforms:[String] = []
+        if(containsMac == true){
+            newPlatforms.append("mac")
+        }
+        
+        if(containsWin == true){
+            newPlatforms.append("windows")
+        }
+        
+        if(containsiOS == true){
+            newPlatforms.append("ios")
+        }
+        
+        if(containsAn == true){
+            newPlatforms.append("android")
+        }
+        return newPlatforms
     }
 
 }