From 2d5cc6c51de0eec7fabb50d3e8b241a6257419c9 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Thu, 9 May 2024 11:59:18 +0800 Subject: [PATCH] update --- .../controller/financial/FinancialInvoiceController.php | 7 +------ .../controller/financial/FinancialRefundController.php | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) 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); }