From 7c1c63cbbf7d7ca0393cf2b122ec5ba571bb99cd Mon Sep 17 00:00:00 2001 From: haomingming Date: Mon, 22 Dec 2025 10:16:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E8=BF=90?= =?UTF-8?q?=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientOrderService.php | 38 +++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index 737696a..e4f03c4 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -1677,18 +1677,17 @@ class PatientOrderService extends BaseService // 处理运费数据 $app_env = config('app_env', 'prod'); - if ($app_env != "dev") { - // 获取运费金额 - $Prescription = new Prescription(); - - $result = $Prescription->getLogisticsFee(); - if ($freight_calculation_amount >= $result['drugCost']) { - $logistics_fee = 0; - } else { - $logistics_fee = $result['freight']; - } - } else { - $logistics_fee = 0; + if (env("APP_ENV") == "prod") { + // $Prescription = new Prescription(); + // $result = $Prescription->getLogisticsFee(); + // if ($freight_calculation_amount < $result['drugCost']) { + // $logistics_fee = $result['freight']; + // } + //测试环境 运费 + $logistics_fee = 6; + }else{ + //测试环境 运费 + $logistics_fee = 1.9; } // 实际支付金额=商品总金额-优惠卷金额+运费金额 @@ -2291,11 +2290,16 @@ class PatientOrderService extends BaseService // 获取运费金额 $logistics_fee = 0; if (env("APP_ENV") == "prod") { - $Prescription = new Prescription(); - $result = $Prescription->getLogisticsFee(); - if ($freight_calculation_amount < $result['drugCost']) { - $logistics_fee = $result['freight']; - } + // $Prescription = new Prescription(); + // $result = $Prescription->getLogisticsFee(); + // if ($freight_calculation_amount < $result['drugCost']) { + // $logistics_fee = $result['freight']; + // } + //测试环境 运费 + $logistics_fee = 6; + }else{ + //测试环境 运费 + $logistics_fee = 1.9; } // 实际支付金额=商品总金额-优惠卷金额+运费金额