소스 검색

Merge branch 'develop_PDFReaderPro_V4.7.0' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderPro_V4.7.0

wangshuai 6 일 전
부모
커밋
a4f70493db

+ 1 - 1
PDF Office/PDF Master/AppDelegate.swift

@@ -765,7 +765,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
             KMLoginWindowsController.shared.showWindow(nil)
             return
         }
-#if VERSION_FREE
+#if !VERSION_DMG
         KMPrint("restoreSubscriptions ...")
         KMProductCompareWC.shared.orientation = false
         KMProductCompareWC.shared.showWindowRestore(sender)

+ 134 - 12
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -32,6 +32,9 @@ NSPopoverDelegate>
 @property (assign) IBOutlet NSImageView *signUpImg;
 @property (assign) IBOutlet NSTextField *signUpLabel;
 
+@property (weak) IBOutlet NSButton *officeButton;
+@property (assign) IBOutlet NSImageView *officeImg;
+
 @property (nonatomic, retain) NSTrackingArea *trackingArea;
 
 @property (nonatomic, retain) NSPopover *popover;
@@ -149,7 +152,9 @@ NSPopoverDelegate>
     
     CGFloat totalWidth = 8;
     self.button.hidden = NO;
+    self.officeButton.hidden = NO;
     self.bgImg.hidden = NO;
+    self.officeImg.hidden = NO;
     self.label.hidden = YES;
     self.secondTrialBtn.hidden = YES;
     self.labelContentView.hidden = YES;
@@ -172,7 +177,10 @@ NSPopoverDelegate>
     self.button.layer.backgroundColor = [NSColor clearColor].CGColor;
     self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade to Pro", nil)];
     [self.button setTitleColor:[NSColor whiteColor]];
-    
+    self.officeButton.layer.backgroundColor = [NSColor clearColor].CGColor;
+    self.officeButton.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"PDF To Office", nil)];
+    [self.officeButton setTitleColor:[NSColor whiteColor]];
+
     self.aiLabel.stringValue = NSLocalizedStringFromTable(@"Free Use 1-Year AI Tools", @"MemberCenterLocalizable", nil);
     [self.aiLabel sizeToFit];
     CGFloat aiWidth = self.aiLabel.frame.size.width;
@@ -200,6 +208,102 @@ NSPopoverDelegate>
     if (fabs(buttonWidth-btnRect.size.width)>50) {
         buttonWidth = btnRect.size.width + 10;
     }
+    
+    CGFloat officeWidth = CGRectGetMaxX(self.officeButton.frame);
+    NSRect officeRect = [self.officeButton.attributedTitle boundingRectWithSize:CGSizeMake(MAXFLOAT, CGRectGetHeight(self.officeButton.frame)) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading];
+    if (fabs(officeWidth-officeRect.size.width)>50) {
+        officeWidth = officeRect.size.width + 10;
+    }
+
+    
+#if VERSION_DMG
+    self.button.hidden = YES;
+    self.officeButton.hidden = YES;
+    self.bgImg.hidden = YES;
+    self.officeImg.hidden = YES;
+
+    if ([[KMMemberInfo shared].isHaveAIDiscount isEqualToString:@"1"]) {
+        self.aiContendView.hidden = NO;
+        totalWidth+=aiWidth;
+        totalWidth+=4;
+    }
+    KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
+    if (type == KMUserScenarioTypeDmg_type1 ||
+        type == KMUserScenarioTypeDmg_type2 ||
+        type == KMUserScenarioTypeDmg_type3 ||
+        type == KMUserScenarioTypeDmg_type5 ||
+        type == KMUserScenarioTypeDmg_type6 ||
+        type == KMUserScenarioTypeDmg_type7 ||
+        type == KMUserScenarioTypeDmg_type28 ||
+        type == KMUserScenarioTypeDmg_type29 ||
+        type == KMUserScenarioTypeDmg_type30 ||
+        type == KMUserScenarioTypeDmg_type43 ||
+        type == KMUserScenarioTypeDmg_type44 ||
+        type == KMUserScenarioTypeDmg_type45) {
+        self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade", nil)];
+    } else if (type == KMUserScenarioTypeDmg_type4 ||
+               type == KMUserScenarioTypeDmg_type19 ||
+               type == KMUserScenarioTypeDmg_type34) {
+        self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Free Trial", nil)];
+    } else if (type == KMUserScenarioTypeDmg_type11 ||
+               type == KMUserScenarioTypeDmg_type22 ||
+               type == KMUserScenarioTypeDmg_type37 ) {
+        self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedStringFromTable(@"Buy Now", @"MemberCenterLocalizable", nil)];
+    } else if (type == KMUserScenarioTypeDmg_type18 ||
+               type == KMUserScenarioTypeDmg_type33 ||
+               type == KMUserScenarioTypeDmg_type48) {
+        self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedStringFromTable(@"Renew now", @"MemberCenterLocalizable", nil)];
+    }
+    
+    if (type == KMUserScenarioTypeDmg_type2 ||
+        type == KMUserScenarioTypeDmg_type19 ||
+        type == KMUserScenarioTypeDmg_type22 ||
+        type == KMUserScenarioTypeDmg_type33 ||
+        type == KMUserScenarioTypeDmg_type30 ||
+        type == KMUserScenarioTypeDmg_type20 ||
+        type == KMUserScenarioTypeDmg_type31 ||
+        type == KMUserScenarioTypeDmg_type21 ||
+        type == KMUserScenarioTypeDmg_type32) {
+        [self.officeButton setTitleColor:[NSColor whiteColor]];
+        self.officeButton.hidden = YES;
+        self.officeImg.hidden = YES;
+        self.officeButton.frame = CGRectMake(totalWidth, kbottomGap, officeWidth, self.view.frame.size.height -2 *kbottomGap);
+        CGRect officeRect = self.officeButton.frame;
+        self.officeImg.frame = officeRect;
+        totalWidth+=CGRectGetWidth(self.officeButton.bounds);
+        totalWidth+=4;
+    }
+    if (type == KMUserScenarioTypeDmg_type1 ||
+        type == KMUserScenarioTypeDmg_type2 ||
+        type == KMUserScenarioTypeDmg_type3 ||
+        type == KMUserScenarioTypeDmg_type4 ||
+        type == KMUserScenarioTypeDmg_type5 ||
+        type == KMUserScenarioTypeDmg_type6 ||
+        type == KMUserScenarioTypeDmg_type7 ||
+        type == KMUserScenarioTypeDmg_type11 ||
+        type == KMUserScenarioTypeDmg_type18 ||
+        type == KMUserScenarioTypeDmg_type19 ||
+        type == KMUserScenarioTypeDmg_type22 ||
+        type == KMUserScenarioTypeDmg_type28 ||
+        type == KMUserScenarioTypeDmg_type29 ||
+        type == KMUserScenarioTypeDmg_type30 ||
+        type == KMUserScenarioTypeDmg_type33 ||
+        type == KMUserScenarioTypeDmg_type34 ||
+        type == KMUserScenarioTypeDmg_type37 ||
+        type == KMUserScenarioTypeDmg_type43 ||
+        type == KMUserScenarioTypeDmg_type44 ||
+        type == KMUserScenarioTypeDmg_type45 ||
+        type == KMUserScenarioTypeDmg_type48) {
+        [self.button setTitleColor:[NSColor whiteColor]];
+        self.bgImg.hidden = NO;
+        self.button.hidden = NO;
+        self.button.frame = CGRectMake(totalWidth, kbottomGap, buttonWidth, self.view.frame.size.height -2 *kbottomGap);
+        CGRect rect = self.button.frame;
+        self.bgImg.frame = rect;
+        totalWidth+=CGRectGetWidth(self.button.bounds);
+        totalWidth+=4;
+    }
+#else
     if ([[KMMemberInfo shared].isHaveAIDiscount isEqualToString:@"1"]) {
         if(IAPProductsManager.defaultManager.aiAllAccessPack12month_pro.isTrialPeriod == false) {
             self.aiContendView.hidden = NO;
@@ -244,6 +348,19 @@ NSPopoverDelegate>
         } else if (type == KMUserScenarioTypeLite_type11) {
             self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade", nil)];
         }
+#if !VERSION_FREE
+//        VerificationManager.default().needUpgradeLicense
+        if ([[VerificationManager defaultManager] needUpgradeLicense]) {
+            [self.officeButton setTitleColor:[NSColor whiteColor]];
+            self.officeButton.hidden = YES;
+            self.officeImg.hidden = YES;
+            self.officeButton.frame = CGRectMake(totalWidth, kbottomGap, officeWidth, self.view.frame.size.height -2 *kbottomGap);
+            CGRect officeRect = self.officeButton.frame;
+            self.officeImg.frame = officeRect;
+            totalWidth+=CGRectGetWidth(self.officeButton.bounds);
+            totalWidth+=4;
+        }
+#endif
         if (type == KMUserScenarioTypeLite_type1 ||
             type == KMUserScenarioTypeLite_type3 ||
             type == KMUserScenarioTypeLite_type7 ||
@@ -310,6 +427,7 @@ NSPopoverDelegate>
         self.button.hidden = YES;
         self.bgImg.hidden = YES;
     }
+#endif
     
     if ([KMMemberInfo shared].isLogin) {
         self.userButton.hidden = NO;
@@ -322,16 +440,7 @@ NSPopoverDelegate>
         totalWidth+=CGRectGetWidth(self.signUpView.bounds);
     }
     
-    if (self.view.superview) {
-        self.view.frame = CGRectMake(MAX(0, CGRectGetWidth(self.view.superview.frame)-totalWidth - 8), (CGRectGetHeight(self.view.superview.frame)-CGRectGetHeight(self.view.frame))/2., totalWidth, self.view.frame.size.height);
-    } else {
-//        if (self.button.hidden) {
-//            self.view.frame = CGRectMake(0,0, CGRectGetMaxX(self.aiLabel.frame) + 20 ,self.view.frame.size.height);
-//        } else {
-//            self.view.frame = CGRectMake(0,0, CGRectGetMaxX(self.button.frame) ,self.view.frame.size.height);
-//        }
-        self.view.frame = CGRectMake(MAX(0, CGRectGetWidth(self.view.superview.frame)-totalWidth - 8), (CGRectGetHeight(self.view.superview.frame)-CGRectGetHeight(self.view.frame))/2., totalWidth, self.view.frame.size.height);
-    }
+    self.view.frame = CGRectMake(MAX(0, CGRectGetWidth(self.view.superview.frame)-totalWidth - 8), (CGRectGetHeight(self.view.superview.frame)-CGRectGetHeight(self.view.frame))/2., totalWidth, self.view.frame.size.height);
 }
 
 #pragma mark - Button Actions
