From 388581f70746d8a49b1fdf7ed978b06cd458dbdd Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 15 Aug 2024 09:09:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(CartList):=20=E6=A0=B9=E6=8D=AE=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AD=89=E7=BA=A7=E8=B0=83=E6=95=B4=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/lists/cart/CartList.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/store/lists/cart/CartList.php b/app/store/lists/cart/CartList.php index 3d872d49f..fdbd21fab 100644 --- a/app/store/lists/cart/CartList.php +++ b/app/store/lists/cart/CartList.php @@ -62,15 +62,16 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists if ($this->request->get('uid')) { $uid = $this->request->get('uid'); } + $user_ship=0; if ($uid > 0) { $user_ship = User::where('id', $uid)->value('user_ship'); - if (in_array($user_ship, [4, 5, 6, 7])) { + if (in_array($user_ship, [4, 6, 7])) { $off_activity = 1; } } foreach ($list as $key => &$item) { $find = StoreBranchProduct::where(['product_id' => $item['product_id'], 'store_id' => $item['store_id']]) - ->field('product_id,image,price,cost,store_name,unit,delete_time,vip_price') + ->field('product_id,image,price,cost,store_name,unit,delete_time,vip_price,top_cate_id') ->withTrashed() ->find(); if ($find) { @@ -79,6 +80,9 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists $item['price'] = $find['cost']; } else { $item['price'] = $find['price']; + if ($find['top_cate_id'] == 15189 && $user_ship == 5) { + $item['price'] = $find['cost']; + } } $item['pay_price'] = bcmul($item['cart_num'], $item['price'], 2); $item['total_price'] = bcmul($item['cart_num'], $find['price'], 2);