Parcourir la source

1.可以通过frp服务器拿到图片显示

huangxiaodong il y a 1 an
Parent
commit
14b29292d0

+ 22 - 0
创维盒子/jiSuanQi_Info.plist

@@ -100,10 +100,21 @@
 		<true/>
 		<key>NSExceptionDomains</key>
 		<dict>
+			<key>transfer.armclouding.com</key>
+			<dict>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+				<key>NSExceptionRequiresForwardSecrecy</key>
+				<false/>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+			</dict>
 			<key>14.18.190.141</key>
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>
 				<true/>
+				<key>NSExceptionRequiresForwardSecrecy</key>
+				<false/>
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
@@ -111,6 +122,8 @@
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>
 				<true/>
+				<key>NSExceptionRequiresForwardSecrecy</key>
+				<false/>
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
@@ -123,6 +136,15 @@
 				<key>NSIncludesSubdomains</key>
 				<true/>
 			</dict>
+			<key>transfertest.armclouding.com</key>
+			<dict>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+				<key>NSExceptionRequiresForwardSecrecy</key>
+				<false/>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+			</dict>
 		</dict>
 	</dict>
 	<key>UIApplicationSceneManifest</key>

+ 32 - 0
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -301,6 +301,14 @@
 		6B7272602B0E240F00C03F87 /* uploadFileRecordTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B72725E2B0E240F00C03F87 /* uploadFileRecordTableView.m */; };
 		6B7B65582AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */; };
 		6B7B65592AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm */; };
+		6B7EA7982BF5B4A6002D5CC2 /* NASFilePicModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7EA7962BF5B4A6002D5CC2 /* NASFilePicModel.h */; };
+		6B7EA7992BF5B4A6002D5CC2 /* NASFilePicModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B7EA7972BF5B4A6002D5CC2 /* NASFilePicModel.m */; };
+		6B7EA79A2BF5B4A6002D5CC2 /* NASFilePicModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7EA7962BF5B4A6002D5CC2 /* NASFilePicModel.h */; };
+		6B7EA79B2BF5B4A6002D5CC2 /* NASFilePicModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B7EA7972BF5B4A6002D5CC2 /* NASFilePicModel.m */; };
+		6B7EA79E2BF5E0ED002D5CC2 /* NASMsgModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7EA79C2BF5E0ED002D5CC2 /* NASMsgModel.h */; };
+		6B7EA79F2BF5E0ED002D5CC2 /* NASMsgModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B7EA79D2BF5E0ED002D5CC2 /* NASMsgModel.m */; };
+		6B7EA7A02BF5E0ED002D5CC2 /* NASMsgModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7EA79C2BF5E0ED002D5CC2 /* NASMsgModel.h */; };
+		6B7EA7A12BF5E0ED002D5CC2 /* NASMsgModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B7EA79D2BF5E0ED002D5CC2 /* NASMsgModel.m */; };
 		6B8661D62BBA53B600B19846 /* noticeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8661D52BBA53B600B19846 /* noticeModel.m */; };
 		6B8661D72BBA53B600B19846 /* noticeModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8661D42BBA53B600B19846 /* noticeModel.h */; };
 		6B8661D82BBA53B600B19846 /* noticeModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8661D42BBA53B600B19846 /* noticeModel.h */; };
@@ -1191,6 +1199,10 @@
 		6B7B656E2ADEAE3D00BE8CB3 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/HWAboutViewController.strings; sourceTree = "<group>"; };
 		6B7B656F2ADEAE3D00BE8CB3 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/HWHistoryViewController.strings; sourceTree = "<group>"; };
 		6B7B65702ADEAE3D00BE8CB3 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