@@ -347,7 +456,20 @@ NSPopoverDelegate>
 }
 
 - (IBAction)buttonAction:(id)sender {
-    [[KMMemberInfo shared] advancedFunctionUsage];
+    KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
+    if (type == KMUserScenarioTypeDmg_type4 ||
+        type == KMUserScenarioTypeDmg_type19 ||
+        type == KMUserScenarioTypeDmg_type34) {
+        [[KMProductCompareWC shared] setOrientation:YES];
+        [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypeTrial];
+        [[KMProductCompareWC shared] showWindow:nil];
+    } else {
+        [[KMMemberInfo shared] advancedFunctionUsage];
+    }
+}
+
+- (IBAction)officeButtonAction:(id)sender {
+    
 }
 
 - (NSAttributedString *)numberConvertColor:(NSColor*)color String:(NSString *)string {

+ 20 - 2
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23504"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -15,6 +15,8 @@
                 <outlet property="button" destination="QJo-q8-m15" id="MyX-CN-b3n"/>
                 <outlet property="label" destination="CFu-6F-yoa" id="ewG-lF-Fh1"/>
                 <outlet property="labelContentView" destination="ke5-qF-WBV" id="PDK-eS-xef"/>
+                <outlet property="officeButton" destination="KqO-uv-nE3" id="ymr-oZ-IrV"/>
+                <outlet property="officeImg" destination="cq6-oo-5NI" id="G63-1n-dWC"/>
                 <outlet property="secondTrialBtn" destination="pIG-TY-YRO" id="CtU-7B-BUB"/>
                 <outlet property="signUpImg" destination="OWQ-bX-dHV" id="9pD-mT-8b9"/>
                 <outlet property="signUpLabel" destination="VXk-gj-6b7" id="nFh-q0-Sgi"/>
@@ -60,6 +62,11 @@
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="Upgarde_bg_icon" id="Ck3-aK-AHy"/>
                 </imageView>
+                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cq6-oo-5NI">
+                    <rect key="frame" x="222" y="1" width="87" height="18"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="Upgarde_bg_icon" id="N67-0e-YNn"/>
+                </imageView>
                 <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QJo-q8-m15">
                     <rect key="frame" x="77" y="0.0" width="87" height="18"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
@@ -71,6 +78,17 @@
                         <action selector="buttonAction:" target="-2" id="xOv-Gv-Xrg"/>
                     </connections>
                 </button>
+                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="KqO-uv-nE3">
+                    <rect key="frame" x="222" y="1" width="87" height="18"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <buttonCell key="cell" type="bevel" title="PDF To Office" bezelStyle="rounded" imagePosition="overlaps" alignment="center" lineBreakMode="charWrapping" imageScaling="axesIndependently" inset="2" id="lYk-hT-sQ7">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="smallSystem"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="officeButtonAction:" target="-2" id="VpF-f6-nUy"/>
+                    </connections>
+                </button>
                 <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PMO-fk-jRE">
                     <rect key="frame" x="210" y="0.0" width="163" height="20"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>

+ 31 - 1
PDF Office/PDF Master/Class/Purchase/IAPProductsManager.m

@@ -311,8 +311,13 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
 @property (nonatomic, retain) IAPProduct *liteAIProduct;
 @property (nonatomic, retain) IAPProduct *proAIProduct;
 
-@property (nonatomic,retain) IAPProduct *DMGAllAccessProduct;
+@property (nonatomic,retain) IAPProduct *DMGAllAccessProduct; // 全平台标准版年订阅
 @property (nonatomic,retain) IAPProduct *DMGPDFToOfficeProduct;
+@property (nonatomic,retain) IAPProduct *DMGPDFReaderProAdcanced; // 全平台高级版年订阅
+@property (nonatomic,retain) IAPProduct *DMGPDFReaderProPermanent; // Mac&Windows双平台高级版永久
+@property (nonatomic,retain) IAPProduct *DMGPDFReaderProAI_Annual; // AI 年订阅
+@property (nonatomic,retain) IAPProduct *DMGPDFReaderProAI_Monthly; // AI 月订阅
+@property (nonatomic,retain) IAPProduct *DMGAdd2Device; // 多设备 年订阅
 
 @property (nonatomic,retain) NSArray *productIdentifiers;
 
@@ -347,6 +352,27 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
         self.DMGPDFToOfficeProduct.priceNumber = @(19.99);
         self.DMGPDFToOfficeProduct.offersPriceNumber = @(9.99);
         self.DMGPDFToOfficeProduct.isOffers = isOffers;
+        
+        
+        self.DMGPDFReaderProAdcanced = [[[IAPProduct alloc] init] autorelease];
+        self.DMGPDFReaderProAdcanced.priceNumber = @(99.99);
+        self.DMGPDFReaderProAdcanced.offersPriceNumber = @(79.99);
+        self.DMGPDFReaderProAdcanced.isOffers = isOffers;
+
+        self.DMGPDFReaderProPermanent = [[[IAPProduct alloc] init] autorelease];
+        self.DMGPDFReaderProPermanent.priceNumber = @(119.99);
+        self.DMGPDFReaderProPermanent.offersPriceNumber = @(99.99);
+        self.DMGPDFReaderProPermanent.isOffers = isOffers;
+
+        self.DMGPDFReaderProAI_Annual = [[[IAPProduct alloc] init] autorelease];
+        self.DMGPDFReaderProAI_Annual.priceNumber = @(125.99);
+        self.DMGPDFReaderProAI_Annual.offersPriceNumber = @(125.99);
+        self.DMGPDFReaderProAI_Annual.isOffers = isOffers;
+
+        self.DMGPDFReaderProAI_Monthly = [[[IAPProduct alloc] init] autorelease];
+        self.DMGPDFReaderProAI_Monthly.priceNumber = @(14.99);
+        self.DMGPDFReaderProAI_Monthly.offersPriceNumber = @(14.99);
+        self.DMGPDFReaderProAI_Monthly.isOffers = isOffers;
 #else
         
 #if VERSION_FREE
@@ -563,6 +589,10 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
     
     [_DMGAllAccessProduct release];
     [_DMGPDFToOfficeProduct release];
+    [_DMGPDFReaderProAdcanced release];
+    [_DMGPDFReaderProPermanent release];
+    [_DMGPDFReaderProAI_Annual release];
+    [_DMGPDFReaderProAI_Monthly release];
     
     [_productIdentifiers release];
     [super dealloc];

+ 408 - 8
PDF Office/PDF Master/MemberCenter/Model/KMMemberInfo.swift

@@ -27,6 +27,152 @@ import Cocoa
     case pro_type3      // 付费版 无旧PDF To Office未订阅 (右上角导航栏按钮 - “登录领福利” + 升级(全平台/高级版永久))
     case pro_type4      // 付费版 无旧PDF To Office 高级版永久 (右上角导航栏按钮 - Info + 升级(全平台))
     case pro_type5      // 付费版 无旧PDF To Office 订阅且未过期 (右上角导航栏按钮 - Info)
+
+    /**  DMG   |   未登录   |   未绑定License
+        【账户权益:免费; 卡片:空; 状态栏:登入、升级至Pro; 比较表:无; 高级功能:无】*/
+    case dmg_type1
+    /**  DMG   |   未登录   |   有标准版License、无转档License
+        【账户权益:免费; 卡片:空; 状态栏:登入、升级至Pro、PDF To Office; 比较表:无;    高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type2
+    /**  DMG   |   未登录   |   有标准版License、有转档License
+        【账户权益:免费; 卡片:空; 状态栏:登入、升级至Pro; 比较表:无;    高级功能:可使用高级功能(含转档)】*/
+    case dmg_type3
+    /**  DMG   |   登录   |   未绑定License   |   免费未试用
+        【账户权益:免费; 卡片:免费试用、立即购买; 状态栏:头像、立即试用; 比较表:试用、购买;    高级功能:无】*/
+    case dmg_type4
+    /**  DMG   |   登录   |   未绑定License   |   双平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级比较表(39.99); 高级功能:可使用高级功能(含转档)】     */
+    case dmg_type5
+    /**  DMG   |   登录   |   未绑定License   |   Mac单平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级比较表(49.99); 高级功能:可使用高级功能(含转档)】    */
+    case dmg_type6
+    /**  DMG   |   登录   |   未绑定License   |   iOS单平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级比较表(49.99); 高级功能:可使用高级功能(含转档)】    */
+    case dmg_type7
+    /**  DMG   |   登录   |   未绑定License   |   全平台标准版12个月订阅
+        【账户权益:标准; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能,无法使用转档】    */
+    case dmg_type8
+    /**  DMG   |   登录   |   未绑定License   |   全平台标准版12个月订阅取消续订
+        【账户权益:标准; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type9
+    /**  DMG   |   登录   |   未绑定License   |   全平台高级版12个月订阅试用中
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type10
+    /**  DMG   |   登录   |   未绑定License   |   全平台高级版12个月试用过期
+        【账户权益:免费; 卡片:购买; 状态栏:头像、购买; 比较表:购买比较表; 高级功能:无】*/
+    case dmg_type11
+    /**  DMG   |   登录   |   未绑定License   |   全平台高级版12个月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type12
+    /**  DMG   |   登录   |   未绑定License   |   全平台高级版12个月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type13
+    /**  DMG   |   登录   |   未绑定License   |   全平台高级版6个月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type14
+    /**  DMG   |   登录   |   未绑定License   |   全平台高级版6个月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type15
+    /**  DMG   |   登录   |   未绑定License   |   Android单平台高级版月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:无】*/
+    case dmg_type16
+    /**  DMG    |   登录   |   未绑定License   |   Android单平台高级版月订阅取消续订
+        【账户权益:高级; 卡片:; 状态栏:头像; 比较表:无; 高级功能:无】*/
+    case dmg_type17
+    /**  DMG   |   登录   |   未绑定License   |   订阅到期
+        【账户权益:免费; 卡片:续费; 状态栏:头像、续费; 比较表:购买比较表; 高级功能:无】*/
+    case dmg_type18
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   免费未试用
+        【账户权益:免费; 卡片:免费试用、购买按钮; 状态栏:头像、免费试用、PDF To Office; 比较表:试用、购买; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type19
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台标准版12个月订阅
+        【账户权益:标准; 卡片:无; 状态栏:头像、PDF To Office; 比较表:无; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type20
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台标准版12个月订阅取消续订
+        【账户权益:标准; 卡片:无; 状态栏:头像、PDF To Office; 比较表:无; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type21
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台高级版12个月试用过期
+        【账户权益:免费; 卡片:购买按钮; 状态栏:头像、购买、PDF To Office; 比较表:购买; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type22
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台高级版12个月订阅试用中
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type23
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台高级版12个月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type24
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台高级版12个月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type25
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台高级版6个月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type26
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   全平台高级版6个月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type27
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   双平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级(39.99); 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type28
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   Mac单平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级(49.99); 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type29
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   iOS单平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级、PDF To Office; 比较表:升级(49.99); 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type30
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   Android单平台高级版月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像、PDF To Office; 比较表:无; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type31
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   Android单平台高级版月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像、PDF To Office; 比较表:无; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type32
+    /**  DMG   |   登录   |   有标准版License、无转档License   |   订阅到期
+        【账户权益:免费; 卡片:续费; 状态栏:头像、续费、PDF To Office; 比较表:购买; 高级功能:可使用高级功能,无法使用转档】*/
+    case dmg_type33
+    
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   免费未试用
+        【账户权益:免费; 卡片:免费试用、购买按钮; 状态栏:头像、免费试用; 比较表:试用、购买; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type34
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台标准版12个月订阅
+        【账户权益:标准; 卡片:无; 状态栏:头像; 比较表:无; 高级功能: 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type35
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台标准版12个月订阅取消续订
+        【账户权益:标准; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type36
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台高级版12个月试用过期
+        【账户权益:免费; 卡片:购买按钮; 状态栏:头像、购买; 比较表:购买; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type37
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台高级版12个月订阅试用中
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type38
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台高级版12个月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type39
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台高级版12个月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type40
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台高级版6个月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type41
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   全平台高级版6个月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type42
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   双平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级(39.99); 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type43
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   Mac单平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级(49.99); 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type44
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   iOS单平台高级永久
+        【账户权益:高级; 卡片:升级; 状态栏:头像、升级; 比较表:升级(49.99); 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type45
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   Android单平台高级版月订阅
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type46
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   Android单平台高级版月订阅取消续订
+        【账户权益:高级; 卡片:无; 状态栏:头像; 比较表:无; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type47
+    /**  DMG   |   登录   |   有标准版License、有转档License   |   订阅到期
+        【账户权益:免费; 卡片:续费; 状态栏:头像、续费; 比较表:购买; 高级功能:可使用高级功能(含转档)】*/
+    case dmg_type48
 }
 
 // 当前权益类型
