diff --git a/app/adminapi/controller/financial/FinancialInvoiceController.php b/app/adminapi/controller/financial/FinancialInvoiceController.php index 7b811637f..c8c3eead2 100644 --- a/app/adminapi/controller/financial/FinancialInvoiceController.php +++ b/app/adminapi/controller/financial/FinancialInvoiceController.php @@ -66,12 +66,7 @@ if (false === $result) { return $this->fail(FinancialInvoiceLogic::getError()); } - header("Content-Type: application/zip"); - header("Content-Transfer-Encoding: Binary"); - header("Content-Length: " . filesize($result)); - header("Content-Disposition: attachment; filename=\"" . basename($result) . "\""); - readfile($result); - exit; + return $this->success('下载成功', ['url' => '/' . $result], 1, 1); } /** diff --git a/app/adminapi/controller/financial/FinancialRefundController.php b/app/adminapi/controller/financial/FinancialRefundController.php index 1be077192..2dc76caac 100644 --- a/app/adminapi/controller/financial/FinancialRefundController.php +++ b/app/adminapi/controller/financial/FinancialRefundController.php @@ -83,12 +83,7 @@ if (false === $result) { return $this->fail(FinancialRefundLogic::getError()); } - header("Content-Type: application/zip"); - header("Content-Transfer-Encoding: Binary"); - header("Content-Length: " . filesize($result)); - header("Content-Disposition: attachment; filename=\"" . basename($result) . "\""); - readfile($result); - exit; + return $this->success('下载成功', ['url' => '/' . $result], 1, 1); }