##菜单配置
>按照习惯,后台配置第一项,就是导航菜单
* * * * *
~~~javascript
return {
"title":"JPHP-ELEMENT管理后台", //后台标题
"menus": [ // 菜单列表
{
"index" : "1", //菜单索引
"title" : "文章中心",//菜单标题
"submenus" : [ //子菜单,可以没有
{
"index" : "1",
"title" : "栏目AA",
"url":"lm/id/1/json.php" //菜单路由地址,返回表格或表单渲染数据
},{
"index" : "2", "title" : "栏目BB","url":"/form.txt"
},{
"index" : "3", "title" : "栏目CC","url":"/table.txt"
}
]
} //,{}...
],
"current": 1 //默认选中的菜单
}
~~~
菜单数据从哪里返回?在这里:
~~~
//页面首次加载时会从后台读取菜单数据,后台地址在index.html中定义
// 入口地址
window.bench = "/myMenu/json.php";
~~~