|
|
@@ -13,6 +13,8 @@
|
|
|
#import "CloudPhoneAPI.h"
|
|
|
#import <MJExtension.h>
|
|
|
#import "CustomerWebViewController.h"
|
|
|
+#import "netWorkManager.h"
|
|
|
+#import "SuperModel.h"
|
|
|
|
|
|
@interface AboutViewController ()
|
|
|
|
|
|
@@ -182,31 +184,31 @@
|
|
|
[self showNewIndicatorHaveStrWithCanBack:YES canTouch:NO showText:NSLocalizedString(@"app_update_checking",nil)];
|
|
|
|
|
|
NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
|
|
|
- [paraDict setValue:@"ios" forKey:@"os"];
|
|
|
- NSString *appID = [[NSBundle mainBundle] bundleIdentifier];
|
|
|
- [paraDict setValue:appID forKey:@"packageName"];
|
|
|
-// [[UseAccountManage shareInstance] CommonGetWithCallBackCode:AppVersionCheckAPI Parameters:paraDict success:^(id _Nonnull responseObject) {
|
|
|
-// HLog(@"%@", responseObject);
|
|
|
-// [self removeNewIndicatorHaveStr];
|
|
|
-//
|
|
|
-// SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
|
|
|
-//
|
|
|
-// if (model.status && model.status.integerValue == 0) {
|
|
|
-//
|
|
|
-// HWVersionModel *model = [HWVersionModel mj_objectWithKeyValues:responseObject[@"data"]];
|
|
|
-// self.versionModel = model;
|
|
|
-// [self checkVersion];
|
|
|
-// }
|
|
|
-// else
|
|
|
-// {
|
|
|
-// [[iToast makeText:model.msg] show];
|
|
|
-// }
|
|
|
-//
|
|
|
-// } failure:^(NSError * _Nonnull error) {
|
|
|
-// HLog(@"%@", error);
|
|
|
-// [[iToast makeText:@"网络异常,请稍后重试!"] show];
|
|
|
-// [self removeNewIndicatorHaveStr];
|
|
|
-// }];
|
|
|
+ [paraDict setValue:@"ios" forKey:@"type"];
|
|
|
+ [paraDict setValue:@"skyworth" forKey:@"source"];
|
|
|
+
|
|
|
+ [[netWorkManager shareInstance] CommonGetWithCallBackCode:upgradeNewVersion Parameters:paraDict success:^(id _Nonnull responseObject) {
|
|
|
+ HLog(@"%@", responseObject);
|
|
|
+ [self removeNewIndicatorHaveStr];
|
|
|
+
|
|
|
+ SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
|
|
|
+
|
|
|
+ if (model.status == 0) {
|
|
|
+
|
|
|
+ HWVersionModel *model = [HWVersionModel mj_objectWithKeyValues:responseObject[@"data"]];
|
|
|
+ self.versionModel = model;
|
|
|
+ [self checkVersion];
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ [[iToast makeText:model.msg] show];
|
|
|
+ }
|
|
|
+
|
|
|
+ } failure:^(NSError * _Nonnull error) {
|
|
|
+ HLog(@"%@", error);
|
|
|
+ [[iToast makeText:@"网络异常,请稍后重试!"] show];
|
|
|
+ [self removeNewIndicatorHaveStr];
|
|
|
+ }];
|
|
|
}
|
|
|
|
|
|
- (void)versionCheckBtnClick {
|