@@ -87,7 +233,7 @@ import Cocoa
     var ai_endDate: String = "" // 到期时间
     var ai_payType: Int = 0 // 0未开启自动续订 1自动续订
     var ai_productName: String = "" // 产品名字
-    var ai_levels: String = "" // 会员等级 1是免费 2是标准 3是高级
+    var ai_levels: String = "1" // 会员等级 1是免费 2是标准 3是高级
     var ai_platforms: String = "" // 支持的平台
     var ai_point: Int = 0 // 剩余ai点数(svip才有)
     var ai_maxDeviceNum: Int = 0 // 最大登录设备限制数
@@ -255,9 +401,222 @@ import Cocoa
 #if VERSION_DMG
     // DMG
             if KMMemberInfo.shared.isLogin {
-                
+                if IAPProductsManager.default().isAvailableAllFunction() {
+                    if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() { // 有标准版License、有转档License  34 - 48
+                        if KMMemberInfo.shared.canTrail && KMMemberInfo.shared.vip_levels == "1" { // 免费
+                            return .dmg_type34
+                        }
+                        if KMMemberInfo.shared.vip_paymentModel == "2" && KMMemberInfo.shared.vip_levels == "3" { // 高级买断
+                            if platformsArray.count == 2 {
+                                return .dmg_type43
+                            } else if platformsArray.count == 1 {
+                                if(platformsArray.contains("mac")) {
+                                    return .dmg_type44
+                                }
+                                if(platformsArray.contains("ios")) {
+                                    return .dmg_type45
+                                }
+                            }
+                        }
+                        if KMMemberInfo.shared.vip_status == 1 { // 订阅中
+                            if platformsArray.count == 4 { // 全平台
+                                if KMMemberInfo.shared.vip_cycle == 4 { // 周期:年
+                                    // 全平台标准版年订阅
+                                    if KMMemberInfo.shared.vip_levels == "2" { // 标准
+                                        if KMMemberInfo.shared.vip_payType == 1 { // 是否续订
+                                            return .dmg_type35
+                                        } else {
+                                            return .dmg_type36
+                                        }
+                                    }
+                                    // 全平台高级版年订阅
+                                    if KMMemberInfo.shared.vip_levels == "3" { // 高级
+                                        if KMMemberInfo.shared.vip_payType == 1 { // 是否续订
+                                            return .dmg_type39
+                                        } else {
+                                            return .dmg_type40
+                                        }
+                                    }
+                                } else if KMMemberInfo.shared.vip_cycle == 3 { // 周期:6个月
+                                    // 全平台高级版6个月订阅
+                                    if KMMemberInfo.shared.vip_levels == "3" {
+                                        if KMMemberInfo.shared.vip_payType == 1 {
+                                            return .dmg_type41
+                                        } else {
+                                            return .dmg_type42
+                                        }
+                                    }
+                                }
+                            } else if platformsArray.count == 1 && platformsArray.contains("android") {
+                                if KMMemberInfo.shared.vip_cycle == 1 && KMMemberInfo.shared.vip_levels == "3" {
+                                    if KMMemberInfo.shared.vip_payType == 1 {
+                                        return .dmg_type46
+                                    } else {
+                                        return .dmg_type47
+                                    }
+                                }
+                            }
+                                        
+                        } else if KMMemberInfo.shared.vip_status == 2 { // 订阅过期
+                            return .dmg_type48
+                        } else if KMMemberInfo.shared.vip_status == 3 { // 试用中
+                            // 全平台高级版年订阅
+                            if KMMemberInfo.shared.vip_levels == "3" {
+                                return .dmg_type38
+                            }
+                        } else if KMMemberInfo.shared.vip_status == 4 { // 试用过期
+                            // 全平台高级版年订阅
+                            if KMMemberInfo.shared.vip_levels == "3" {
+                                return .dmg_type37
+                            }
+                        }
+                    } else { // 有标准版License、无转档License 19 - 33
+                        if KMMemberInfo.shared.canTrail && KMMemberInfo.shared.vip_levels == "1" { // 免费
+                            return .dmg_type19
+                        }
+                        if KMMemberInfo.shared.vip_paymentModel == "2" && KMMemberInfo.shared.vip_levels == "3" { // 高级买断
+                            if platformsArray.count == 2 {
+                                return .dmg_type28
+                            } else if platformsArray.count == 1 {
+                                if(platformsArray.contains("mac")) {
+                                    return .dmg_type29
+                                }
+                                if(platformsArray.contains("ios")) {
+                                    return .dmg_type30
+                                }
+                            }
+                        }
+                        if KMMemberInfo.shared.vip_status == 1 { // 订阅中
+                            if platformsArray.count == 4 { // 全平台
+                                if KMMemberInfo.shared.vip_cycle == 4 { // 周期:年
+                                    // 全平台标准版年订阅
+                                    if KMMemberInfo.shared.vip_levels == "2" { // 标准
+                                        if KMMemberInfo.shared.vip_payType == 1 { // 是否续订
+                                            return .dmg_type20
+                                        } else {
+                                            return .dmg_type21
+                                        }
+                                    }
+                                    // 全平台高级版年订阅
+                                    if KMMemberInfo.shared.vip_levels == "3" { // 高级
+                                        if KMMemberInfo.shared.vip_payType == 1 { // 是否续订
+                                            return .dmg_type24
+                                        } else {
+                                            return .dmg_type25
+                                        }
+                                    }
+                                } else if KMMemberInfo.shared.vip_cycle == 3 { // 周期:6个月
+                                    // 全平台高级版6个月订阅
+                                    if KMMemberInfo.shared.vip_levels == "3" {
+                                        if KMMemberInfo.shared.vip_payType == 1 {
+                                            return .dmg_type26
+                                        } else {
+                                            return .dmg_type27
+                                        }
+                                    }
+                                }
+                            } else if platformsArray.count == 1 && platformsArray.contains("android") {
+                                if KMMemberInfo.shared.vip_cycle == 1 && KMMemberInfo.shared.vip_levels == "3" {
+                                    if KMMemberInfo.shared.vip_payType == 1 {
+                                        return .dmg_type31
+                                    } else {
+                                        return .dmg_type32
+                                    }
+                                }
+                            }
+                                        
+                        } else if KMMemberInfo.shared.vip_status == 2 { // 订阅过期
+                            return .dmg_type33
+                        } else if KMMemberInfo.shared.vip_status == 3 { // 试用中
+                            // 全平台高级版年订阅
+                            if KMMemberInfo.shared.vip_levels == "3" {
+                                return .dmg_type23
+                            }
+                        } else if KMMemberInfo.shared.vip_status == 4 { // 试用过期
+                            // 全平台高级版年订阅
+                            if KMMemberInfo.shared.vip_levels == "3" {
+                                return .dmg_type22
+                            }
+                        }
+                    }
+                } else { // 未绑定License 4 - 18
+                    if KMMemberInfo.shared.canTrail && KMMemberInfo.shared.vip_levels == "1" { // 免费
+                        return .dmg_type4
+                    }
+                    if KMMemberInfo.shared.vip_paymentModel == "2" && KMMemberInfo.shared.vip_levels == "3" { // 高级买断
+                        if platformsArray.count == 2 {
+                            return .dmg_type5
+                        } else if platformsArray.count == 1 {
+                            if(platformsArray.contains("mac")) {
+                                return .dmg_type6
+                            }
+                            if(platformsArray.contains("ios")) {
+                                return .dmg_type7
+                            }
+                        }
+                    }
+                    if KMMemberInfo.shared.vip_status == 1 { // 订阅中
+                        if platformsArray.count == 4 { // 全平台
+                            if KMMemberInfo.shared.vip_cycle == 4 { // 周期:年
+                                // 全平台标准版年订阅
+                                if KMMemberInfo.shared.vip_levels == "2" { // 标准
+                                    if KMMemberInfo.shared.vip_payType == 1 { // 是否续订
+                                        return .dmg_type8
+                                    } else {
+                                        return .dmg_type9
+                                    }
+                                }
+                                // 全平台高级版年订阅
+                                if KMMemberInfo.shared.vip_levels == "3" { // 高级
+                                    if KMMemberInfo.shared.vip_payType == 1 { // 是否续订
+                                        return .dmg_type12
+                                    } else {
+                                        return .dmg_type13
+                                    }
+                                }
+                            } else if KMMemberInfo.shared.vip_cycle == 3 { // 周期:6个月
+                                // 全平台高级版6个月订阅
+                                if KMMemberInfo.shared.vip_levels == "3" {
+                                    if KMMemberInfo.shared.vip_payType == 1 {
+                                        return .dmg_type14
+                                    } else {
+                                        return .dmg_type15
+                                    }
+                                }
+                            }
+                        } else if platformsArray.count == 1 && platformsArray.contains("android") {
+                            if KMMemberInfo.shared.vip_cycle == 1 && KMMemberInfo.shared.vip_levels == "3" {
+                                if KMMemberInfo.shared.vip_payType == 1 {
+                                    return .dmg_type16
+                                } else {
+                                    return .dmg_type17
+                                }
+                            }
+                        }
+                                    
+                    } else if KMMemberInfo.shared.vip_status == 2 { // 订阅过期
+                        return .dmg_type18
+                    } else if KMMemberInfo.shared.vip_status == 3 { // 试用中
+                        // 全平台高级版年订阅
+                        if KMMemberInfo.shared.vip_levels == "3" {
+                            return .dmg_type10  
+                        }
+                    } else if KMMemberInfo.shared.vip_status == 4 { // 试用过期
+                        // 全平台高级版年订阅
+                        if KMMemberInfo.shared.vip_levels == "3" {
+                            return .dmg_type11
+                        }
+                    }
+                }
             } else {
-                
+                if IAPProductsManager.default().isAvailableAllFunction() {
+                    if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
+                        return .dmg_type3
+                    }
+                    return .dmg_type2
+                } else {
+                    return .dmg_type1
+                }
             }
 #else
     // AppStore 免费版本
