getHandlers(); array_push($handlers, ...$this->extra($form->mall_id)); foreach ($handlers as $handler) { $item = $handler::compute($form); if ($item === false) throw new Exception($handler::getStaticError()); } return $form; } catch (Exception $e) { $this->setError($e->getMessage(),$e->getCode()); return false; } } /** * 门店是否需要加进去 * @param $mall_id * @return array */ protected function extra($mall_id) { $extra = []; if (MallAddons::isInstall($mall_id, AddonsEnum::ADDONS_NAME_QI_DING_DONG)) { $extra[] = \addons\QiDingDong\common\logic\OrderLimitLogic::class; } if (MallAddons::isInstall($mall_id, AddonsEnum::ADDONS_NAME_QI_SHANG_TONG)) { $extra[] = \addons\QiShangTong\common\logic\OrderLimitLogic::class; } return $extra; } }