1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
{{#each children}} {{#withPerm auth}} {{#if children}} <li class="nav-list son-nav-list {{#each children}}{{#indexOf href ../../_PATH_ }}nav-open{{/indexOf}}{{/each}}" data-auth="{{auth}}"> <a class="nav-list-header son-nav-list-header" href="javascript:;"> <span class="subnav-header"> <label> {{name}}</label> {{#if children}}<span><i class="icon-spinda icon-spinda-xiangxiazhedie"></i></span>{{/if}} </span> </a> <ul class="nav-list-body"> {{> component:user/sidebar_container/backend_templates/block}} </ul> {{else}} <li class="subnav-list {{#indexOf href ../../_PATH_}}active{{/indexOf}}" data-auth="{{auth}}"> <a href="{{href}}"{{#if blank}} target="_blank"{{/if}} class="subnav-list-header">{{name}}</a> {{/if}} </li> {{/withPerm}} {{/each}} |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
{{#each _DATA_.navs}} {{#withPerm auth}} <li class="nav-list {{#each children}}{{#indexOf href ../../_PATH_ }}nav-open{{/indexOf}}{{/each}}" data-auth="{{auth}}"> <a class="nav-list-header father-nav-list-header" href="{{#if children}}javascript:;{{else}}{{href}}{{/if}}"> <span class="nav-icon"><em class="icon-spinda {{icon}}"></em></span> <span class="nav-header"> <label> {{name}}</label> {{#if children}}<span><i class="icon-spinda icon-spinda-xiangxiazhedie"></i></span>{{/if}} </span> </a> {{#if children}} <ul class="nav-list-body"> {{> component:user/sidebar_container/backend_templates/block}} </ul> {{/if}} </li> {{/withPerm}} {{/each}} |
数据源:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
{ "_DATA_": { "name": "运营端", "navs": [ { "name": "免税类目管理", "icon": "icon-spinda icon-spinda-categories", "auth": "manage_back_category,manage_front_category,manage_back_category_edit,manage_back_category_delete,manage_back_category_add,manage_back_category_attr_add,manage_back_category_attr_detail,manage_back_category_attr_edit,manage_back_category_attr_delete", "children": [ { "name": "后台类目", "href": "/categories/free-backend", "auth": "manage_back_category,manage_back_category_edit,manage_back_category_delete,manage_back_category_add,manage_back_category_attr_add,manage_back_category_attr_detail,manage_back_category_attr_edit,manage_back_category_attr_delete" }, { "name": "付款建议", "href": "/settlement/advise-detail", "auth": "" }, { "name": "支付渠道日汇总", "href": "/settlement/channel-sum", "auth": "" }, { "name": "平台优惠券日汇总", "href": "/settlement/coupon-sum", "auth": "" }--}} ] }, { "name": "数据中心", "icon": "icon-spinda icon-spinda-cnshuju", "auth": "manage_traffic_analysis, manage_transaction_analysis", "children": [ { "name": "流量分析", "href": "/data-center/traffic-analysis", "auth": "manage_traffic_analysis" }, { "name": "交易分析", "href": "/data-center/transaction-analysis", "auth": "manage_transaction_analysis" }, { "name": "实时分析", "href": "/data-center/real-time-analysis", "auth": "manage_real_time_analysis" }, { "name": "商品分析", "href": "/data-center/items-analysis", "auth": "manage_items_analysis" }, { "name": "会员分析", "href": "/data-center/member-analysis", "auth": "manage_member_analysis" } ] }, { "name": "账户信息", "icon": "icon-spinda icon-spinda-gerenxinxi", "auth": "", "children": [ { "name": "个人资料", "href": "/user/profile" }, { "name": "修改密码", "href": "/user/update-password" } ] } ] } } |