From f774bca189417eb0fe4e50d4ec48b22a35a7c9a9 Mon Sep 17 00:00:00 2001 From: renshen <1005457301@qq.com> Date: Thu, 5 Nov 2026 19:50:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E5=BE=85=E7=A1=AE=E8=AE=A4=E6=97=A7=E6=98=8E=E7=BB=86=E4=B8=8E?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Business/Pages.php | 24 ++++++++++++++++++++++++ routes/admin.php | 20 ++++---------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php index fb42ca32..13dad444 100644 --- a/app/Http/Controllers/Business/Pages.php +++ b/app/Http/Controllers/Business/Pages.php @@ -7238,6 +7238,30 @@ class Pages extends Controller ); } + public function redirectLegacyRefundPendingExport(Request $request) + { + return $this->redirectLegacyRefundPendingRoute( + $request, + 'business.refunds.refund-pending.export', + ); + } + + public function redirectLegacyRefundPendingMonthDetails(Request $request) + { + return $this->redirectLegacyRefundPendingRoute( + $request, + 'business.refunds.refund-pending.month-details', + ); + } + + private function redirectLegacyRefundPendingRoute(Request $request, string $routeName) + { + $url = route($routeName, ['company_id' => $request->route('company_id')]); + $query = $request->getQueryString(); + + return redirect()->to($url . ($query === null ? '' : '?' . $query)); + } + public function refundPendingMonthDetails(Request $request) { $month = trim((string) $request->query('month', '')); diff --git a/routes/admin.php b/routes/admin.php index 405a6f08..2b6246fa 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -495,23 +495,11 @@ Route::get('workspace/fee-ratio-monitoring/refund-pending/month-details', 'Busin ->middleware('business.page:fee-ratio-monitoring,refund-pending') ->name('business.refunds.refund-pending.month-details'); -Route::get('workspace/refunds/refund-pending/export', function () { - $url = route('business.refunds.refund-pending.export', [ - 'company_id' => request()->route('company_id'), - ]); - $query = request()->getQueryString(); +Route::get('workspace/refunds/refund-pending/export', 'Business\Pages@redirectLegacyRefundPendingExport') + ->name('business.refunds.refund-pending.legacy-export'); - return redirect()->to($url . ($query === null ? '' : '?' . $query)); -})->name('business.refunds.refund-pending.legacy-export'); - -Route::get('workspace/refunds/refund-pending/month-details', function () { - $url = route('business.refunds.refund-pending.month-details', [ - 'company_id' => request()->route('company_id'), - ]); - $query = request()->getQueryString(); - - return redirect()->to($url . ($query === null ? '' : '?' . $query)); -})->name('business.refunds.refund-pending.legacy-month-details'); +Route::get('workspace/refunds/refund-pending/month-details', 'Business\Pages@redirectLegacyRefundPendingMonthDetails') + ->name('business.refunds.refund-pending.legacy-month-details'); Route::get('workspace/other/after-sales-return-refund/export', 'Business\Pages@exportAfterSalesReturnRefunds') ->middleware('business.page:other,after-sales-return-refund') -- 2.47.2