Kaynağa Gözat

1.上传文件关联原来的逻辑

huangxiaodong 1 yıl önce
ebeveyn
işleme
e752a42fb6

+ 3 - 0
创维盒子/双子星云手机/AppDelegate/Config/Notification.h

@@ -144,4 +144,7 @@
 //显示密码页面  即不可展示图片和声音
 #define ShowPwdVCNotification                 @"ShowPwdVCNot"
 
+/* 获取云机基本通知*/
+#define getbaseInfoBeginNotification                 @"etbaseInfoBeginNot"
+
 #endif /* Notification_h */

+ 1 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewAudioOrDocumentViewController.h

@@ -6,6 +6,7 @@
 //
 
 #import "BaseViewController.h"
+#import "uploadImageOrVideoViewController.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 20 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewAudioOrDocumentViewController.m

@@ -572,6 +572,11 @@
         make.bottom.mas_equalTo(0);
         make.top.mas_equalTo(0);
     }];
+    
+    KWeakSelf
+    previewToUploadFileV.didClickButtonFun = ^(NSInteger tag) {
+        [weakSelf gotoUploadFileFunWith:tag];
+    };
 }
 
 #pragma mark 设置标题
@@ -800,4 +805,19 @@
         [weakSelf removeNewIndicatorHaveStr];
     }];
 }
+
+#pragma mark 调整文件上传
+- (void)gotoUploadFileFunWith:(NSInteger)tag
+{
+    
+    uploadImageOrVideoViewController *vc = [uploadImageOrVideoViewController new];
+    if(tag ==10){
+        vc.isPhotoType = YES;
+    }
+    else{
+        vc.isPhotoType = NO;
+    }
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
 @end

+ 1 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewImageOrVideoViewController.h

@@ -6,6 +6,7 @@
 //
 
 #import "BaseViewController.h"
+#import "uploadImageOrVideoViewController.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 20 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewImageOrVideoViewController.m

@@ -647,6 +647,11 @@
         make.bottom.mas_equalTo(0);
         make.top.mas_equalTo(0);
     }];
+    
+    KWeakSelf
+    previewToUploadFileV.didClickButtonFun = ^(NSInteger tag) {
+        [weakSelf gotoUploadFileFunWith:tag];
+    };
 }
 
 #pragma mark 设置标题
@@ -971,4 +976,19 @@
     }];
 }
 
+#pragma mark 调整文件上传
+- (void)gotoUploadFileFunWith:(NSInteger)tag
+{
+    
+    uploadImageOrVideoViewController *vc = [uploadImageOrVideoViewController new];
+    if(tag ==10){
+        vc.isPhotoType = YES;
+    }
+    else{
+        vc.isPhotoType = NO;
+    }
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+
 @end

+ 1 - 1
创维盒子/双子星云手机/Class/Set/previewFile/view/previewToUploadFileView.h

@@ -10,7 +10,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface previewToUploadFileView : UIView
-
+@property (nonatomic,copy) void (^didClickButtonFun)(NSInteger tag);
 @end
 
 NS_ASSUME_NONNULL_END

+ 6 - 4
创维盒子/双子星云手机/Class/Set/previewFile/view/previewToUploadFileView.m

@@ -85,6 +85,7 @@
         }];
         
         UIView *imageBgView = [[UIView alloc] init];
+        imageBgView.userInteractionEnabled = NO;
         imageBgView.backgroundColor = [UIColor hwColor:@"#F5F7FA"];
         imageBgView.layer.cornerRadius = 8;
         imageBgView.layer.masksToBounds = YES;
@@ -155,13 +156,14 @@
 {
     NSInteger tag = but.tag;
     
-    if(tag == 100){
+    //if(tag == 100)
+    {
         [self removeFromSuperview];
     }
     
-//    if(_didClickButtonFun){
-//        _didClickButtonFun(tag);
-//    }
+    if(_didClickButtonFun){
+        _didClickButtonFun(tag);
+    }
 }
 
 @end

+ 1 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/uploadImageOrVideoViewController.m

@@ -70,6 +70,7 @@
     }
     [self checkVideoAccessFun];
     
+    [[NSNotificationCenter defaultCenter] postNotificationName:getbaseInfoBeginNotification object:nil];
 }
 
 - (void)initBaselUIFun