Commit dace5719 authored by 勾芒's avatar 勾芒

修复AirPrint打印异常

parent 59aef7fb
......@@ -389,12 +389,22 @@
#pragma mark -打印订单
- (void)AirprintButtonClick:(UIButton *)button
{
[self DownloadPDF:^(id returnValue) {
[self DownloadPDF:^(id Value) {
[self callAirprintWithURL:[NSURL URLWithString:@"http://139.196.195.30:8090/opple-web/export/pdf/A0516052616540001.pdf"] SuccessBlock:^{
[self SuccessMBProgressView:@"打印完成"];
} ErrorBlock:^{
[self ErrorMBProgressView:@"打印失败"];
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] DownloadPDFdatasWithURL:Value WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
[self callAirprintWithdata:returnValue SuccessBlock:^{
[self SuccessMBProgressView:@"打印完成"];
} ErrorBlock:^{
[self ErrorMBProgressView:@"打印失败"];
}];
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}];
}];
}
......@@ -409,16 +419,7 @@
[self RemoveMBProgressHUDLoding];
NSString *url = [NSString stringWithFormat:@"%@%@",PDFSERADDRESS,returnValue[@"data"]];
success(url);
// [[NetworkRequestClassManager Manager] DownloadPDFdatasWithURL:url WithReturnValueBlock:^(id returnValue) {
//
// [self RemoveMBProgressHUDLoding];
// success(returnValue);
//
// } WithErrorCodeBlock:^(id errorCodeValue) {
//
// } WithFailureBlock:^(id error) {
// [self RemoveMBProgressHUDLoding];
// }];
} WithErrorCodeBlock:^(id errorCodeValue) {
[self RemoveMBProgressHUDLoding];
......
......@@ -20,7 +20,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="520" y="307"/>
</scene>
</scenes>
</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