Kaynağa Gözat

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

zenghong 1 hafta önce
ebeveyn
işleme
11d4161c8f

+ 22 - 131
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -455,7 +455,7 @@ NSPopoverDelegate>
             }
         } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type3 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type11) {
-            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"开通会员", nil)];
+            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Renew now", nil)];
         } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type5 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type9 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypePro_type1 ||
@@ -479,11 +479,31 @@ NSPopoverDelegate>
         } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type7
 //                   [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type8 ||
                    /*[KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type13*/) {
-            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"立即续费", nil)];
+            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Renew now", nil)];
         }
         [self.button setTitleColor:[NSColor whiteColor]];
         self.bgImg.hidden = NO;
         self.button.hidden = NO;
+        
+        KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
+        // 单平台高级版永久 未登录时 也不显示升级(因为点了也得先登录),但是登录后的卡片里是有升级按钮的,可以升级成全平台高级版年订阅
+        //原来是订阅的,不需要升级,因为目前不支持订阅升级订阅这种场景
+        if(type == KMUserScenarioTypeLite_type9 ||
+           type == KMUserScenarioTypeLite_type10 ||
+           type == KMUserScenarioTypeLite_type11 ||
+           type == KMUserScenarioTypeLite_type12 ||
+           type == KMUserScenarioTypeLite_type13 ||
+           type == KMUserScenarioTypePro_type1 ||
+           type == KMUserScenarioTypePro_type2 ||
+           type == KMUserScenarioTypePro_type3 ||
+           type == KMUserScenarioTypePro_type4 ||
+           type == KMUserScenarioTypePro_type5) {
+            if ([KMMemberInfo shared].isLogin == NO || ([KMMemberInfo shared].isMemberAllFunction == NO && [KMMemberInfo shared].isLogin == YES)) {
+                self.button.hidden = YES;
+                self.bgImg.hidden = YES;
+            }
+
+        }
         self.button.frame = CGRectMake(totalWidth, kbottomGap, buttonWidth, self.view.frame.size.height -2 *kbottomGap);
         CGRect rect = self.button.frame;
         self.bgImg.frame = rect;
