From 8456a5f935424f02da3a1afcf3f512cdeb33da48 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Fri, 31 Mar 2023 17:08:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E7=89=A9=E6=B5=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=87=91=E9=A2=9D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/api/controller/v1/order/StoreOrderController.php | 8 ++++++++ template/uni-app/pages/goods/goods_logistics/index.vue | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/crmeb/app/api/controller/v1/order/StoreOrderController.php b/crmeb/app/api/controller/v1/order/StoreOrderController.php index 40643831f..b78c201dd 100644 --- a/crmeb/app/api/controller/v1/order/StoreOrderController.php +++ b/crmeb/app/api/controller/v1/order/StoreOrderController.php @@ -467,8 +467,14 @@ class StoreOrderController /** * 订单 查看物流 * @param Request $request + * @param StoreOrderCartInfoServices $services + * @param ExpressServices $expressServices * @param $uni + * @param string $type * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function express(Request $request, StoreOrderCartInfoServices $services, ExpressServices $expressServices, $uni, $type = '') { @@ -484,6 +490,7 @@ class StoreOrderController foreach ($order['cart_info'] as $k => $cart) { $cartNew['cart_num'] = $cart['cart_num']; $cartNew['truePrice'] = $cart['truePrice']; + $cartNew['postage_price'] = $cart['postage_price']; $cartNew['productInfo']['image'] = $cart['productInfo']['image']; $cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name']; $cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? ''; @@ -507,6 +514,7 @@ class StoreOrderController $cart = json_decode($cart, true); $cartNew['cart_num'] = $cart['cart_num']; $cartNew['truePrice'] = $cart['truePrice']; + $cartNew['postage_price'] = $cart['postage_price']; $cartNew['productInfo']['image'] = $cart['productInfo']['image']; $cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name']; $cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? ''; diff --git a/template/uni-app/pages/goods/goods_logistics/index.vue b/template/uni-app/pages/goods/goods_logistics/index.vue index cc385c3d8..c9f8bc871 100644 --- a/template/uni-app/pages/goods/goods_logistics/index.vue +++ b/template/uni-app/pages/goods/goods_logistics/index.vue @@ -8,7 +8,7 @@ {{item.productInfo.store_name}} - {{$t(`¥`)}}{{item.truePrice}} + {{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price/item.cart_num)).toFixed(2)}} x{{item.cart_num}}