Steven 2 gadi atpakaļ
vecāks
revīzija
29e06e8927

BIN
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDate+Extension.m

@@ -699,9 +699,9 @@
 // get current timestamp sice 1970
 + (NSString *)getCurrentTimestamp {
     // 以下这个结果是10位数,interval得出的数会有6位小数,应该是精确到微秒
-    NSTimeInterval interval = [[NSDate date] timeIntervalSince1970] *1000;
-    NSInteger time = interval;
-    NSString *timestamp = [NSString stringWithFormat:@"%zd",time];
+    NSTimeInterval interval = [[NSDate date] timeIntervalSince1970] *1000000;
+    NSString *time = [[NSString stringWithFormat:@"%f",interval] replaceAll:@"." WithString:@"-"];
+    NSString *timestamp = time;
     return timestamp;
 }
 @end

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m

@@ -65,7 +65,7 @@
     if (faliure) {
         self.faliureCallback = faliure;
     }
-    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@",[NSDate getCurrentTimestamp], fileName,[UIImage typeForImageData:imageData]];
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@-%@%@%@",UserDefault(UIDKey),[NSDate getCurrentTimestamp], fileName,[UIImage typeForImageData:imageData]];
     NSString *keyValue = uploadFileName;
     [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
@@ -123,7 +123,7 @@
     NSMutableArray *fileNameArray = [NSMutableArray array];
     for (NSInteger i = 0 ; i < fileDataArray.count; i++) {
         NSData *fileData = fileDataArray[i];
-        NSString *uploadFileName = [NSString stringWithFormat:@"%@%zd%@%@",[NSDate getCurrentTimestamp], i,fileName,[UIImage typeForImageData:fileData]];
+        NSString *uploadFileName = [NSString stringWithFormat:@"%zd-%@-%@%@%@",i,UserDefault(UIDKey),[NSDate getCurrentTimestamp],fileName,[UIImage typeForImageData:fileData]];
         [fileNameArray addObject:uploadFileName];
     }
     
@@ -208,7 +208,7 @@
     if (uploadProgress) {
         self.uploadProgress = uploadProgress;
     }
-    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@",[NSDate getCurrentTimestamp], fileName,fileSuffix];
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@-%@%@%@",UserDefault(UIDKey),[NSDate getCurrentTimestamp], fileName,fileSuffix];
     NSString *keyValue = uploadFileName;
     self.videoLinkUrl = [NSString stringWithFormat:@"https://%@/%@",self.uploadBucket,uploadFileName];
     [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
@@ -255,7 +255,7 @@
     if (faliure) {
         self.faliureCallback = faliure;
     }
-    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@",[NSDate getCurrentTimestamp], fileName,fileSuffix];
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@-%@%@%@",UserDefault(UIDKey),[NSDate getCurrentTimestamp], fileName,fileSuffix];
     NSString *keyValue = uploadFileName;
     [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -991,7 +991,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                     strongSelf.room = room;
                     strongSelf.room.delegate = self;
                 }
-
+ // 订阅流数据
                 [strongSelf countMemberCount];
                 // 发布本地视频流
                 if (strongSelf.isPauseLive == NO && strongSelf.isEnterBackground == NO) {