瀏覽代碼

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

dinglingui 2 周之前
父節點
當前提交
d77eb164c0
共有 1 個文件被更改,包括 24 次插入2 次删除
  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
     }
 
 }