|
|
@@ -173,11 +173,28 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
|
|
|
make.width.mas_equalTo(btn_w_h);
|
|
|
make.height.mas_equalTo(btn_w_h);
|
|
|
}];
|
|
|
- [backBtn setImage:[UIImage imageNamed:@"icon_base_back"] forState:(UIControlStateNormal)];
|
|
|
+ [backBtn setImage:[UIImage imageNamed:@"icon_white_back"] forState:(UIControlStateNormal)];
|
|
|
[backBtn setImageEdgeInsets:(UIEdgeInsetsMake((btn_w_h - btn_show)/2.f, (btn_w_h - btn_show)/2.f, (btn_w_h - btn_show)/2.f, (btn_w_h - btn_show)/2.f))];
|
|
|
[backBtn addTarget:self
|
|
|
action:@selector(backBtnPressed)
|
|
|
forControlEvents:(UIControlEventTouchUpInside)];
|
|
|
+
|
|
|
+ //添加标题
|
|
|
+ CGFloat left_ritght = btn_w_h + 10 + 5;
|
|
|
+ UILabel *titleLabel = [[UILabel alloc] init];
|
|
|
+ titleLabel.text = NSLocalizedString(@"pc_scan_to_login",nil);
|
|
|
+ titleLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
+ titleLabel.font = [UIFont systemFontOfSize:16.0];
|
|
|
+ titleLabel.textColor = [UIColor whiteColor];
|
|
|
+ [self.view addSubview:titleLabel];
|
|
|
+
|
|
|
+ [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.centerY.mas_equalTo(backBtn.mas_centerY);
|
|
|
+ make.left.mas_equalTo(left_ritght);
|
|
|
+ make.right.mas_equalTo(-left_ritght);
|
|
|
+ make.height.mas_equalTo(btn_w_h);
|
|
|
+ }];
|
|
|
+
|
|
|
}
|
|
|
|
|
|
#pragma mark timer 处理线上下移动
|
|
|
@@ -214,7 +231,7 @@ bool isPCScanDownType = YES;
|
|
|
|
|
|
AVMetadataMachineReadableCodeObject*object = [metadataObjects lastObject];
|
|
|
|
|
|
- NSLog(@"%@",object.stringValue);
|
|
|
+ HLog(@"%@",object.stringValue);
|
|
|
|
|
|
/*扫描到有用信息时取消扫描*/
|
|
|
NSString *resStr = object.stringValue;//RK3908P1V62112465
|
|
|
@@ -223,7 +240,7 @@ bool isPCScanDownType = YES;
|
|
|
}
|
|
|
else{
|
|
|
[[iToast makeText:NSLocalizedString(@"pc_qrcoede_tips_error",nil)] show];
|
|
|
- NSLog(@"没有扫描到数据");
|
|
|
+ HLog(@"没有扫描到数据");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -335,7 +352,7 @@ bool isPCScanDownType = YES;
|
|
|
[[iToast makeText:curModel.msg] show];
|
|
|
}
|
|
|
else{
|
|
|
- [[iToast makeText:@"扫码信息错误"] show];
|
|
|
+ [[iToast makeText:NSLocalizedString(@"pc_qrcoede_tips_error",nil)] show];
|
|
|
}
|
|
|
|
|
|
[weakSelf.navigationController popViewControllerAnimated:YES];
|