[ 'title' => get_lang('dict_diy.page_index'), 'page' => '/app/pages/index/index', 'action' => 'decorate' // 页面是否装修标识,为空标识不装修,decorate:装修 ], 'DIY_MEMBER_INDEX' => [ 'title' => get_lang('dict_diy.page_member_index'), 'page' => '/app/pages/member/index', 'action' => 'decorate' ], 'DIY_PAGE' => [ 'title' => get_lang('dict_diy.page_diy'), 'page' => '/app/pages/index/diy', 'action' => '' ] ]; $pages = ( new DictLoader("UniappTemplate") )->load($system_pages); if (!empty($params[ 'type' ])) { $temp = []; foreach ($params[ 'type' ] as $k => $v) { if (!empty($pages[ $v ])) { $temp[ $v ] = $pages[ $v ]; } } return $temp; } if (!empty($params[ 'action' ])) { $temp = []; foreach ($pages as $k => $v) { if (isset($v[ 'action' ]) && $params[ 'action' ] == $v[ 'action' ]) { $temp[ $k ] = $v; } } return $temp; } return $pages; } }