+		6B7EA7962BF5B4A6002D5CC2 /* NASFilePicModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASFilePicModel.h; sourceTree = "<group>"; };
+		6B7EA7972BF5B4A6002D5CC2 /* NASFilePicModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASFilePicModel.m; sourceTree = "<group>"; };
+		6B7EA79C2BF5E0ED002D5CC2 /* NASMsgModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASMsgModel.h; sourceTree = "<group>"; };
+		6B7EA79D2BF5E0ED002D5CC2 /* NASMsgModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASMsgModel.m; sourceTree = "<group>"; };
 		6B8661D42BBA53B600B19846 /* noticeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = noticeModel.h; sourceTree = "<group>"; };
 		6B8661D52BBA53B600B19846 /* noticeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = noticeModel.m; sourceTree = "<group>"; };
 		6B8661DA2BBA578600B19846 /* HaveNoticeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HaveNoticeView.h; sourceTree = "<group>"; };
@@ -1512,6 +1524,8 @@
 				6B3A4B142B6F69A500F74679 /* cloudPhoneCommonModel.m */,
 				6B8661D42BBA53B600B19846 /* noticeModel.h */,
 				6B8661D52BBA53B600B19846 /* noticeModel.m */,
+				6B7EA79C2BF5E0ED002D5CC2 /* NASMsgModel.h */,
+				6B7EA79D2BF5E0ED002D5CC2 /* NASMsgModel.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -1974,6 +1988,7 @@
 		6B34DC4A2BF1B9F2002DD1EF /* previewFile */ = {
 			isa = PBXGroup;
 			children = (
+				6B7EA7952BF5B46A002D5CC2 /* model */,
 				6B34DC512BF1C1A3002DD1EF /* view */,
 				6B34DC4B2BF1BA11002DD1EF /* previewImageOrVideoViewController.h */,
 				6B34DC4C2BF1BA11002DD1EF /* previewImageOrVideoViewController.m */,
@@ -2121,6 +2136,15 @@
 			path = view;
 			sourceTree = "<group>";
 		};
+		6B7EA7952BF5B46A002D5CC2 /* model */ = {
+			isa = PBXGroup;
+			children = (
+				6B7EA7962BF5B4A6002D5CC2 /* NASFilePicModel.h */,
+				6B7EA7972BF5B4A6002D5CC2 /* NASFilePicModel.m */,
+			);
+			path = model;
+			sourceTree = "<group>";
+		};
 		6BBB35D42AE7645200E4A59B /* BackgroundKeepAlive */ = {
 			isa = PBXGroup;
 			children = (
@@ -2667,6 +2691,7 @@
 				6B0581A22AFCF50300D37290 /* AJPhotoListCell.h in Headers */,
 				6B3AD68A2BF4AE630096D6B7 /* backupsOptionViewController.h in Headers */,
 				187076772A9F400300F15F7F /* PlayerLoadingView.h in Headers */,
+				6B7EA7982BF5B4A6002D5CC2 /* NASFilePicModel.h in Headers */,
 				6B1CC2CE2B6B6D6B00AD4217 /* commandSendCheckModel.h in Headers */,
 				6B0581602AFCD0DF00D37290 /* uploadImageOrVideoViewController.h in Headers */,
 				18F9CB092ABD7835003FF71A /* TipsQRCodeForChangeDeviceViewController.h in Headers */,
@@ -2689,6 +2714,7 @@
 				6B3AD6842BF48DBA0096D6B7 /* shareRecordDetailsHWViewController.h in Headers */,
 				18F9CB072ABD7835003FF71A /* QRCodeScanForChangeDeviceViewController.h in Headers */,
 				6B45C5042B5F9CEC007E6911 /* diskListTableView.h in Headers */,
+				6B7EA79E2BF5E0ED002D5CC2 /* NASMsgModel.h in Headers */,
 				18664FF62AC2B3A4008F8A61 /* ShearDeviceUDPManager.h in Headers */,
 				18F9CAFF2ABD3643003FF71A /* ModifyPWDSecondViewController.h in Headers */,
 				6BF52CA12AD7C2F600A617DB /* inputPWDViewController.h in Headers */,
@@ -2809,6 +2835,7 @@
 				6BD506F32B9576A4006E7CB0 /* AJPhotoListCell.h in Headers */,
 				6B3AD68D2BF4AE630096D6B7 /* backupsOptionViewController.h in Headers */,
 				6BD506F42B9576A4006E7CB0 /* PlayerLoadingView.h in Headers */,
+				6B7EA79A2BF5B4A6002D5CC2 /* NASFilePicModel.h in Headers */,
 				6BD506F52B9576A4006E7CB0 /* commandSendCheckModel.h in Headers */,
 				6BD506F62B9576A4006E7CB0 /* uploadImageOrVideoViewController.h in Headers */,
 				6BD506F72B9576A4006E7CB0 /* TipsQRCodeForChangeDeviceViewController.h in Headers */,
@@ -2831,6 +2858,7 @@
 				6B3AD6872BF48DBA0096D6B7 /* shareRecordDetailsHWViewController.h in Headers */,
 				6BD507052B9576A4006E7CB0 /* QRCodeScanForChangeDeviceViewController.h in Headers */,
 				6BD507062B9576A4006E7CB0 /* diskListTableView.h in Headers */,
+				6B7EA7A02BF5E0ED002D5CC2 /* NASMsgModel.h in Headers */,
 				6BD507072B9576A4006E7CB0 /* ShearDeviceUDPManager.h in Headers */,
 				6BD507082B9576A4006E7CB0 /* ModifyPWDSecondViewController.h in Headers */,
 				6BD507092B9576A4006E7CB0 /* inputPWDViewController.h in Headers */,
@@ -3247,6 +3275,7 @@
 				6BD5072B2B9576A4006E7CB0 /* fileTransfeSetViewController.m in Sources */,
 				6BD5072C2B9576A4006E7CB0 /* UIButton+AFNetworking.m in Sources */,
 				6BD5072D2B9576A4006E7CB0 /* backupsFilerecordTableView.m in Sources */,
+				6B7EA79B2BF5B4A6002D5CC2 /* NASFilePicModel.m in Sources */,
 				6BD5072E2B9576A4006E7CB0 /* HWToolListCell.m in Sources */,
 				6BD5072F2B9576A4006E7CB0 /* cloudPhoneExtraFileListModel.m in Sources */,
 				6BD507302B9576A4006E7CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
@@ -3268,6 +3297,7 @@
 				6BD5073E2B9576A4006E7CB0 /* AFAutoPurgingImageCache.m in Sources */,
 				6BD5073F2B9576A4006E7CB0 /* AuthCodeInputView.m in Sources */,
 				6BD507402B9576A4006E7CB0 /* DDYLanguageTool.m in Sources */,
+				6B7EA7A12BF5E0ED002D5CC2 /* NASMsgModel.m in Sources */,
 				6BD507412B9576A4006E7CB0 /* AudioSessionObject.m in Sources */,
 				6BD507422B9576A4006E7CB0 /* ChangeLogoViewController.m in Sources */,
 				6BD507432B9576A4006E7CB0 /* uploadFileRecordheadView.m in Sources */,
@@ -3474,6 +3504,7 @@
 				6B5B60662B3D5FD8009A2AE2 /* fileTransfeSetViewController.m in Sources */,
 				183AE6502A8A2CF000B11CB0 /* UIButton+AFNetworking.m in Sources */,
 				6B1FBD3B2B467A8000926382 /* backupsFilerecordTableView.m in Sources */,
+				6B7EA7992BF5B4A6002D5CC2 /* NASFilePicModel.m in Sources */,
 				A084D68E27E859D300054880 /* HWToolListCell.m in Sources */,
 				6B45C4FE2B57BC87007E6911 /* cloudPhoneExtraFileListModel.m in Sources */,
 				183AE6512A8A2CF000B11CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
@@ -3495,6 +3526,7 @@
 				183AE6522A8A2CF000B11CB0 /* AFAutoPurgingImageCache.m in Sources */,
 				6BFF26962AF9D8CC00FCB4F7 /* AuthCodeInputView.m in Sources */,
 				6BBB35E32AE935C000E4A59B /* DDYLanguageTool.m in Sources */,
+				6B7EA79F2BF5E0ED002D5CC2 /* NASMsgModel.m in Sources */,
 				6BBB35DE2AE76AD800E4A59B /* AudioSessionObject.m in Sources */,
 				181E84FC2A8F57A500292B96 /* ChangeLogoViewController.m in Sources */,
 				6B8FF6BA2B04E19600800981 /* uploadFileRecordheadView.m in Sources */,

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

@@ -7,6 +7,7 @@
 
 #import <UIKit/UIKit.h>
 #import "cloudPhoneExtraFileListModel.h"
+#import "NASMsgModel.h"
 //#import "couldPhoneBaseInfoModel.h"
 @interface AppDelegate : UIResponder <UIApplicationDelegate>
 
@@ -21,6 +22,9 @@
 @property (nonatomic, assign)BOOL DisabledFileTransferType;//禁用文件传输
 @property (nonatomic, assign)BOOL isImageNewFor130;//1.3.0的镜像是否待更新
 @property (nonatomic, assign)BOOL isWebSockLinkOKAginType;//WebSock断开后或者链接上了
+
+@property (nonatomic, strong) NASMsgModel * NASMsgMod;
+@property (nonatomic, copy) NSString * NASFileService;
 +(AppDelegate*)sharedAppDelegate;
 @end
 

+ 22 - 0
创维盒子/双子星云手机/AppDelegate/AppDelegate.m

@@ -291,4 +291,26 @@
     
 }
 
+
+- (NSString*)NASFileService
+{
+//http://transfer.armclouding.com:10012/getFile?path=/sdcard/Download/mmexport1712039794930_4124382.png
+
+    if(_NASMsgMod){
+        if([_NASMsgMod.data.domainName rangeOfString:@"http"].location != NSNotFound){
+            //return  [[NSString alloc] initWithFormat:@"%@:%@/getFile?path=",_NASMsgMod.data.domainName,_NASMsgMod.data.port];
+            //return  [[NSString alloc] initWithFormat:@"%@:%@/getFile?path=",@"http://transfer.armclouding.com",@"10016"];
+            return  [[NSString alloc] initWithFormat:@"%@:%@/",@"http://transfer.armclouding.com",@"10016"];
+        }
+        else{
+            //return  [[NSString alloc] initWithFormat:@"http://%@:%@/getFile?path=",_NASMsgMod.data.domainName,_NASMsgMod.data.port];
+            //return  [[NSString alloc] initWithFormat:@"http://%@:%@/getFile?path=",@"transfer.armclouding.com",@"10016"];
+            return  [[NSString alloc] initWithFormat:@"http://%@:%@/",@"transfer.armclouding.com",@"10016"];
+        }
+       
+        //return [[NSString alloc] initWithFormat:@"%@getFile?path=",_NASMsgMod.data.baseUrl];
+        //return [[NSString alloc] initWithFormat:@"%@/",_NASMsgMod.data.baseUrl];
+    }
+    return nil;
+}
 @end

+ 1 - 1
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -92,7 +92,7 @@ isBangsScreen; \
 //#define CloudService   @"http://hiboxde.armclouding.com:7780"
 
 //#define NASService [NSString stringWithFormat:@"http://%@:9888",[connectDeviceManager shareInstance].DeviceThirdIdMod.data.ip];
-#define NASService [NSString stringWithFormat:@"http://%@:9888",@"192.168.11.248"];
+#define NASService [NSString stringWithFormat:@"http://%@:9888",@"192.168.11.248"]
 
 
 #define AESCODEKEEYY @"fvO8gAfNSr1tbdQe"

+ 27 - 0
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -32,6 +32,7 @@
 #import <WXApi.h>
 #import <TencentOpenAPI/QQApiInterface.h>
 #import <TencentOpenAPI/TencentOAuth.h>
+#import "NASMsgModel.h"
 
 @interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate>
 @property(nonatomic, strong)   CalculatorViewController *calculatorVC;
@@ -308,6 +309,9 @@
     }
     
     _isQRCodeType = NO;
+    
+    //获取NAS相关信息
+    [self getNASMsgFun];
 }
 
 #pragma mark 处理进来是非隐私模式的情况
