diff --git a/beike/Admin/Http/Controllers/ProductController.php b/beike/Admin/Http/Controllers/ProductController.php index e2222802..2435c2ee 100644 --- a/beike/Admin/Http/Controllers/ProductController.php +++ b/beike/Admin/Http/Controllers/ProductController.php @@ -45,12 +45,14 @@ class ProductController extends Controller $requestData = $request->all(); $requestData['trashed'] = true; $productList = ProductRepo::list($requestData); - $products = ProductResource::collection($productList)->resource; + $products = ProductResource::collection($productList); + $productsFormat = $products->jsonSerialize(); $data = [ - 'categories' => CategoryRepo::flatten(locale()), - 'products' => $products, - 'type' => 'trashed', + 'categories' => CategoryRepo::flatten(locale()), + 'products_format' => $productsFormat, + 'products' => $products, + 'type' => 'trashed', ]; $data = hook_filter('admin.product.trashed.data', $data); diff --git a/beike/Shop/Services/TotalService.php b/beike/Shop/Services/TotalService.php index 6fec997b..cd98af87 100644 --- a/beike/Shop/Services/TotalService.php +++ b/beike/Shop/Services/TotalService.php @@ -64,7 +64,7 @@ class TotalService { $addressInfo = [ 'shipping_address' => $this->currentCart->shippingAddress ?? $this->currentCart->guest_shipping_address, - 'payment_address' => $this->currentCart->paymentAddress ?? $this->currentCart->guest_payment_address, + 'payment_address' => $this->currentCart->paymentAddress ?? $this->currentCart->guest_payment_address, ]; $taxLib = Tax::getInstance($addressInfo);