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(); } /**