@@ -751,6 +755,29 @@
     }];
 }
 
+#pragma mark 获取NAS相关信息
+-(void)getNASMsgFun
+{
+    NSMutableDictionary *paraDict = [NSMutableDictionary new];
+    
+    NSString *SNStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
+    if(SNStr){
+        [paraDict setValue:SNStr forKey:@"sn"];
+    }
+    else{
+        return;;
+    }
+    
+    KWeakSelf
+    [[netWorkManager shareInstance] CommonGetWithCallBackCode:getIpFun Parameters:paraDict success:^(id  _Nonnull responseObject){
+        NASMsgModel *model = [[NASMsgModel alloc] initWithDictionary:responseObject error:nil];
+        if(model){
+            ksharedAppDelegate.NASMsgMod = model;
+        }
+        
+    } failure:^(NSError * _Nonnull error) {
+    }];
+}
 
 #pragma mark 主动上锁
 - (void)showLockViewFun:(NSNotification*)not

+ 33 - 0
创维盒子/双子星云手机/Class/Set/previewFile/model/NASFilePicModel.h

@@ -0,0 +1,33 @@
+//
+//  NASFilePicModel.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/16.
+//
+
+#import "SuperModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NASFilePicDataArrModel : SuperModel
+@property (nonatomic, copy) NSString*path;
+@property (nonatomic, copy) NSString*name;
+@property (nonatomic, copy) NSString*time;
+@property (nonatomic, assign) long  size;
+
+//自定义
+@property (nonatomic, assign) BOOL isSelectType;
+@end
+
+@protocol NASFilePicDataArrModel;
+@interface NASFilePicTimeArrModel : SuperModel
+@property (nonatomic, copy) NSString*time;
+@property (nonatomic, strong) NSArray<NASFilePicDataArrModel>* list;
+@end
+
+@protocol NASFilePicTimeArrModel;
+@interface NASFilePicModel : SuperModel
+@property (nonatomic, strong) NSArray<NASFilePicTimeArrModel>* data;
+@end
+
+NS_ASSUME_NONNULL_END

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