@@ -343,6 +702,8 @@ import Cocoa
     // DMG
             if KMMemberInfo.shared.isLogin {
                 
+            } else {
+                
             }
 #else
     // AppStore 免费版本
@@ -460,20 +821,36 @@ import Cocoa
     
     // 是否允许使用AI
     var isPermitAI: Bool {
+#if VERSION_FREE
+#if VERSION_DMG
+    // DMG
+  
+#else
+    // AppStore 免费版本
         if KMMemberInfo.shared.isLogin {
             if KMMemberInfo.shared.aiPoint > 0 {
                 return true
             }
             if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
+                return false
+            } else {
+                return false
+            }
+        }
+        return false
+#endif
+#else
+    // AppStore 付费版
+        if KMMemberInfo.shared.isLogin {
+            if IAPProductsManager.default().aiAllAccessPack1month_pro.isSubscribed {
                 return true
             }
             return false
         } else {
-            if AIInfoManager.default().aiInfoValid {
-                return true
-            }
             return false
         }
+#endif
+        return false
     }
     
     //允许继续购买AI
@@ -535,7 +912,30 @@ import Cocoa
 #if VERSION_FREE
 #if VERSION_DMG
     // DMG
-        
+        KMProductCompareWC.shared.orientation = true
+        if userScenarioType == .dmg_type4 ||
+                    userScenarioType == .dmg_type11 ||
+                    userScenarioType == .dmg_type18 ||
+                    userScenarioType == .dmg_type19 ||
+                    userScenarioType == .dmg_type22 ||
+                    userScenarioType == .dmg_type33 ||
+                    userScenarioType == .dmg_type34 ||
+                    userScenarioType == .dmg_type37 ||
+                    userScenarioType == .dmg_type48 {
+            KMProductCompareWC.shared.orientationType = .dmg_Base
+        } else if userScenarioType == .dmg_type5 ||
+                    userScenarioType == .dmg_type28 ||
+                    userScenarioType == .dmg_type43 {
+            KMProductCompareWC.shared.orientationType = .dmg_Upgrades1
+        } else if userScenarioType == .dmg_type6 ||
+                    userScenarioType == .dmg_type7 ||
+                    userScenarioType == .dmg_type29 ||
+                    userScenarioType == .dmg_type30 ||
+                    userScenarioType == .dmg_type44 ||
+                    userScenarioType == .dmg_type45 {
+            KMProductCompareWC.shared.orientationType = .dmg_Upgrades2
+        }
+        KMProductCompareWC.shared.showWindow(nil)
 #else
     // AppStore 免费版本
         KMProductCompareWC.shared.orientation = true
@@ -719,7 +1119,7 @@ import Cocoa
         ai_endDate = ""
         ai_payType = 0
         ai_productName = ""
-        ai_levels = ""
+        ai_levels = "1"
         ai_platforms = ""
         ai_point = 0
         ai_maxDeviceNum = 0

+ 438 - 4
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

@@ -113,9 +113,21 @@ class KMUserInfoViewController: NSViewController {
         self.view.wantsLayer = true
         self.view.layer?.backgroundColor = .white
         
-        bindViewModel()
+#if VERSION_FREE
+#if VERSION_DMG
+    // DMG
+        languageLocalized_DMG()
+        initializeUI_DMG()
+#else
+    // AppStore 免费版本
         languageLocalized()
         initializeUI()
+#endif
+#else
+    // AppStore 付费版
+        languageLocalized()
+        initializeUI()
+#endif
         
         NotificationCenter.default.addObserver(self, selector: #selector(changeEffectiveAppearance), name: NSNotification.Name(rawValue: "kEffectiveAppearance"), object: nil)
     }
@@ -127,7 +139,18 @@ class KMUserInfoViewController: NSViewController {
         } else {
             self.view.appearance = NSAppearance(named: .aqua)
         }
+#if VERSION_FREE
+#if VERSION_DMG
+    // DMG
+        initializeUI_DMG()
+#else
+    // AppStore 免费版本
         initializeUI()
+#endif
+#else
+    // AppStore 付费版
+        initializeUI()
+#endif
     }
     
     // MARK: Private Method
