drew há 6 anos atrás
pai
commit
5e4199780a

+ 2 - 2
千模.xcodeproj/project.pbxproj

@@ -3358,7 +3358,7 @@
 				CODE_SIGN_ENTITLEMENTS = "千模/千模.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 8;
+				CURRENT_PROJECT_VERSION = 10;
 				DEVELOPMENT_TEAM = 99T6ZUAFCD;
 				ENABLE_BITCODE = YES;
 				ENABLE_TESTABILITY = NO;
@@ -3401,7 +3401,7 @@
 				CODE_SIGN_ENTITLEMENTS = "千模/千模.entitlements";
 				CODE_SIGN_IDENTITY = "iPhone Distribution";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 8;
+				CURRENT_PROJECT_VERSION = 10;
 				DEVELOPMENT_TEAM = 99T6ZUAFCD;
 				ENABLE_BITCODE = YES;
 				ENABLE_TESTABILITY = NO;

+ 9 - 9
千模/Main/Actor/ChargeViewController.m

@@ -196,12 +196,6 @@
     }
     SKProduct *p = nil;
     for(SKProduct *pro in product) {
-        NSLog(@"%@", [pro description]);
-        NSLog(@"%@", [pro localizedTitle]);
-        NSLog(@"%@", [pro localizedDescription]);
-        NSLog(@"%@", [pro price]);
-        NSLog(@"%@", [pro productIdentifier]);
-        
         if([pro.productIdentifier isEqualToString: [NSString stringWithFormat:@"com.thmodel.%dm", amount]]){
             p = pro;
             break;
@@ -213,15 +207,21 @@
         [[SKPaymentQueue defaultQueue] addPayment:payment];
     } else {
         dispatch_async(dispatch_get_main_queue(), ^{
-            [MBProgressHUD showTextHUD:@"发送购买请求失败" inView:self.view hideAfterDelay:1];
+            [MBProgressHUD showTextHUD:@"发送购买请求失败,请稍后再试" inView:self.view hideAfterDelay:1];
         });
     }
 }
 
 //请求失败
 - (void)request:(SKRequest *)request didFailWithError:(NSError *)error{
-    [MBProgressHUD hideHUDForView:self.view animated:YES];
-    [MBProgressHUD showTextHUD:@"支付失败" inView:self.view hideAfterDelay:1];
+    dispatch_async(dispatch_get_main_queue(), ^{
+        NSLog(@"支付失败 %@", error.localizedDescription);
+        NSLog(@"支付失败 %@", error.localizedFailureReason);
+        NSLog(@"支付失败 %@", error.localizedRecoverySuggestion);
+        NSLog(@"支付失败 %@", error.localizedRecoveryOptions);
+        [MBProgressHUD hideHUDForView:self.view animated:YES];
+        [MBProgressHUD showTextHUD:@"发送购买请求失败,请稍后再试" inView:self.view hideAfterDelay:1];
+    });
 }
 
 - (void)requestDidFinish:(SKRequest *)request{

+ 30 - 26
千模/MyInfo/MineViewController.m

@@ -27,7 +27,9 @@
 @property(weak, nonatomic) IBOutlet UIImageView *avatarView;
 @property(weak, nonatomic) IBOutlet UIButton *promoteBtn;
 @property (weak, nonatomic) IBOutlet MineItemView *shop;
+@property (weak, nonatomic) IBOutlet MineItemView *videoOrder;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *consHeight;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *videoOrderHeight;
 @property (weak, nonatomic) IBOutlet UIView *inviteView;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *inviteHeight;
 
@@ -49,7 +51,7 @@
     self.avatarView.layer.cornerRadius = 35;
     self.avatarView.layer.masksToBounds = YES;
     self.avatarView.userInteractionEnabled = YES;
-
+    
     self.promoteBtn.layer.backgroundColor = [UIColor colorWithRed:255 / 255.0 green:255 / 255.0 blue:255 / 255.0 alpha:1.0].CGColor;
     self.promoteBtn.layer.cornerRadius = 17;
     self.promoteBtn.layer.shadowColor = [UIColor colorWithRed:0 / 255.0 green:0 / 255.0 blue:0 / 255.0 alpha:0.08].CGColor;
@@ -60,11 +62,13 @@
     
     AppDelegate *myDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     if (myDelegate.audit) {
-         self.shop.hidden = YES;
-         self.consHeight.constant = 0.f;
-         self.inviteView.hidden = YES;
-         self.inviteHeight.constant = 0.f;
-         [self.shop layoutIfNeeded];
+        self.shop.hidden = YES;
+        self.videoOrder.hidden = YES;
+        self.consHeight.constant = 0.f;
+        self.videoOrderHeight.constant = 0.f;
+        self.inviteView.hidden = YES;
+        self.inviteHeight.constant = 0.f;
+        [self.shop layoutIfNeeded];
     }
 }
 
