{php} // 获取一级联动数据 $level_one = get_level_data($form[type]['table'], 0, $form[type]['pid']); $level_key = []; $level_data = []; // 有默认值 if ($form[type]['value'] != '') { $level_key_data = get_level_key_data($form[type]['table'], $form[type]['value'], $form[type]['key'], $form[type]['option'], $form[type]['pid']); $level_key = $level_key_data['key']; $level_data = $level_key_data['data']; sort($level_key); $level_data = array_reverse($level_data); } {/php}