@@ -758,12 +781,423 @@ class KMUserInfoViewController: NSViewController {
         }
     }
     
-    // MARK: Bind Method
+    // MARK: Action Method
     
-    func bindViewModel() -> Void {
+    private func languageLocalized_DMG() -> Void {
+        emailLabel.stringValue = KMMemberInfo.shared.userEmail
+        productLabel.stringValue = NSLocalizedString("Personal Account", tableName: "MemberCenterLocalizable", comment: "")
+        endDateLabel.stringValue = String(format: "%@ %@", KMMemberInfo.shared.vip_endDate,NSLocalizedString("expires", tableName: "MemberCenterLocalizable", comment: ""))
+        membershipLabel.stringValue = NSLocalizedString("Membership Benefits", tableName: "MemberCenterLocalizable", comment: "")
+        buyNow1Label.stringValue = NSLocalizedString("Upgrade Now", tableName: "MemberCenterLocalizable", comment: "")
+        accountLabel.stringValue = NSLocalizedString("Account Center", tableName: "MemberCenterLocalizable", comment: "")
+        signOutLabel.stringValue = NSLocalizedString("Sign out", tableName: "MemberCenterLocalizable", comment: "")
+        if KMMemberInfo.shared.validFlag == "5" {
+            closeAccountLabel.stringValue = NSLocalizedString("Undo Remove Account", tableName: "MemberCenterLocalizable", comment: "")
+        } else {
+            closeAccountLabel.stringValue = NSLocalizedString("Remove Account", tableName: "MemberCenterLocalizable", comment: "")
+        }
+        if KMMemberInfo.shared.vip_maxDeviceNum == 1 {
+            number4Label.stringValue = NSLocalizedString("device", tableName: "MemberCenterLocalizable", comment: "")
+        } else {
+            number4Label.stringValue = NSLocalizedString("devices", tableName: "MemberCenterLocalizable", comment: "")
+        }
+        number4_1Label.stringValue = String(KMMemberInfo.shared.vip_maxDeviceNum)
         
+        number5Label.stringValue = NSLocalizedString("Devices Access", tableName: "MemberCenterLocalizable", comment: "")
+        let platforms = viewModel.getPlatformsImages()
+        if platforms.count == 4 {
+            number3Label.stringValue = NSLocalizedString("All-platform Available", tableName: "MemberCenterLocalizable", comment: "")
+        } else {
+            number3Label.stringValue = NSLocalizedString("Platform", tableName: "MemberCenterLocalizable", comment: "")
+        }
+        if KMMemberInfo.shared.userScenarioType == .dmg_type5 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type6 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type7 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type28 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type29 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type30 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type43 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type44 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type45 { // 买断
+            lockedLabel.stringValue = NSLocalizedString("Permanent", tableName: "MemberCenterLocalizable", comment: "")
+            number2Label.stringValue = NSLocalizedString("Advanced Version", tableName: "MemberCenterLocalizable", comment: "")
+            buyNow1Label.stringValue = NSLocalizedString("Upgrade Now", tableName: "MemberCenterLocalizable", comment: "")
+        } else if KMMemberInfo.shared.userScenarioType == .dmg_type8 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type9 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type10 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type12 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type13 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type14 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type15 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type16 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type17 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type20 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type21 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type23 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type24 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type25 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type26 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type27 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type31 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type32 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type35 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type36 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type38 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type39 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type40 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type41 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type42 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type46 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type47 { // 订阅
+            lockedLabel.stringValue = NSLocalizedString("Subscription", tableName: "MemberCenterLocalizable", comment: "")
+            if KMMemberInfo.shared.userScenarioType == .dmg_type8 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type9 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type20 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type21 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type35 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type36 {
+                number2Label.stringValue = NSLocalizedString("Standard Version", tableName: "MemberCenterLocalizable", comment: "")
+            } else {
+                number2Label.stringValue = NSLocalizedString("Advanced Version", tableName: "MemberCenterLocalizable", comment: "")
+            }
+
+        } else { // 免费 & 到期
+            if KMMemberInfo.shared.userScenarioType == .dmg_type4 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type11 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type18 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type19 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type22 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type33 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type34 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type37 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type48 {
+                lockedLabel.stringValue = NSLocalizedString("Locked", tableName: "MemberCenterLocalizable", comment: "")
+                number1Label.stringValue = NSLocalizedString("150+", tableName: "MemberCenterLocalizable", comment: "")
+                number2Label.stringValue = NSLocalizedString("Benefits of Functions", tableName: "MemberCenterLocalizable", comment: "")
+                if KMMemberInfo.shared.userScenarioType == .dmg_type11 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type18 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type22 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type33 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type37 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type48 { // 到期
+                    buyNow1Label.stringValue = NSLocalizedString("Buy Now", tableName: "MemberCenterLocalizable", comment: "")
+                } else { // 免费
+                    
+                }
+                if KMMemberInfo.shared.userScenarioType == .dmg_type4 ||
+                   KMMemberInfo.shared.userScenarioType == .dmg_type19 ||
+                   KMMemberInfo.shared.userScenarioType == .dmg_type34 {
+                    buyNow1Label.stringValue = NSLocalizedString("Buy Now", tableName: "MemberCenterLocalizable", comment: "")
+                    buyNow2Label.stringValue = NSLocalizedString("7-Day Free Trial", tableName: "MemberCenterLocalizable", comment: "")
+                } else if KMMemberInfo.shared.userScenarioType == .dmg_type11 ||
+                          KMMemberInfo.shared.userScenarioType == .dmg_type22 ||
+                            KMMemberInfo.shared.userScenarioType == .dmg_type37 {
+                    buyNow1Label.stringValue = NSLocalizedString("Buy Now", tableName: "MemberCenterLocalizable", comment: "")
+                } else if  KMMemberInfo.shared.userScenarioType == .dmg_type18 ||
+                            KMMemberInfo.shared.userScenarioType == .dmg_type33 ||
+                            KMMemberInfo.shared.userScenarioType == .dmg_type48 {
+                    buyNow1Label.stringValue = NSLocalizedString("Renew now", tableName: "MemberCenterLocalizable", comment: "")
+                }
+            }
+        }
     }
     
-    // MARK: Action Method
+    private func initializeUI_DMG() -> Void {
+        self.view.wantsLayer = true
+        let isDarkModel = KMAdvertisementConfig.isDarkModel()
+        if  isDarkModel {
+            self.view.layer?.backgroundColor = NSColor(hex: "0E1114").cgColor;
+        } else {
+            self.view.layer?.backgroundColor = NSColor(hex: "FFFFFF").cgColor;
+        }
+        
+        rightsBox.contentView = rightsView
+        buyBox.contentView = buyView1
+        userImageView.image = NSImage(named: "UserProfilePicture_Size")
+        emailLabel.textColor = NSColor(named: "0E1114")
+        emailLabel.font = NSFont.SFMediumFontWithSize(14)
+        productLabel.textColor = NSColor(named: "42464D_1")
+        productLabel.font = NSFont.SFProTextRegularFont(12)
+        endDateLabel.textColor = NSColor(named: "42464D_1")
+        endDateLabel.font = NSFont.SFProTextRegularFont(12)
+        spliLineImageView.isHidden = true
+        endDateLabel.isHidden = true
+        number1Label.font = NSFont.SFMediumFontWithSize(24)
+        number1Label.textColor = NSColor(hex: "0E1114")
+        number2Label.font = NSFont.SFProTextRegularFont(12)
+        number3Label.font = NSFont.SFProTextRegularFont(12)
+        number5Label.font = NSFont.SFProTextRegularFont(12)
+        membershipLabel.font = NSFont.SFMediumFontWithSize(16)
+        lockedLabel.font = NSFont.SFMediumFontWithSize(12)
+        lockedLabel.textColor = NSColor(hex: "42464D")
+        accountCenterBox.borderColor = NSColor(named: "3091FF") ?? .blue
+        accountCenterBox.fillColor = .clear
+        accountLabel.textColor = NSColor(named: "3091FF")
+        accountLabel.font = NSFont.SFProTextRegularFont(14)
+        accountImageView.image = NSImage(named: "AccountCenterImage")
+        signOutLabel.textColor = NSColor(named: "3091FF")
+        signOutLabel.font = NSFont.SFProTextRegularFont(14)
+        signOutImageView.image = NSImage(named: "SignOutImage")
+        closeAccountLabel.textColor = NSColor(named: "3091FF")
+        closeAccountLabel.font = NSFont.SFProTextRegularFont(14)
+        closeAccountImageView.image = NSImage(named: "CloseAccountImage")
+        buyNow1Label.font = NSFont.SFProTextRegularFont(14)
+        buyNow2Label.font = NSFont.SFProTextRegularFont(14)
+
+        let platforms = viewModel.getPlatformsImages()
+        if platforms.count == 4 {
+            iconBox.contentView = iconView1
+            icon1ImageView.image = platforms[0]
+            icon2ImageView.image = platforms[1]
+            icon3ImageView.image = platforms[2]
+            icon4ImageView.image = platforms[3]
+        } else if platforms.count == 3 {
+            iconBox.contentView = iconView2
+            icon5ImageView.image = platforms[0]
+            icon6ImageView.image = platforms[1]
+            icon7ImageView.image = platforms[2]
+        } else if platforms.count == 2 {
+            iconBox.contentView = iconView3
+            icon8ImageView.image = platforms[0]
+            icon9ImageView.image = platforms[1]
+        } else if platforms.count == 1 {
+            iconBox.contentView = iconView4
+            icon10ImageView.image = platforms[0]
+        }
+        buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2")
+        buyNow2ImageView.image = NSImage(named: "ButtonBackgroundImage2")
 
+        if KMMemberInfo.shared.userScenarioType == .dmg_type5 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type6 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type7 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type28 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type29 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type30 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type43 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type44 ||
+            KMMemberInfo.shared.userScenarioType == .dmg_type45 { // 买断
+            centerBackgroud.image = NSImage(named: "ButtonBackgroundImage4")
+            lockedImageView.image = NSImage(named: "UpgradeImage2")
+            number1ImageView.isHidden = false
+            number1ImageView.image = NSImage(named: "UpgradeImage")
+            number1Label.isHidden = true
+            number2Label.textColor = NSColor(hex: "FFFFFF")
+            number3Label.textColor = NSColor(hex: "FFFFFF")
+            number4Label.textColor = NSColor(hex: "FFFFFF")
+            number4_1Label.textColor = NSColor(hex: "FFFFFF")
+            number5Label.textColor = NSColor(hex: "FFFFFF")
+            membershipLabel.textColor = NSColor(hex: "FFFFFF")
+            rightsBox.fillColor = NSColor(named: "FFFFFF_0.2") ?? .white
+            buyNow1Box.fillColor = NSColor(hex: "FFFFFF")
+            buyNow1ImageView.isHidden = true
+            buyNow2Box.isHidden = true
+            buyNow1BoxLeftConst.constant = (CGRectGetWidth(view.bounds) - CGRectGetWidth(buyNow1Box.frame))/2
+            arrow1ImageView.image = NSImage(named: "BuyNewArrowImage2")
+            buyNow1Label.textColor = NSColor(hex: "42464D")
+        } else if KMMemberInfo.shared.userScenarioType == .dmg_type8 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type9 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type10 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type12 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type13 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type14 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type15 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type16 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type17 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type20 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type21 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type23 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type24 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type25 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type26 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type27 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type31 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type32 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type35 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type36 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type38 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type39 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type40 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type41 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type42 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type46 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type47 { // 订阅
+            centerBackgroud.image = NSImage(named: "ButtonBackgroundImage5")
+            lockedImageView.image = NSImage(named: "UpgradeImage2")
+            number1ImageView.isHidden = false
+            number1ImageView.image = NSImage(named: "UpgradeImage")
+            number1Label.isHidden = true
+            number2Label.textColor = NSColor(hex: "FFFFFF")
+            number3Label.textColor = NSColor(hex: "FFFFFF")
+            number4Label.textColor = NSColor(hex: "FFFFFF")
+            number4_1Label.textColor = NSColor(hex: "FFFFFF")
+            number5Label.textColor = NSColor(hex: "FFFFFF")
+            membershipLabel.textColor = NSColor(hex: "FFFFFF")
+            if KMMemberInfo.shared.userScenarioType == .dmg_type13 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type15 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type9 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type17 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type25 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type27 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type21 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type32 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type40 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type42 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type36 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type47 {
+                if KMMemberInfo.shared.vip_endDate.count > 0 {
+                    spliLineImageView.isHidden = false
+                    endDateLabel.isHidden = false
+                }
+            }
+            rightsBox.fillColor = NSColor(named: "FFFFFF_0.2") ?? .white
+            buyNow1Box.fillColor = NSColor(hex: "FFFFFF")
+            buyNow1ImageView.isHidden = true
+            buyNow1Box.isHidden = true
+            buyNow2Box.isHidden = true
+        } else { // 免费 & 到期
+            if KMMemberInfo.shared.userScenarioType == .dmg_type4 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type11 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type18 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type19 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type22 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type33 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type34 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type37 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type48 {
+                centerBackgroud.image = NSImage(named: "ButtonBackgroundImage3")
+                lockedImageView.image = NSImage(named: "LockedImage")
+                number1ImageView.isHidden = true
+                number1Label.isHidden = false
+                number2Label.textColor = NSColor(hex:"42464D")
+                number3Label.textColor = NSColor(hex:"42464D")
+                number4Label.textColor = NSColor(hex: "42464D")
+                number4_1Label.textColor = NSColor(hex: "42464D")
+                number5Label.textColor = NSColor(hex: "42464D")
+                membershipLabel.textColor = NSColor(hex: "42464D")
+                rightsBox.fillColor = NSColor(named: "7094F6_0.1") ?? .white
+                buyNow1Box.fillColor = NSColor.clear
+                buyNow2Box.fillColor = NSColor.clear
+                buyNow1ImageView.isHidden = false
+                buyNow2ImageView.isHidden = false
+                arrow1ImageView.image = NSImage(named: "BuyNewArrowImage1")
+                arrow2ImageView.image = NSImage(named: "BuyNewArrowImage1")
+                buyNow1Label.textColor = NSColor(named: "FFFFFF")
+                buyNow1Label.textColor = NSColor(hex: "FFFFFF")
+                buyNow2Label.textColor = NSColor(hex: "FFFFFF")
+                if KMMemberInfo.shared.userScenarioType == .dmg_type11 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type18 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type22 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type33 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type37 ||
+                    KMMemberInfo.shared.userScenarioType == .dmg_type48 { // 到期
+                    if KMMemberInfo.shared.vip_endDate.count > 0 &&
+                        KMMemberInfo.shared.vip_status == 2 {
+                        spliLineImageView.isHidden = false
+                        endDateLabel.isHidden = false
+                        endDateLabel.textColor = NSColor(named: "FA1E5D")
+                    }
+                    spliLineImageView.isHidden = false
+                    endDateLabel.isHidden = false
+                    buyNow2Box.isHidden = true
+                    buyNow1BoxLeftConst.constant = (CGRectGetWidth(view.bounds) - CGRectGetWidth(buyNow1Box.frame))/2
+                } else { // 免费
+                    
+                }
+            }
+        }
+        buyNow1Box.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
+            guard let self = self else { return }
+            
+            if mouseEntered {
+                self.buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2_Hov")
+            } else {
+                self.buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2")
+            }
+
+        }
+        buyNow1Box.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
+            guard let self = self else { return }
+            if KMMemberInfo.shared.userScenarioType == .lite_type1 {
+                // 免费版,免费账号跳转购买比较表
+                self.viewModel.skipCompare(.lite_Base)
+            } else {
+                // 其它情况根据账号状态跳转不同比较表
+                KMMemberInfo.shared.productCompareShow()
+            }
+        }
+        
+        buyNow2Box.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
+            guard let self = self else { return }
+            if mouseEntered {
+                self.buyNow2ImageView.image = NSImage(named: "ButtonBackgroundImage2_Hov")
+            } else {
+                self.buyNow2ImageView.image = NSImage(named: "ButtonBackgroundImage2")
+            }
+        }
+        buyNow2Box.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
+            guard let self = self else { return }
+            if KMMemberInfo.shared.userScenarioType == .lite_type1 {
+                self.viewModel.skipCompare(.trial)
+            }
+        }
+        
+        accountCenterBox.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
+            guard let self = self else { return }
+            if mouseEntered {
+                self.accountCenterBox.fillColor = NSColor(named: "F5FAFF") ?? .white
+                self.accountLabel.textColor = NSColor(named: "3091FF")
+                self.accountImageView.image = NSImage(named: "AccountCenterImage_Hov")
+            } else {
+                self.accountCenterBox.fillColor = .clear
+                self.accountLabel.textColor = NSColor(named: "3091FF")
+                self.accountImageView.image = NSImage(named: "AccountCenterImage")
+            }
+        }
+        accountCenterBox.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
+            guard let self = self else { return }
+            self.viewModel.skipAccountCenter()
+        }
+        
+        signOutBox.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
+            guard let self = self else { return }
+            if mouseEntered {
+                self.signOutLabel.textColor = NSColor(named: "3091FF")
+                self.signOutImageView.image = NSImage(named: "SignOutImage_Hov")
+            } else {
+                self.signOutLabel.textColor = NSColor(named: "3091FF")
+                self.signOutImageView.image = NSImage(named: "SignOutImage")
+            }
+        }
+        signOutBox.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
+            guard let self = self else { return }
+            self.viewModel.signOutAction()
+        }
+        
+        closeAccountBox.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
+            guard let self = self else { return }
+            if mouseEntered {
+                self.closeAccountLabel.textColor = NSColor(named: "3091FF")
+                self.closeAccountImageView.image = NSImage(named: "CloseAccountImage_hover")
+            } else {
+                self.closeAccountLabel.textColor = NSColor(named: "3091FF")
+                self.closeAccountImageView.image = NSImage(named: "CloseAccountImage")
+            }
+
+        }
+        closeAccountBox.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
+            guard let self = self else { return }
+            self.viewModel.closeAccountAction()
+        }
+        //远程控制
+        if let userViewInfoContent = KMAdvertisementManager.manager.info.userViewInfoContent {
+            
+            buyNow1BoxLeftConst.constant = 0
+            buyNow2Box.isHidden = false
+            
+            if userViewInfoContent.content?.isEmpty == false {
+                buyNow2Box.isHidden = true
+                buyNow1BoxLeftConst.constant = (CGRectGetWidth(view.bounds) - CGRectGetWidth(buyNow1Box.frame))/2
+            }
+        }
+    }
 }

