<#if !parentId??> [{ "name": "当前栏目", "click":"setChannelo('当前栏目','0')", "open": true <#if list?size gt 0>, "isParent": true, "children": [ <#list list as channel> { "parentId": "${channel.id}", "name": "${channel.name!}", "click":"setChannelo('${channel.name!}','${channel.id}')", <#if channel.child?size gt 0> "isParent": true, "open": false <#else> "isParent": false }<#if channel_has_next>, ] }] <#else> [ <#list list as channel> { "parentId": "${channel.id}", "name": "${channel.name!}", "click":"setChannelo('${channel.name!}','${channel.id}')", <#if channel.child?size gt 0> "isParent": true, "open": false <#else> "isParent": false }<#if channel_has_next>, ]