@@ -540,135 +560,6 @@ NSPopoverDelegate>
 }
 
 - (IBAction)buttonAction:(id)sender {
-//    BOOL isFree = NO;
-//
-//#if VERSION_DMG
-//    if (ActivityStatusNone == [VerificationManager manager].status) {
-//        //弹出 试用弹窗UI优化-新用户试用路径 新UI 情况一 右上角按钮
-//        KMPurchaseFirstTrialWindowController *firstTrialWC = [KMPurchaseFirstTrialWindowController currentFirstTrialWC];
-//        firstTrialWC.buttonActionBlock = ^(KMPurchaseFirstTrialWindowController * _Nonnull ftWC, KMButton * _Nonnull btn, NSString * _Nonnull email, NSString * _Nonnull name) {
-//            if (btn.tag == 10001) {
-//                if (ActivityStatusNone == [VerificationManager manager].status ||
-//                    ActivityStatusTrialExpire == [VerificationManager manager].status) {
-//
-//                    [[FMTrackEventManager defaultManager] trackEventWithEvent:@"Tbr" withProperties:@{@"Tbr_Btn":@"Btn_Tbr_SecondTrial"}];
-//                    [[VerificationManager manager] trialForDays:7
-//                                                          email:email?:[VerificationManager manager].email
-//                                                           name:name?:[VerificationManager manager].accountName
-//                                                    complention:^(ActivityStatus status, NSDictionary *info, NSError *error) {
-//                        if (error ||
-//                            status != ActivityStatusTrial) {
-//                            NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Activation Error", nil)
-//                                                             defaultButton:NSLocalizedString(@"Try Again", nil)
-//                                                           alternateButton:nil
-//                                                               otherButton:nil
-//                                                 informativeTextWithFormat:NSLocalizedString(@"Failed to sign up for the free trial. Please make sure your internet connection is available and try again later.", nil), nil];
-//                            [alert runModal];
-//                        } else {
-//                            KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeRepeatTrialSuccess];
-//                            [vc showWindow:nil];
-//                        }
-//                    }];
-//                    [ftWC close];
-//                } else {
-//                    [ftWC close];
-//                    KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
-//                    vc.callback = ^{
-//                        [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
-//                    };
-//                    [vc showWindow:nil];
-//                }
-//            } else if (btn.tag == 10002) {
-//                NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?utm_source=app_dmg&utm_medium=dmg_puw_free_trial", Swift_oc_Tool.Store_Link_OC]];
-//                [[NSWorkspace sharedWorkspace] openURL:url];
-//                [[FMTrackEventManager defaultManager] trackEventWithEvent:@"PUW" withProperties:@{@"PUW_Btn":@"PUW_Btn_UpgradeBuyNow"}];
-//            } else if (btn.tag == 10003) {
-//                KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];//KMVerificationTypeActivate
-//                [vc showWindow:nil];
-//                [ftWC close];
-//            }
-//        };
-//        [firstTrialWC.window center];
-//        [firstTrialWC showWindow:nil];
-//    } else if (ActivityStatusTrialExpire == [VerificationManager manager].status ||
-//               ActivityStatusTrial == [VerificationManager manager].status) {
-//            [[NSNotificationCenter defaultCenter] postNotificationName:@"KMVerificationMessagePopShowNoti" object:nil];
-//            
-//        if (!self.testVC) {
-//            self.testVC = [[KMUnlockAlertViewController alloc] init];
-//        }
-//        [self.testVC addtrackingAreaInfo];
-//        self.testVC.callback = ^(NSInteger index) {
-//                if (index == 1) {
-//                    KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
-//                    [vc showWindow:nil];
-//                } else if (index == 2) {
-//                    KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_3"];
-//                    [embeddedWC showWindow:nil];
-//                    [[embeddedWC window] center];
-//                }
-//            };
-//        self.testVC.mouseEventCall = ^(BOOL mouseEnter) {
-//            if (mouseEnter) {
-//                self.stopPopOverHide = YES;
-//                if (ActivityStatusTrialExpire == [VerificationManager manager].status ||
-//                    ActivityStatusTrial == [VerificationManager manager].status) {
-//                    if (!self.popover.isShown) {
-//                        [self buttonAction:self.button];
-//                    }
-//                }
-//            } else {
-//                self.stopPopOverHide = NO;
-//                if (self.popover) {
-//                    [self.popover close];
-//                }
-//                [self.testVC removeTrackingAreaInfo];
-//            }
-//        };
-//            NSPopover *popover = [[NSPopover alloc] init];
-//            popover.delegate = self;
-//            popover.contentViewController = self.testVC;
-//            popover.animates = YES;
-//            popover.behavior = NSPopoverBehaviorTransient;
-//            [popover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMinYEdge];
-//            self.popover = popover;
-//    } else if (ActivityStatusVerifExpire == [VerificationManager manager].status) {
-//        KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivateExpired];
-//        [vc showWindow:nil];
-//    } else if (ActivityStatusVerification == [VerificationManager manager].status) {
-//        if ([VerificationManager manager].needUpgradeLicense) {
-//            KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
-//            [embeddedWC showWindow:nil];
-//            [[embeddedWC window] center];
-//        }
-//    } else {
-//        if ([VerificationManager manager].needUpgradeLicense) {
-//            KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
-//            [embeddedWC showWindow:nil];
-//            [[embeddedWC window] center];
-//        } else {
-//            KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeNormal];
-//            [vc showWindow:nil];
-//        }
-//    }
-//#else
-//    isFree = YES;
-//#if VERSION_FREE
-//    if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
-//        isFree = NO;
-//    }
-//    if (isFree) {
-//        [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
-//    }
-//#else
-//    if (![IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice) {
-//        KMToolCompareWindowController *vc = [KMToolCompareWindowController toolCompareWithToolType:KMCompareWithToolTypeConvert selectNum:0];
-//        [vc.window center];
-//        [vc showWindow:nil];
-//    }
-//#endif
-//    
-//#endif
     if ([KMMemberInfo shared].isLogin) {
         [[KMProductCompareWC shared] setOrientation:YES];
         if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type1) {

+ 2 - 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="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23504"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

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

@@ -706,23 +706,23 @@
                             <rect key="frame" x="0.0" y="42" width="77" height="36"/>
                             <subviews>
                                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="bdt-qZ-ixY">
-                                    <rect key="frame" x="21" y="9" width="35" height="19"/>
+                                    <rect key="frame" x="20" y="4" width="37" height="28"/>
                                     <view key="contentView" id="0am-hY-Afp">
-                                        <rect key="frame" x="0.0" y="0.0" width="35" height="19"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="37" height="28"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <subviews>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TDh-Xw-OR7">
-                                                <rect key="frame" x="-2" y="0.0" width="14" height="19"/>
-                                                <textFieldCell key="cell" lineBreakMode="clipping" title="2" id="HNY-qj-sOt">
-                                                    <font key="font" metaFont="systemBold" size="16"/>
+                                            <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="system" size="11"/>
                                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                 </textFieldCell>
                                             </textField>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cjO-qk-Gbb">
-                                                <rect key="frame" x="10" y="1" width="27" height="16"/>
-                                                <textFieldCell key="cell" lineBreakMode="clipping" title="dev" id="0a3-kx-4jm">
-                                                    <font key="font" metaFont="system"/>
+                                            <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"/>
                                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                 </textFieldCell>
@@ -733,7 +733,7 @@
                                             <constraint firstAttribute="trailing" secondItem="cjO-qk-Gbb" secondAttribute="trailing" id="ESM-T6-ELI"/>
                                             <constraint firstItem="TDh-Xw-OR7" firstAttribute="leading" secondItem="0am-hY-Afp" secondAttribute="leading" id="f43-Fi-1AY"/>
                                             <constraint firstAttribute="bottom" secondItem="TDh-Xw-OR7" secondAttribute="bottom" id="fY6-qk-rMI"/>
-                                            <constraint firstItem="cjO-qk-Gbb" firstAttribute="centerY" secondItem="0am-hY-Afp" secondAttribute="centerY" id="m8c-R9-afb"/>
+                                            <constraint firstItem="cjO-qk-Gbb" firstAttribute="bottom" secondItem="TDh-Xw-OR7" secondAttribute="bottom" constant="-2" id="qnz-Br-9qW"/>
                                             <constraint firstItem="cjO-qk-Gbb" firstAttribute="leading" secondItem="TDh-Xw-OR7" secondAttribute="trailing" constant="2" id="sPU-PE-WBb"/>
                                         </constraints>
                                     </view>