+ 20 - 20
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -93,7 +93,7 @@
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="gTf-aj-vcD">
                                 <rect key="frame" x="52" y="19" width="283" height="20"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Cus-b6-bPl">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Cus-b6-bPl">
                                         <rect key="frame" x="-2" y="2" width="287" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="tGN-cs-zlt">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -112,7 +112,7 @@
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="fvM-5y-eSf">
                                 <rect key="frame" x="52" y="1" width="283" height="14"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VM1-Vy-v3Z">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VM1-Vy-v3Z">
                                         <rect key="frame" x="-2" y="-1" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Agq-vv-kre">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -128,7 +128,7 @@
                                         </constraints>
                                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="PartingLine1" id="tg6-wR-cJN"/>
                                     </imageView>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jTD-ou-mCo">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jTD-ou-mCo">
                                         <rect key="frame" x="51" y="-1" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="oTG-l7-9dQ">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -181,7 +181,7 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="M5x-Un-8s5">
                                         <rect key="frame" x="0.0" y="122" width="295" height="24"/>
                                         <subviews>
-                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gGn-tS-WsW">
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gGn-tS-WsW">
                                                 <rect key="frame" x="-2" y="4" width="37" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Pho-fC-LLx">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -203,7 +203,7 @@
                                                             </constraints>
                                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="JMP-Ta-two"/>
                                                         </imageView>
