瀏覽代碼

1.分享数量限制

huangxiaodong 1 年之前
父節點
當前提交
b44238c41b

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

@@ -559,6 +559,11 @@
 #pragma mark 用户点击分享
 - (void)gotoShareViewFun
 {
+    if (_didSelectListArr.count > 5) {
+        [[iToast makeText:NSLocalizedString(@"share_max_count_tip2",nil)] show];
+        return;
+    }
+    
     editShareView *editShareV = [[editShareView alloc] init];
     editShareV.didSelectListArr = _didSelectListArr;
     editShareV.shareFileType = @"4";

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

@@ -430,6 +430,11 @@
 #pragma mark 用户点击分享
 - (void)gotoShareViewFun
 {
+    if (_didSelectListArr.count > 5) {
+        [[iToast makeText:NSLocalizedString(@"share_max_count_tip2",nil)] show];
+        return;
+    }
+    
     editShareView *editShareV = [[editShareView alloc] init];
     editShareV.didSelectListArr = _didSelectListArr;
     editShareV.shareFileType = @"6";

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

@@ -552,6 +552,11 @@
 #pragma mark 用户点击分享
 - (void)gotoShareViewFun
 {
+    if (_didSelectListArr.count > 5) {
+        [[iToast makeText:NSLocalizedString(@"share_max_count_tip2",nil)] show];
+        return;
+    }
+    
     editShareView *editShareV = [[editShareView alloc] init];
     editShareV.didSelectListArr = _didSelectListArr;
     editShareV.shareFileType = @"6";

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

@@ -622,6 +622,19 @@
 #pragma mark 用户点击分享
 - (void)gotoShareViewFun
 {
+    if(_isPhotoType){
+        if (_didSelectListArr.count > 20) {
+            [[iToast makeText:NSLocalizedString(@"share_max_count_tip1",nil)] show];
+            return;
+        }
+    }
+    else{
+        if (_didSelectListArr.count > 5) {
+            [[iToast makeText:NSLocalizedString(@"share_max_count_tip2",nil)] show];
+            return;
+        }
+    }
+    
     editShareView *editShareV = [[editShareView alloc] init];
     editShareV.didSelectListArr = _didSelectListArr;
     if(_isPhotoType){

+ 1 - 1
创维盒子/双子星云手机/Class/Set/previewFile/shareRecordDetailsHWViewController.m

@@ -200,7 +200,7 @@
     [_cancelShareLinkButton setTitleColor:HW0A132BColor forState:UIControlStateNormal];
     _cancelShareLinkButton.titleLabel.font = [UIFont systemFontOfSize:14.0];
     [_cancelShareLinkButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
-    _cancelShareLinkButton.tag = 2;
+    _cancelShareLinkButton.tag = 10;
     [self.view addSubview:_cancelShareLinkButton];
     _cancelShareLinkButton.layer.cornerRadius = 8;
     _cancelShareLinkButton.layer.masksToBounds = YES;

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

@@ -87,7 +87,7 @@
     _stateLabel.font = [UIFont systemFontOfSize:12.f];
     [_stateLabel setTextColor:HW666666Color]; //#01B7EA
     [_stateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.width.mas_equalTo(60);
+        make.width.mas_equalTo(70);
         make.right.equalTo(_rightImage.mas_left).offset(-5.f);
         make.centerY.equalTo(self.mas_centerY);
         //make.top.mas_equalTo(15.f);

+ 2 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -517,3 +517,5 @@
 "box_receive_file_ing"   = "保存资源中…";
 "box_receive_file_suc"   = "保存成功";
 "box_receive_file_fail"   = "保存失败";
+"share_max_count_tip1"   = "分享文件最大不能超过20张";
+"share_max_count_tip2"   = "分享文件最大不能超过5张";