@@ -0,0 +1,20 @@
+//
+//  NASFilePicModel.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/16.
+//
+
+#import "NASFilePicModel.h"
+
+@implementation NASFilePicDataArrModel
+
+@end
+
+@implementation NASFilePicTimeArrModel
+
+@end
+
+@implementation NASFilePicModel
+
+@end

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

@@ -20,6 +20,7 @@
 #import "editTypeBottomView.h"
 #import "editShareView.h"
 #import "previewToUploadFileView.h"
+#import "NASFilePicModel.h"
 
 @interface previewImageOrVideoViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 {
@@ -45,6 +46,9 @@
 @property(nonatomic,strong) UIButton*uploadFileButton;
 
 @property(nonatomic,strong) couldPhoneFileListModel *curCouldPhoneFileListMod;
+
+@property(nonatomic,strong) NASFilePicModel *curNASFilePicModel;
+
 @property (nonatomic, strong)  NSMutableArray*didSelectListArr;//选中的数据
 @end
 
@@ -326,40 +330,56 @@
 
 #pragma mark - 瀑布流委托
 - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
+    if(_curNASFilePicModel){
+        return _curNASFilePicModel.data.count;
+    }
     return 1;
 }
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
 
-    if(!_curCouldPhoneFileListMod){
-        return 0;
+    if(_curNASFilePicModel && _curNASFilePicModel.data.count >section){
+        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
+        return timeArrModel.list.count;
     }
-    return _curCouldPhoneFileListMod.data.list.count;
+    return 0;
 }
 
 - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
 {
     __block NSInteger row = indexPath.row;
+    __block NSInteger section = indexPath.section;
     //创建item 从缓存池中拿 Item
     imageCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"imageCollectionViewCell" forIndexPath:indexPath];
     if(!cell){
         cell = [[imageCollectionViewCell alloc] init];
     }
     
