|
@@ -358,20 +358,19 @@
|
|
|
state = model.status;
|
|
|
}
|
|
|
|
|
|
-// if(self->_didScanErrorFun){
|
|
|
-// self->_didScanErrorFun(state);
|
|
|
-// }
|
|
|
-
|
|
|
+ [weakSelf showAlertFun:state];
|
|
|
}
|
|
|
}
|
|
|
else{
|
|
|
// if(self->_didScanErrorFun){
|
|
|
// self->_didScanErrorFun(2);
|
|
|
// }
|
|
|
-
|
|
|
+ [weakSelf showAlertFun:2];
|
|
|
}
|
|
|
|
|
|
} failure:^(NSError * _Nonnull error) {
|
|
|
+ [weakSelf showAlertFun:0];
|
|
|
+
|
|
|
// if(self->_didScanErrorFun){
|
|
|
// self->_didScanErrorFun(0);
|
|
|
// }
|
|
@@ -381,6 +380,41 @@
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
+- (void)showAlertFun:(NSInteger)_getSNMsgcode
|
|
|
+{
|
|
|
+
|
|
|
+
|
|
|
+ NSString *linkErrTitle = NSLocalizedString(@"scan_sn_data_error_title",nil);
|
|
|
+ NSString *linkErrTip = NSLocalizedString(@"scan_sn_data_error_content",nil);
|
|
|
+
|
|
|
+ if(_getSNMsgcode == 202){
|
|
|
+ linkErrTitle = NSLocalizedString(@"get_sn_msg_202_title",nil);
|
|
|
+ linkErrTip = NSLocalizedString(@"get_sn_msg_202_content",nil);
|
|
|
+ }else if (_getSNMsgcode == 201){
|
|
|
+ linkErrTitle = NSLocalizedString(@"get_sn_msg_201_title",nil);
|
|
|
+ linkErrTip = NSLocalizedString(@"get_sn_msg_201_content",nil);
|
|
|
+ }
|
|
|
+
|
|
|
+ ComontAlretViewController *linkFailAlretVC= [[ComontAlretViewController alloc] initWithTiTle:linkErrTitle
|
|
|
+ msg:linkErrTip
|
|
|
+ imageStr:nil
|
|
|
+ cancelTitle:NSLocalizedString(@"guide_set_pwd_guide_know",nil)
|
|
|
+ okTitle:nil isOkBtnHighlight:NO
|
|
|
+ didClickOk:^{
|
|
|
+
|
|
|
+
|
|
|
+ } didClickCancel:^{
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
+ linkFailAlretVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ //[linkFailAlretVC setMsgTextAlignment:NSTextAlignmentLeft];
|
|
|
+ [self presentViewController:linkFailAlretVC animated:YES completion:^{
|
|
|
+ linkFailAlretVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark GuideViewController
|
|
|
- (void)gotoGuideViewFunBy:(NSString*)sn withResponseObject:(DeviceThirdIdModel*)DeviceThirdIdMod
|
|
|
{
|