Commit dace5719 authored by 勾芒's avatar 勾芒

修复AirPrint打印异常

parent 59aef7fb
...@@ -389,13 +389,23 @@ ...@@ -389,13 +389,23 @@
#pragma mark -打印订单 #pragma mark -打印订单
- (void)AirprintButtonClick:(UIButton *)button - (void)AirprintButtonClick:(UIButton *)button
{ {
[self DownloadPDF:^(id returnValue) { [self DownloadPDF:^(id Value) {
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] DownloadPDFdatasWithURL:Value WithReturnValueBlock:^(id returnValue) {
[self callAirprintWithURL:[NSURL URLWithString:@"http://139.196.195.30:8090/opple-web/export/pdf/A0516052616540001.pdf"] SuccessBlock:^{ [self RemoveMBProgressHUDLoding];
[self callAirprintWithdata:returnValue SuccessBlock:^{
[self SuccessMBProgressView:@"打印完成"]; [self SuccessMBProgressView:@"打印完成"];
} ErrorBlock:^{ } ErrorBlock:^{
[self ErrorMBProgressView:@"打印失败"]; [self ErrorMBProgressView:@"打印失败"];
}]; }];
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}];
}]; }];
} }
...@@ -409,16 +419,7 @@ ...@@ -409,16 +419,7 @@
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
NSString *url = [NSString stringWithFormat:@"%@%@",PDFSERADDRESS,returnValue[@"data"]]; NSString *url = [NSString stringWithFormat:@"%@%@",PDFSERADDRESS,returnValue[@"data"]];
success(url); success(url);
// [[NetworkRequestClassManager Manager] DownloadPDFdatasWithURL:url WithReturnValueBlock:^(id returnValue) {
//
// [self RemoveMBProgressHUDLoding];
// success(returnValue);
//
// } WithErrorCodeBlock:^(id errorCodeValue) {
//
// } WithFailureBlock:^(id error) {
// [self RemoveMBProgressHUDLoding];
// }];
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="53" y="375"/> <point key="canvasLocation" x="520" y="307"/>
</scene> </scene>
</scenes> </scenes>
</document> </document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment