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; } // 实际支付金额=商品总金额-优惠卷金额+运费金额