diff --git a/beike/Shop/Http/Controllers/OrderController.php b/beike/Shop/Http/Controllers/OrderController.php
new file mode 100644
index 00000000..432693f1
--- /dev/null
+++ b/beike/Shop/Http/Controllers/OrderController.php
@@ -0,0 +1,31 @@
+
+ * @created 2023-06-06 10:47:27
+ * @modified 2023-06-06 10:47:27
+ */
+
+namespace Beike\Shop\Http\Controllers;
+
+use Beike\Models\Order;
+use Illuminate\Http\Request;
+
+class OrderController extends Controller
+{
+ public function show(Request $request, int $number)
+ {
+ $email = trim($request->get('email'));
+ if (empty($email)) {
+ return null;
+ }
+
+ $order = Order::query()->where('number', $number)->where('email', $email)->firstOrFail();
+ $data = hook_filter('order.show.data', ['order' => $order, 'html_items' => []]);
+
+ return view('order_info', $data);
+ }
+}
\ No newline at end of file
diff --git a/beike/Shop/Routes/shop.php b/beike/Shop/Routes/shop.php
index ff180a80..75018e2e 100644
--- a/beike/Shop/Routes/shop.php
+++ b/beike/Shop/Routes/shop.php
@@ -56,6 +56,8 @@ Route::prefix('/')
Route::post('login', [LoginController::class, 'store'])->name('login.store');
Route::get('logout', [LogoutController::class, 'index'])->name('logout');
+ Route::get('orders/{number}', [\Beike\Shop\Http\Controllers\OrderController::class, 'show'])->name('orders.show');
+
Route::get('page_categories', [PageCategoryController::class, 'home'])->name('page_categories.home');
Route::get('page_categories/{page_category}', [PageCategoryController::class, 'show'])->name('page_categories.show');
Route::get('pages/{page}', [PageController::class, 'show'])->name('pages.show');
diff --git a/themes/default/account/order_info.blade.php b/themes/default/account/order_info.blade.php
index 7ef543d6..03423c8d 100644
--- a/themes/default/account/order_info.blade.php
+++ b/themes/default/account/order_info.blade.php
@@ -10,235 +10,8 @@
| {{ __('shop/account.order.order_info.order_number') }} | -{{ __('shop/account.order.order_info.order_date') }} | -{{ __('shop/account.order.order_info.state') }} | -{{ __('shop/account.order.order_info.order_amount') }} | -
|---|---|---|---|
| {{ $order->number }} | -{{ $order->created_at }} | -- {{$order->status_format}} - | -{{ currency_format($order->total, $order->currency_code, $order->currency_value) }} | -
| {{ __('order.shipping_address') }} | -{{ __('order.payment_address') }} | -
|---|---|
|
- {{ __('address.name') }}:{{ $order->shipping_customer_name }} ({{ $order->shipping_telephone }})
-
- {{ __('address.address') }}:
- {{ $order->shipping_address_1 }}
- {{ $order->shipping_address_2 }}
- {{ $order->shipping_city }}
- {{ $order->shipping_zone }}
- {{ $order->shipping_country }}
-
- {{ __('address.post_code') }}:{{ $order->shipping_zipcode }}
- |
-
- {{ __('address.name') }}:{{ $order->payment_customer_name }} ({{ $order->payment_telephone }})
-
- {{ __('address.address') }}:
- {{ $order->payment_address_1 }}
- {{ $order->payment_address_2 }}
- {{ $order->payment_city }}
- {{ $order->payment_zone }}
- {{ $order->payment_country }}
-
- {{ __('address.post_code') }}:{{ $order->payment_zipcode }}
- |
-
| {{ $total->title }} | -{{ currency_format($total->value, $order->currency_code, $order->currency_value) }} | - @endforeach -
| {{ __('order.express_company') }} | -{{ __('order.express_number') }} | -{{ __('order.history_created_at') }} | -
|---|---|---|
| {{ $ship->express_company }} | -{{ $ship->express_number }} | -{{ $ship->created_at }} | -
| {{ __('shop/account.order.order_info.state') }} | -{{ __('shop/account.order.order_info.remark') }} | -{{ __('shop/account.order.order_info.update_time') }} | -
|---|---|---|
| {{ $orderHistory->status_format }} | -{{ $orderHistory->comment }} | -{{ $orderHistory->created_at }} | -
| {{ __('shop/account.order.order_info.order_number') }} | +{{ __('shop/account.order.order_info.order_date') }} | +{{ __('shop/account.order.order_info.state') }} | +{{ __('shop/account.order.order_info.order_amount') }} | +
|---|---|---|---|
| {{ $order->number }} | +{{ $order->created_at }} | ++ {{$order->status_format}} + | +{{ currency_format($order->total, $order->currency_code, $order->currency_value) }} | +
| {{ __('order.shipping_address') }} | +{{ __('order.payment_address') }} | +
|---|---|
|
+ {{ __('address.name') }}:{{ $order->shipping_customer_name }} ({{ $order->shipping_telephone }})
+
+ {{ __('address.address') }}:
+ {{ $order->shipping_address_1 }}
+ {{ $order->shipping_address_2 }}
+ {{ $order->shipping_city }}
+ {{ $order->shipping_zone }}
+ {{ $order->shipping_country }}
+
+ {{ __('address.post_code') }}:{{ $order->shipping_zipcode }}
+ |
+
+ {{ __('address.name') }}:{{ $order->payment_customer_name }} ({{ $order->payment_telephone }})
+
+ {{ __('address.address') }}:
+ {{ $order->payment_address_1 }}
+ {{ $order->payment_address_2 }}
+ {{ $order->payment_city }}
+ {{ $order->payment_zone }}
+ {{ $order->payment_country }}
+
+ {{ __('address.post_code') }}:{{ $order->payment_zipcode }}
+ |
+
| {{ $total->title }} | +{{ currency_format($total->value, $order->currency_code, $order->currency_value) }} | + @endforeach +
| {{ __('order.express_company') }} | +{{ __('order.express_number') }} | +{{ __('order.history_created_at') }} | +
|---|---|---|
| {{ $ship->express_company }} | +{{ $ship->express_number }} | +{{ $ship->created_at }} | +
| {{ __('shop/account.order.order_info.state') }} | +{{ __('shop/account.order.order_info.remark') }} | +{{ __('shop/account.order.order_info.update_time') }} | +
|---|---|---|
| {{ $orderHistory->status_format }} | +{{ $orderHistory->comment }} | +{{ $orderHistory->created_at }} | +