$cat, 'catRoot' => $catRoot, 'catChildren' => $catChildren, 'catRootChildren' => $catRootChildren, 'catChain' => $catChain, ]; } protected function getView($data, $key) { $cat = $data['cat']; $model = $cat['_model']; $view = $cat[$key]; if (empty($view)) { $view = $model[$key]; } BizException::throwsIfEmpty('模板未找到', $view); return $view; } }