浏览代码

1.上报版本信息

huangxiaodong 1 年之前
父节点
当前提交
ae4eac8728

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

@@ -28,6 +28,7 @@
 #import "uploadFileManager.h"
 #import "downloadManager.h"
 #import "backupsFileManager.h"
+#import "iPhone.h"
 
 @interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate>
 @property(nonatomic, strong)   CalculatorViewController *calculatorVC;
@@ -77,7 +78,7 @@
         // 加载主页面
         [self enterMainVCFromScene];
         //
-        [self getNetWorkPopViewFun];
+        [self reportVersionInfoFun];
         
         [self.window makeKeyAndVisible];
         
@@ -692,13 +693,32 @@
     [[backupsFileManager shareInstance] suspendBackupsFileFun];
 }
 
-#pragma mark 调起系统网络允许
--(void)getNetWorkPopViewFun
+#pragma mark 上报版本号信息
+-(void)reportVersionInfoFun
 {
     NSMutableDictionary *paraDict = [NSMutableDictionary new];
     
+    NSString *vers = [iPhone appVersion];
+    if(vers){
+        [paraDict setValue:vers forKey:@"iosClientVersionNumber"];
+    }
+    
+    NSDictionary *deviceDict = [HWDataManager getObjectWithKey:Const_Have_Add_Device];
+    if (deviceDict && [[deviceDict allKeys] containsObject:Const_Have_Add_Device_SN]){
+        NSString*snStr = deviceDict[Const_Have_Add_Device_SN];
+        if(snStr){
+            [paraDict setValue:snStr forKey:@"sn"];
+        }
+        else{
+            return;
+        }
+    }
+    else{
+        return;;
+    }
+    
 //    KWeakSelf
-    [[netWorkManager shareInstance] CommonGetWithCallBackCode:@"" Parameters:paraDict success:^(id  _Nonnull responseObject) {
+    [[netWorkManager shareInstance] CommonPostCallBackCode:reportVersionInfo Parameters:paraDict success:^(id  _Nonnull responseObject) {
     
     } failure:^(NSError * _Nonnull error) {
     }];

+ 1 - 1
创维盒子/双子星云手机/netWork/addLog/addLogObject.m

@@ -72,7 +72,7 @@ static addLogObject *addlog_ShareInstance = nil;
     if(!snStr){
         snStr = [iTools getNowTimeString];
     }
-    NSString*filename = [[NSString alloc] initWithFormat:@"%@_ios",snStr];
+    NSString*filename = [[NSString alloc] initWithFormat:@"%@_ios.log",snStr];
     
     [paraDict setValue:filename forKey:@"filename"];
     

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

@@ -58,4 +58,10 @@
  返回数据模型 */
 #define addLogFun  @"/box/log/add"
 
+/*8 上报版本号信息   POST请求
+输入参数     iosClientVersionNumber
+ 
+ 返回数据模型 */
+#define reportVersionInfo  @"/box/reportVersionInfo"
+
 #endif /* newWorkInterface_h */