-    if(row < _curCouldPhoneFileListMod.data.list.count){
-        couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
-        cell.isEditType = _isEditType;
-        cell.curFileModel = fileModel;
-        
-        KWeakSelf
-        cell.didClckSelectBut = ^(BOOL selectType){
-            if([weakSelf userCheckFileModel:fileModel withShowTip:YES]){
-                [weakSelf userCheckFilePreviewByRow:row];
+    
+    if(_curNASFilePicModel && _curNASFilePicModel.data.count > section){
+        NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
+        if (timeArrModel.list.count > row) {
+            NASFilePicDataArrModel * dataModel = timeArrModel.list[row];
+            
+            cell.isEditType = _isEditType;
+            if(_isPhotoType){
+                cell.fileType = @"pic";
             }
-        };
-        
-        cell.didClickEditType = ^(BOOL editType) {
-            [self setViewEditTypeFun];
-        };
+            else{
+                cell.fileType = @"video";
+            }
+            cell.curFileModel = dataModel;
+            
+            KWeakSelf
+//            cell.didClckSelectBut = ^(BOOL selectType){
+//                if([weakSelf userCheckFileModel:fileModel withShowTip:YES]){
+//                    [weakSelf userCheckFilePreviewByRow:row];
+//                }
+//            };
+//            
+//            cell.didClickEditType = ^(BOOL editType) {
+//                [self setViewEditTypeFun];
+//            };
+        }
     }
     
     return cell;
@@ -384,7 +404,7 @@
 #pragma mark 空数据
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
     
-    NSString *imageName = @"uploadFile_noData";
+    NSString *imageName = @"common_no_data_pic";
     
     return [UIImage imageNamed:imageName];
 }
@@ -806,6 +826,8 @@
     KWeakSelf
     [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"getFileList" Parameters:paraDict success:^(id  _Nonnull responseObject) {
         [weakSelf removeNewIndicatorHaveStr];
+        weakSelf.curNASFilePicModel = [[NASFilePicModel alloc] initWithDictionary:responseObject error:nil];
+        [weakSelf.dataCollectionView    reloadData];
     } failure:^(NSError * _Nonnull error) {
         [weakSelf removeNewIndicatorHaveStr];
     }];

+ 3 - 2
创维盒子/双子星云手机/Class/Set/previewFile/view/imageCollectionViewCell.h

@@ -6,13 +6,14 @@
 //
 
 #import <UIKit/UIKit.h>
-#import "couldPhoneFileListModel.h"
+#import "NASFilePicModel.h"
 NS_ASSUME_NONNULL_BEGIN
 
 @interface imageCollectionViewCell : UICollectionViewCell
 
-@property(nonatomic,strong) couldPhoneFileModel*curFileModel;
+@property(nonatomic,strong) NASFilePicDataArrModel*curFileModel;
 @property(nonatomic,assign) BOOL isEditType;
+@property(nonatomic,copy) NSString* fileType;
 
 @property (nonatomic,copy) void (^didClckSelectBut)(BOOL selectType);
 @property (nonatomic,copy) void (^didClickEditType)(BOOL editType);

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

@@ -6,7 +6,7 @@
 //
 
 #import "imageCollectionViewCell.h"
-
+#import <SDWebImage/SDWebImage.h>
 @interface imageCollectionViewCell()
 @property (strong, nonatomic) UIImageView *imageView;
 @property (nonatomic, strong) UIButton *selectButton;
@@ -60,25 +60,25 @@
     self.selectButton = but;
 }
 
