p $_type = "parent"; $_typeid = intval($cid); $_category = new app\index\model\CategoryModel(); $_catlist = $_category->getCategory(1); if ($_type == 'parent') { $_parent = $_category->getParents($_catlist, $_typeid); $_typeid = $_parent[0]['id']; } $type = $_category->getOneCategory($_typeid); $type['url'] = $_category->getCategoryUrl($type); $type = update_str_dq($type, config('sys.sys_area')); ?>