Sfoglia il codice sorgente

版本更新,增加本地版本对比:处理多个版本未更新,中间存在强更版本的问题。

Steven 11 mesi fa
parent
commit
5617a66d7f

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/xcshareddata/xcschemes/KulexiuForTeacher.xcscheme

@@ -52,7 +52,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "Debug"
+      buildConfiguration = "DEV"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/AlertView/KSUpdateAlert.m

@@ -44,7 +44,9 @@
         self.noforceView.hidden = NO;
     }
     self.tipsLabel.text = [NSString stringWithFormat:@"V%@新版本抢先体验",memo];
-    
+    if ([NSString isEmptyString:descMessage]) {
+        descMessage = @"";
+    }
     NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
     [paragraphStyle setLineSpacing:4];//调整行间距
     NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:descMessage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f weight:UIFontWeightMedium],NSForegroundColorAttributeName:HexRGB(0x808080)}];

+ 3 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -322,9 +322,12 @@
 #pragma mark ----- version
 // api-admin/appVersionInfo/queryByPlatform
 + (void)appVersionInfoRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self clearRequestHeader];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-admin/appVersionInfo/queryByPlatform"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@"iOS-teacher" forKey:@"platform"];
+    NSString *currentVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
+    [parm setValue:currentVersion forKey:@"localVersion"];
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }