bindModels(); //$this->setting = \app\common\modules\shop\ShopConfig::current()->get('shop-foundation.order'); } private function bindModels() { $this->bind('ShopCart', function ($cartManager, $attributes) { return new ShopCart($attributes); }); $this->bind('MemberCart', function ($cartManager, $attributes) { return new MemberCart($attributes); }); $this->bind('CartGoods', function ($cartManager, $attributes) { return new CartGoods($attributes); }); /** * 购物车分组模型 */ $this->singleton('CartGroupManager', function ($deductionSettingManager) { return new CartGroupManager(); }); /** * 购物车商品模型 */ $this->singleton('CartGoodsManager', function ($deductionSettingManager) { return new CartGoodsManager(); }); } }