-                                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yp0-r5-Zyn">
+                                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yp0-r5-Zyn">
                                                             <rect key="frame" x="26" y="4" width="37" height="16"/>
                                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="WB3-CE-yDh">
                                                                 <font key="font" metaFont="system"/>
@@ -233,7 +233,7 @@
                                             <constraint firstItem="gGn-tS-WsW" firstAttribute="leading" secondItem="M5x-Un-8s5" secondAttribute="leading" id="ugc-Qe-EFI"/>
                                         </constraints>
                                     </customView>
-                                    <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="i59-vk-E69">
+                                    <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="i59-vk-E69">
                                         <rect key="frame" x="0.0" y="0.0" width="295" height="110"/>
                                         <view key="contentView" id="gIt-eM-0Hd">
                                             <rect key="frame" x="0.0" y="0.0" width="295" height="110"/>
@@ -300,7 +300,7 @@
                                             </constraints>
                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="9ju-uP-sHk"/>
                                         </imageView>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Y4j-Mm-WEO">
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Y4j-Mm-WEO">
                                             <rect key="frame" x="42" y="11" width="278" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="MoV-RM-o8P">
                                                 <font key="font" metaFont="system"/>
@@ -335,7 +335,7 @@
                                             </constraints>
                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="btg-AY-rpX"/>
                                         </imageView>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oo8-m6-xaF">
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oo8-m6-xaF">
                                             <rect key="frame" x="42" y="12" width="280" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="oCP-bZ-LZO">
                                                 <font key="font" metaFont="system"/>
@@ -370,7 +370,7 @@
                                             </constraints>
                                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="T9z-g8-Afh"/>
                                         </imageView>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C2d-c1-mrd">
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C2d-c1-mrd">
                                             <rect key="frame" x="42" y="12" width="280" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="eeL-kw-olw">
                                                 <font key="font" metaFont="system"/>
@@ -442,7 +442,7 @@
                                         <rect key="frame" x="0.0" y="0.0" width="81" height="39"/>
                                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" id="7cy-fL-Pht"/>
                                     </imageView>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6va-5C-3xj">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6va-5C-3xj">
                                         <rect key="frame" x="10" y="12" width="41" height="16"/>
                                         <textFieldCell key="cell" alignment="center" title="Label" id="xAk-F7-0sK">
                                             <font key="font" metaFont="system"/>
@@ -484,7 +484,7 @@
                                         <rect key="frame" x="0.0" y="0.0" width="81" height="39"/>
                                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" id="yTz-cf-0Xc"/>
                                     </imageView>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hWh-o1-eZT">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hWh-o1-eZT">
                                         <rect key="frame" x="10" y="12" width="41" height="16"/>
                                         <textFieldCell key="cell" alignment="center" title="Label" id="Wdy-30-3d8">
                                             <font key="font" metaFont="system"/>
@@ -549,7 +549,7 @@
                                 <rect key="frame" x="0.0" y="0.0" width="81" height="39"/>
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" id="5ot-4m-K7m"/>
                             </imageView>
-                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="t8m-r3-wJE">
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="t8m-r3-wJE">
                                 <rect key="frame" x="10" y="12" width="41" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="fcE-yv-vuf">
                                     <font key="font" metaFont="system"/>
@@ -599,7 +599,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="bxs-Gk-h7a">
                             <rect key="frame" x="0.0" y="42" width="77" height="36"/>
                             <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3Lv-MN-obu">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3Lv-MN-obu">
                                     <rect key="frame" x="20" y="10" width="37" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="0Zq-CQ-6kd">
                                         <font key="font" usesAppearanceFont="YES"/>
@@ -627,7 +627,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="ze2-xr-PdX">
                             <rect key="frame" x="0.0" y="0.0" width="77" height="42"/>
                             <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1xg-TB-Y3K">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1xg-TB-Y3K">
                                     <rect key="frame" x="-2" y="13" width="81" height="16"/>
                                     <textFieldCell key="cell" alignment="center" title="Label" id="BjT-9Y-iWk">
                                         <font key="font" usesAppearanceFont="YES"/>
@@ -662,7 +662,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="89K-8f-Pew">
                             <rect key="frame" x="0.0" y="0.0" width="77" height="42"/>
                             <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IbY-zZ-3eY">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IbY-zZ-3eY">
                                     <rect key="frame" x="-2" y="13" width="81" height="16"/>
                                     <textFieldCell key="cell" alignment="center" title="Label" id="n6X-fr-0ua">
                                         <font key="font" usesAppearanceFont="YES"/>
@@ -711,7 +711,7 @@
                                         <rect key="frame" x="0.0" y="0.0" width="37" height="28"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <subviews>
-                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cjO-qk-Gbb">
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cjO-qk-Gbb">
                                                 <rect key="frame" x="15" y="2" width="24" height="14"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="dev" id="0a3-kx-4jm">
                                                     <font key="font" metaFont="smallSystem"/>
@@ -719,7 +719,7 @@
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                 </textFieldCell>
                                             </textField>
-                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TDh-Xw-OR7">
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TDh-Xw-OR7">
                                                 <rect key="frame" x="-2" y="0.0" width="19" height="28"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="2" id="HNY-qj-sOt">
                                                     <font key="font" metaFont="systemBold" size="24"/>
@@ -748,7 +748,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="O6K-wF-0oc">
                             <rect key="frame" x="0.0" y="0.0" width="77" height="42"/>
                             <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MZb-0e-sV1">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MZb-0e-sV1">
                                     <rect key="frame" x="-2" y="13" width="81" height="16"/>
                                     <textFieldCell key="cell" alignment="center" title="Label" id="llq-2h-fj6">
                                         <font key="font" usesAppearanceFont="YES"/>

+ 17 - 4
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -13,8 +13,9 @@ import StoreKit
 
 @objc enum KMCompareTableType : Int {
     case trial = 0 // 试用比较表
-    case dmg_Base // DMG 基础版
-    case dmg_MacWindows // DMG Mac&Windows双平台高级版永久
+    case dmg_Base // DMG 购买比较表
+    case dmg_Upgrades1 // DMG 升级比较表 39.99
+    case dmg_Upgrades2 // DMG 升级比较表 49.99
     case lite_Base // Lite 基础版
     case lite_MacWindows // Lite Mac&Windows双平台高级版永久
     case pro_Base // Pro 基础版
@@ -49,6 +50,14 @@ import StoreKit
     case standardAddDevicesAllAccessPack12months_pro  // standard_add_devices_all_access_pack_12months(订阅)
     case advancedAddDevicesAllAccessPack12months_pro  // advanced_add_devices_all_access_pack_12months(订阅)
     case advancedAdd2DevicesAllAccessPack12months_pro  // advanced_add_2_devices_all_access_pack_12months(订阅)
+    
+    case pdfReaderProStandard_dmg  // 全平台标准版年订阅
+    case pdfReaderProAdvanced_dmg  // 全平台高级版年订阅
+    case pdfReaderProPermanent_dmg  // Mac&Windows双平台高级版永久
+    case pdfReaderProAIAnnual_dmg  // AI 年订阅
+    case pdfReaderProAIMonthly_dmg  // AI 月订阅
+    case pdfToOffice_dmg  // 转档包 永久
+    case add2Device_dmg  // 转档包 永久
 }
 
 typealias AppstorePurchaseComplete = (_ success: Bool,_ msg: String) -> Void
