6
0
Fork 0

取消计算运费调试

release
vine_liutk 2021-12-13 11:23:43 +08:00
parent 41e8fbf13b
commit 385cf0d936
2 changed files with 1 additions and 5 deletions

View File

@ -3,16 +3,12 @@
namespace App\Admin\Controllers;
use App\Http\Controllers\Controller;
use App\Services\ShippingService;
use Dcat\Admin\Layout\Content;
class HomeController extends Controller
{
public function index(Content $content)
{
$shippingService = new ShippingService();
$amount = $shippingService->countShippingAmount(3560, 2000, 1, 2225);
dd($amount);
return $content
->header('Dashboard')
->description('Description...');

View File

@ -23,7 +23,7 @@ class ShippingService
//如果该模板下无运费规则,则直接包邮
if ($rules->count() > 0) {
//按包邮/计重
$rules = $rules->sortBy('type');
$rules = $rules->sortBy('type');//优先计算包邮
foreach ($rules as $rule) {
$canShipping = false;
$_ruleInfo = json_decode($rule->info, true);