-- (void)setCurFileModel:(couldPhoneFileModel *)curFileModel
+- (void)setCurFileModel:(NASFilePicDataArrModel *)curFileModel
 {
     _curFileModel = curFileModel;
     
     
-    //[[downloadThumbnailManager shareInstance] handlToDownloadThumbnailInDownTableViewWith:@[_curFileModel]];
-    
-    _imageView.image = [UIImage imageNamed:@"uploadFile_image"];
-    if([curFileModel.fileType isEqualToString:@"video"])
+    UIImage *defaultImage = [UIImage imageNamed:@"uploadFile_image"];
+    if([self.fileType isEqualToString:@"video"])
     {
-        _imageView.image = [UIImage imageNamed:@"uploadFile_Video"];
+        defaultImage = [UIImage imageNamed:@"uploadFile_Video"];
+        _imageView.image = defaultImage;
     }
-    
-
-    NSString *fileName = [_curFileModel getFileNameFun];
-    NSString*pathStr = [cachesFileManager getFilePathWithName:fileName type:DownLoadThumbnail];
-    UIImage *curImage = [UIImage imageWithContentsOfFile:pathStr];
-    if(curImage){
-        _imageView.image = curImage;
+    else{
+        NSString *filePath = _curFileModel.path;
+        NSString *urlStr = ksharedAppDelegate.NASFileService;
+        NSString *fileUrl = [[NSString alloc] initWithFormat:@"%@/getThumbnail?path=%@",urlStr,filePath];
+        
+        [_imageView sd_setImageWithURL:[NSURL URLWithString:fileUrl] placeholderImage:defaultImage completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
+            HLog(@"111");
+        }];
     }
     
     if(!_isEditType){

+ 24 - 0
创维盒子/双子星云手机/CloudPlayer/Model/NASMsgModel.h

@@ -0,0 +1,24 @@
+//
+//  NASMsgModel.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/16.
+//
+
+#import "SuperModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NASDataModel : SuperModel
+@property (nonatomic, copy) NSString * sn;//
+@property (nonatomic, copy) NSString * domainName;//
+@property (nonatomic, copy) NSString * ip;//
+@property (nonatomic, copy) NSString * port;//
+@property (nonatomic, copy) NSString *baseUrl;
+@end
+
+@interface NASMsgModel : SuperModel
+@property (nonatomic, copy) NASDataModel * data;//
+@end
+
+NS_ASSUME_NONNULL_END

+ 16 - 0
创维盒子/双子星云手机/CloudPlayer/Model/NASMsgModel.m

@@ -0,0 +1,16 @@
+//
+//  NASMsgModel.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/16.
+//
+
+#import "NASMsgModel.h"
+
+@implementation NASDataModel
+
+@end
+
+@implementation NASMsgModel
+
+@end

+ 18 - 0
创维盒子/双子星云手机/Info.plist

@@ -100,6 +100,24 @@
 		<true/>
 		<key>NSExceptionDomains</key>
 		<dict>
+			<key>transfer.armclouding.com</key>
+			<dict>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+				<key>NSExceptionRequiresForwardSecrecy</key>
+				<false/>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+			</dict>
+			<key>transfertest.armclouding.com</key>
+			<dict>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+				<key>NSExceptionRequiresForwardSecrecy</key>
+				<false/>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+			</dict>
 			<key>14.18.190.141</key>
 			<dict>
 				<key>NSExceptionAllowsInsecureHTTPLoads</key>

+ 6 - 0
创维盒子/双子星云手机/netWork/newWorkInterface.h

@@ -64,4 +64,10 @@
  返回数据模型 */
 #define reportVersionInfo  @"/box/reportVersionInfo"
 
+/*9 根据sn查询ip和port接口  GET请求
+输入参数     sn
+ 
+ 返回数据模型 */
+#define getIpFun  @"/box/ip/allocation/getIp"
+
 #endif /* newWorkInterface_h */