From f8bd13f8df08acfabaefe2c7b7d4f9458b21c5d8 Mon Sep 17 00:00:00 2001 From: ZweiCD <416931358@qq.com> Date: Fri, 4 Sep 2020 11:53:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BF=AB=E9=80=92=E5=9B=9E?= =?UTF-8?q?=E4=BC=A0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/express_choose.php | 3 +++ src/WmsStrategy.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/express_choose.php b/config/express_choose.php index 28d16a7..c0688f1 100644 --- a/config/express_choose.php +++ b/config/express_choose.php @@ -9,10 +9,12 @@ return [ [ 'code' => 'CN7000001000869', 'name' => '安能快运', + 'is_default' => false, ], [ 'code' => 'CN7000001003751', 'name' => '跨越', + 'is_default' => false, ], ], @@ -20,6 +22,7 @@ return [ [ 'code' => 'STO', 'name' => '申通', + 'is_default' => false, ], ] ], diff --git a/src/WmsStrategy.php b/src/WmsStrategy.php index 591a4d1..bbb94bb 100644 --- a/src/WmsStrategy.php +++ b/src/WmsStrategy.php @@ -146,7 +146,8 @@ class WmsStrategy { $expressChooseConf = require(dirname(dirname(__FILE__)) . '/config/express_choose.php'); $type = self::getOrderType($province, $weight, $expressChooseConf); - return $expressChooseConf['logistics'][$type]; + $expressChooseConf['logistics'][$type][0]['is_default'] = true; + return collect([$expressChooseConf['logistics']['toC'], $expressChooseConf['logistics']['toB']])->collapse()->all(); } /**