From c699abfd6f356f5cce878570cd9eddd410f11701 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 25 Jun 2024 17:37:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(ProductLists.php):=20=E6=A0=B9=E6=8D=AEoff?= =?UTF-8?q?=5Factivity=E9=85=8D=E7=BD=AE=E5=8A=A8=E6=80=81=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/lists/product/ProductLists.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/app/api/lists/product/ProductLists.php b/app/api/lists/product/ProductLists.php index ef91ba000..763bdddbd 100644 --- a/app/api/lists/product/ProductLists.php +++ b/app/api/lists/product/ProductLists.php @@ -116,10 +116,19 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface, L public function extend() { $off_activity = Config::where('name', 'off_activity')->value('value'); - return [ - 'off_activity' => $off_activity, - 'price' => 'cost', - 'op_price' => 'price', - ]; + if($off_activity==1){ + $data=[ + 'off_activity' => $off_activity, + 'price' => 'cost', + 'op_price' => 'price', + ]; + }else{ + $data=[ + 'off_activity' => $off_activity, + 'price' => 'price', + 'op_price' => 'price', + ]; + } + return $data; } }