@@ -82,7 +86,7 @@
     gl.colors = @[(__bridge id) [UIColor colorWithRed:251 / 255.0 green:92 / 255.0 blue:163 / 255.0 alpha:1].CGColor, (__bridge id) [UIColor colorWithRed:253 / 255.0 green:127 / 255.0 blue:141 / 255.0 alpha:1].CGColor];
     gl.locations = @[@(0), @(1.0f)];
     [self.headView.layer addSublayer:gl];
-
+    
     UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bgView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(30, 30)];
     CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
     maskLayer.frame = self.bgView.bounds;
@@ -103,22 +107,22 @@
     }
     NSString *str = [NSString stringWithFormat:@"%@memberInfo?action=getuserinfo&PK=%@", webURL, [Helper sharedAccount].accid];
     [[AHHttpManager sharedManager]
-            POST:str
-      parameters:nil
-         success:^(id responseObject) {
-             NSLog(@"%@", responseObject);
-             if ([[responseObject objectForKey:@"msg"] isEqualToString:@"success"]) {
-                 NSDictionary *data = responseObject[@"data"];
-                 self.nameLabel.text = data[@"pet"];
-                 [self.avatarView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", imageURl, data[@"hphoto"]]] placeholderImage:[UIImage imageNamed:@"default_avatar"]];
-             } else {
-                 [MBProgressHUD showTextHUD:@"超时" inView:self.view hideAfterDelay:1];
-             }
-         }
-         failure:^(NSError *error) {
-             NSLog(@"error = %@", error);
-             [MBProgressHUD showTextHUD:@"超时" inView:self.view hideAfterDelay:1];
-         }];
+     POST:str
+     parameters:nil
+     success:^(id responseObject) {
+        NSLog(@"%@", responseObject);
+        if ([[responseObject objectForKey:@"msg"] isEqualToString:@"success"]) {
+            NSDictionary *data = responseObject[@"data"];
+            self.nameLabel.text = data[@"pet"];
+            [self.avatarView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", imageURl, data[@"hphoto"]]] placeholderImage:[UIImage imageNamed:@"default_avatar"]];
+        } else {
+            [MBProgressHUD showTextHUD:@"超时" inView:self.view hideAfterDelay:1];
+        }
+    }
+     failure:^(NSError *error) {
+        NSLog(@"error = %@", error);
+        [MBProgressHUD showTextHUD:@"超时" inView:self.view hideAfterDelay:1];
+    }];
 }
 
 - (IBAction)handelTap:(id)sender {
@@ -135,9 +139,9 @@
             break;
         }
         case 2: {
-//            ChargeViewController *chargeVc = [[ChargeViewController alloc] init];
-//            chargeVc.hidesBottomBarWhenPushed = YES;
-//            [self.navigationController pushViewController:chargeVc animated:YES];
+            //            ChargeViewController *chargeVc = [[ChargeViewController alloc] init];
+            //            chargeVc.hidesBottomBarWhenPushed = YES;
+            //            [self.navigationController pushViewController:chargeVc animated:YES];
             if (![delegate isLogin]) {
                 [delegate showLoginAlert];
                 return;

+ 4 - 2
千模/MyInfo/MineViewController.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -20,6 +20,8 @@
                 <outlet property="nameLabel" destination="tnV-pA-N5a" id="4Yj-BS-G5M"/>
                 <outlet property="promoteBtn" destination="bzN-aj-YPb" id="MuZ-vU-MqS"/>
                 <outlet property="shop" destination="ofV-pQ-teD" id="d8F-Xq-3vT"/>
+                <outlet property="videoOrder" destination="4WH-zT-UTg" id="KP7-c6-Hgg"/>
+                <outlet property="videoOrderHeight" destination="E58-8e-oTU" id="Lph-SU-aNO"/>
                 <outlet property="view" destination="iN0-l3-epB" id="6qb-1w-qlZ"/>
             </connections>
         </placeholder>