@@ -455,7 +464,9 @@ class KMProductModel: ObservableObject {
     func appstorePurchaseAction(_ tag: Int, _ complete: @escaping AppstorePurchaseComplete) -> Void {
         if state == .dmg_Base {
             
-        } else if state == .dmg_MacWindows {
+        } else if state == .dmg_Upgrades1 {
+            
+        } else if state == .dmg_Upgrades2 {
             
         } else if state == .lite_Base {
             if tag == 0 {
@@ -717,7 +728,9 @@ class KMProductModel: ObservableObject {
             return [.free, .freeTrial]
         } else if state == .dmg_Base {
             return [.free, .allPlatformStandard, .allPlatformAdvanced_12, .dualPlatformAdvanced]
-        } else if state == .dmg_MacWindows {
+        } else if state == .dmg_Upgrades1 {
+            return [.allPlatformAdvanced_12]
+        } else if state == .dmg_Upgrades1 {
             return [.allPlatformAdvanced_12]
         } else if state == .lite_Base {
             return [.free, .allPlatformAdvanced_6, .allPlatformAdvanced_12, .dualPlatformAdvanced]

+ 42 - 45
PDF Office/PDF Master/MemberCenter/ViewModel/KMUserInfoVCModel.swift

@@ -66,7 +66,43 @@ class KMUserInfoVCModel: ObservableObject {
                  (KMMemberInfo.shared.vip_paymentModel == "2" && KMMemberInfo.shared.vip_levels != "1"))  ||
                 (KMMemberInfo.shared.userScenarioType == .pro_type1 &&
                  (KMMemberInfo.shared.vip_paymentModel == "2" && KMMemberInfo.shared.vip_levels != "1"))  ||
-                KMMemberInfo.shared.userScenarioType == .pro_type5 {
+                KMMemberInfo.shared.userScenarioType == .pro_type5 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type5 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type6 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type7 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type28 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type29 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type30 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type43 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type44 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type45 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type8 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type9 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type10 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type12 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type13 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type14 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type15 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type16 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type17 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type20 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type21 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type23 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type24 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type25 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type26 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type27 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type31 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type32 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type35 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type36 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type38 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type39 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type40 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type41 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type42 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type46 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type47 {
                 if platform == "mac" {
                     images.append(NSImage(named: "MacOSPlatformImage2")!)
                 } else if platform == "ios" {
@@ -216,7 +252,7 @@ class KMUserInfoVCModel: ObservableObject {
     /**
      @abstract 注销账户申请 弹窗;
      */
-    func closeAccountApplyWC(code: String) -> Void {
+    func closeAccountApplyWC(code: String,callback: ((Bool?, KMMemberCenterResult?)->Void)?) -> Void {
         if KMMemberCenterManager.manager.isConnectionAvailable() == false {
             let alert = NSAlert()
             alert.alertStyle = .critical
@@ -224,53 +260,14 @@ class KMUserInfoVCModel: ObservableObject {
             alert.informativeText = NSLocalizedString("Please make sure your internet connection is available.", comment: "")
             alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
             alert.runModal()
+            
+            callback?(false,nil)
             return
         }
         KMMemberCenterManager.manager.userLogOffForUser(code: code) { success, result in
             guard let result = result else { return }
-            let resultDict = result as KMMemberCenterResult
-            let msg = resultDict.msg
-            if success {
-                let logOff: KMMemberLogOff = resultDict.logOff!
-                var currentTime = "0"
-                var logOffTime = "0"
-
-                let currentDate = Date()
-                let calendar = Calendar.current
-
-                if let token = logOff.currentTime {
-                    let dateFormatter = DateFormatter()
-                    dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
-                    // 将字符串转换为日期对象
-                    if let date = dateFormatter.date(from: token) {
-                        // 创建一个新的日期格式化器,用于只显示天
-                        let components = calendar.dateComponents([.day], from: currentDate, to: date)
-                        
-                        if let daysDifference = components.day {
-                            currentTime = String(daysDifference)
-                        }
-                    }
-                }
-                if let token = logOff.logOffTime {
-                    let dateFormatter = DateFormatter()
-                    dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
-                    
-                    // 将字符串转换为日期对象
-                    if let date = dateFormatter.date(from: token) {
-                        let components = calendar.dateComponents([.day], from: currentDate, to: date)
-                        
-                        if let daysDifference = components.day {
-                            logOffTime = String(daysDifference)
-                        }
-                    }
-                }
-//                KMCloseApplyWC.shared.logOffTime = logOffTime
-//                KMCloseApplyWC.shared.currentTime = currentTime
-
-                KMCloseApplyWC.shared.showWindow(nil)
-            } else {
-                print(msg as Any)
-            }
+            let resultDict = result as KMMemberCenterResult            
+            callback?(success,resultDict)
         }
     }
     

+ 20 - 2
PDF Office/PDF Master/MemberCenter/WindowsController/KMCloseVerificationWC.swift

@@ -171,8 +171,26 @@ class KMCloseVerificationWC: NSWindowController {
     // MARK: Button Action
     
     @IBAction func yesButtonAction(_ sender: NSButton) {
-        self.window?.close()
-        userInfoModel.closeAccountApplyWC(code: signUpModel.verificationCode)
+        window?.showWaitingView()
+        userInfoModel.closeAccountApplyWC(code: signUpModel.verificationCode) { [weak self] result, resultDict in
+            DispatchQueue.main.async {
+                if(result == true) {
+                    KMCloseApplyWC.shared.showWindow(nil)
+                    self?.window?.close()
+                } else {
+                    if(resultDict != nil) {
+                        let msg = resultDict?.msg ?? NSLocalizedString("Unknown error", comment: "")
+                        let alert = NSAlert()
+                        alert.alertStyle = .critical
+                        alert.messageText = NSLocalizedString("Error Information", comment: "")
+                        alert.informativeText = NSLocalizedString("Please make sure your internet connection is available.", comment: "")
+                        alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
+                        alert.runModal()
+                    }
+                }
+                self?.window?.hideWaitingView()
+            }
+        }
     }
 }
 

+ 23 - 6
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -356,10 +356,11 @@ class KMProductCompareWC: NSWindowController {
     // DMG
         if model.state == .dmg_Base {
 
-        } else if model.state == .dmg_MacWindows {
+        } else if model.state == .dmg_Upgrades1 {
             
-        } else {
+        } else if model.state == .dmg_Upgrades2 {
             
+        } else {
         }
 #else
     // AppStore 免费版本
@@ -518,7 +519,16 @@ class KMProductCompareWC: NSWindowController {
             topsubBoxWidth2.constant = 149.5
             topsubBoxWidth3.constant = 149.5
             topsubBoxWidth3.constant = 149.5
-        } else if model.state == .dmg_MacWindows {
+        } else if model.state == .dmg_Upgrades1 {
+            contentWidth = 689.0
+            contentHeight = 660.0
+            topsubBox2.isHidden = true
+            topsubBox3.isHidden = true
+            topsubBox4.isHidden = true
+            topsubBox1.contentView = advancedPlanInfoView
+            topSelectBox1.isHidden = false
+            topsubBoxWidth1.constant = 320.0
+        } else if model.state == .dmg_Upgrades2 {
             contentWidth = 689.0
             contentHeight = 660.0
             topsubBox2.isHidden = true
@@ -1169,9 +1179,11 @@ extension KMProductCompareWC: NSTableViewDelegate, NSTableViewDataSource {
                 if model.state == .dmg_Base {
                     cellView.selectBoxLeft.constant = 352.0 + 149.5 + 149.5
                     cellView.selectBoxWidth.constant = 149.5
-                } else if model.state == .dmg_MacWindows {
+                } else if model.state == .dmg_Upgrades1 {
                     cellView.selectBoxLeft.constant = 352.0
                     cellView.selectBoxWidth.constant = 320.0
+                } else if model.state == .dmg_Upgrades2 {
+                    
                 } else if model.state == .lite_Base {
                     cellView.selectBoxLeft.constant = 352.0 + 179.0
                     cellView.selectBoxWidth.constant = 240.0
@@ -1255,8 +1267,10 @@ extension KMProductCompareWC: NSTableViewDelegate, NSTableViewDataSource {
             configureCellView(cellView, value: value2, label: cellView.value2Label, imageView: cellView.value2ImageView, platformsBox: cellView.platformsBox2)
             configureCellView(cellView, value: value3, label: cellView.value3Label, imageView: cellView.value3ImageView, platformsBox: cellView.platformsBox3)
             configureCellView(cellView, value: value4, label: cellView.value4Label, imageView: cellView.value4ImageView, platformsBox: cellView.platformsBox4)
-        } else if model.state == .dmg_MacWindows {
+        } else if model.state == .dmg_Upgrades1 {
             configureCellView(cellView, value: value3, label: cellView.value1Label, imageView: cellView.value1ImageView, platformsBox: cellView.platformsBox1)
+        } else if model.state == .dmg_Upgrades1 {
+            
         } else if model.state == .lite_Base {
             configureCellView(cellView, value: value1, label: cellView.value1Label, imageView: cellView.value1ImageView, platformsBox: cellView.platformsBox1)
             configureCellView(cellView, value: value3, label: cellView.value2Label, imageView: cellView.value2ImageView, platformsBox: cellView.platformsBox2)
@@ -1318,7 +1332,10 @@ extension KMProductCompareWC: NSTableViewDelegate, NSTableViewDataSource {
             cellView.viewWidth2.constant = 149.5
             cellView.viewWidth3.constant = 149.5
             cellView.viewWidth4.constant = 149.5
-        } else if model.state == .dmg_MacWindows {
+        } else if model.state == .dmg_Upgrades1 {
+            cellView.selectBox1.isHidden = false
+            cellView.viewWidth1.constant = 320.0
+        } else if model.state == .dmg_Upgrades1 {
             cellView.selectBox1.isHidden = false
             cellView.viewWidth1.constant = 320.0
         } else if model.state == .lite_Base {