## 获取栏目分类
~~~[api]
get:index/Index/getType
<<<
success
{
"code": 1,
"msg": "获取成功",
"data": [
{
"id": 1,
"name": "政策信息",
"type": [
{
"id": 7,
"name": "导航分类一",
"navigation_id": 1,
"classify": [
{
"id": 15,
"name": "小分类一",
"pid": 0,
"status": 1,
"type_id": 7
}
]
},
{
"id": 8,
"name": "导航分类二",
"navigation_id": 1,
"classify": [
{
"id": 16,
"name": "小分类一",
"pid": 0,
"status": 1,
"type_id": 8
}
]
}
]
},
{
"id": 2,
"name": "企业数据库",
"type": [
{
"id": 4,
"name": "分类",
"navigation_id": 2,
"classify": [
{
"id": 9,
"name": "科技数据库",
"pid": 0,
"status": 1,
"type_id": 4
},
{
"id": 10,
"name": "本地数据库",
"pid": 0,
"status": 1,
"type_id": 4
}
]
},
{
"id": 5,
"name": "类别",
"navigation_id": 2,
"classify": [
{
"id": 11,
"name": "期刊",
"pid": 0,
"status": 1,
"type_id": 5
},
{
"id": 12,
"name": "学位",
"pid": 0,
"status": 1,
"type_id": 5
}
]
}
]
},
{
"id": 3,
"name": "金融服务",
"type": [
{
"id": 9,
"name": "金融服务分类",
"navigation_id": 3,
"classify": [
{
"id": 17,
"name": "金融小分类一",
"pid": 0,
"status": 1,
"type_id": 9
}
]
}
]
},
{
"id": 4,
"name": "数据库",
"type": [
{
"id": 10,
"name": "数据库",
"navigation_id": 4,
"classify": [
{
"id": 18,
"name": "mysql",
"pid": 0,
"status": 1,
"type_id": 10
}
]
}
]
},
{
"id": 5,
"name": "服务机构",
"type": [
{
"id": 1,
"name": "年份",
"navigation_id": 5,
"classify": [
{
"id": 1,
"name": "2019年",
"pid": 0,
"status": 1,
"type_id": 1
},
{
"id": 2,
"name": "2018年",
"pid": 0,
"status": 1,
"type_id": 1
},
{
"id": 5,
"name": "2017年",
"pid": 0,
"status": 1,
"type_id": 1
}
]
},
{
"id": 2,
"name": "学历",
"navigation_id": 5,
"classify": [
{
"id": 3,
"name": "分类一",
"pid": 0,
"status": 1,
"type_id": 2
},
{
"id": 4,
"name": "分类二",
"pid": 0,
"status": 1,
"type_id": 2
}
]
}
]
},
{
"id": 6,
"name": "专家库",
"type": [
{
"id": 3,
"name": "类别",
"navigation_id": 6,
"classify": [
{
"id": 6,
"name": "分类一",
"pid": 0,
"status": 1,
"type_id": 3
},
{
"id": 7,
"name": "分类二",
"pid": 0,
"status": 1,
"type_id": 3
},
{
"id": 8,
"name": "分类三",
"pid": 0,
"status": 1,
"type_id": 3
}
]
}
]
},
{
"id": 7,
"name": "数据统计",
"type": [
{
"id": 6,
"name": "数据统计分类",
"navigation_id": 7,
"classify": [
{
"id": 13,
"name": "分类一",
"pid": 0,
"status": 1,
"type_id": 6
},
{
"id": 14,
"name": "分类二",
"pid": 0,
"status": 1,
"type_id": 6
}
]
}
]
}
]
}
<<<
error
{
code:0
msg:"获取失败"
}
~~~
### 返回字段说明
| 字段 | 说明 |
| --- | --- |
| id | 导航的ID |
| name | 导航名 |
| type | 导航下面的分类 |
| type-id | 分类id |
| type-name | 分类名字 |
| type-navigation_id | 导航id |
| classify | 导航下面的分类的子分类 |
| classify-id | 导航下面的分类的分类id |
| classify-name | 导航下面的分类的分类名字 |
| classify-type_id | 导航下面的分类的导航id |