|
|
|
|
|
# Doc
|
|
|
|
|
|
## <span class="" style="color:blue;">GET</span> /doc/menu
|
|
|
### Description
|
|
|
根據使用者權限獲取文件菜單
|
|
|
|
|
|
|
|
|
### Parameter
|
|
|
|
|
|
| Parameter | Description | Example | Parameter Type | Data Type |
|
|
|
| ----------|---------------| -------| -----| ------|
|
|
|
| menuName | menu name,menu tree 節點的唯一名 | Guides\_and\_API\_References | query | string |
|
|
|
| level | 取得從 menuName 節點往下的 n 階層內的所有節點,若沒有指定則取得從 menuName 節點往下的所有節點 | 3 | query | int |
|
|
|
| lang | 語言key,或沒有指定則回傳英文文件菜單 | 1 | query | int |
|
|
|
|
|
|
### Response Body
|
|
|
|
|
|
``` javascript
|
|
|
{
|
|
|
"status": "success",
|
|
|
"menu": {
|
|
|
"id": 1,
|
|
|
"menuName": "Guides_and_API_References",
|
|
|
"forumLink": "https://forum.wise-paas.advantech.com/articles/128/test0509.html",
|
|
|
"order": 1,
|
|
|
"status": 1,
|
|
|
"level": 1,
|
|
|
"subtitle": "",
|
|
|
"title": "Guides and API References",
|
|
|
"type": "menu",
|
|
|
"children": [
|
|
|
{
|
|
|
"id": 10,
|
|
|
"menuName": "Industrial_IoT_Cloud_Platform",
|
|
|
"forumLink": "https://forum.wise-paas.advantech.com/articles/128/test0509.html",
|
|
|
"order": 1,
|
|
|
"status": 1,
|
|
|
"level": 2,
|
|
|
"subtitle": [{lang:1, subtitle: 'WISE-PaaS'}, {lang:2, subtitle: 'WISE-PaaS'}, {lang:3, subtitle: 'WISE-PaaS'}],
|
|
|
"title": [{lang:1, title: 'Industrial IoT Cloud Platform'}, {lang:2, title: 'Industrial IoT Cloud Platform'}, {lang:3, title: 'Industrial IoT Cloud Platform'}],
|
|
|
"type": "menu"
|
|
|
},
|
|
|
{
|
|
|
"docId": 1,
|
|
|
"docType": "M.D.",
|
|
|
"docName": "Quick_Start_Guide",
|
|
|
"forumLink": "https://forum.wise-paas.advantech.com/articles/128/test0509.html",
|
|
|
"order": 2,
|
|
|
"status": 1,
|
|
|
"title": [{lang:1, title: 'Quick Start Guide'}, {lang:2, title: '开始使用'}, {lang:3, title: '開始使用'}],
|
|
|
"subtitle": [{lang:1, subtitle: ''}, {lang:2, subtitle: ''}, {lang:3, subtitle: ''}],
|
|
|
"level": 2,
|
|
|
"type": "doc"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
"lang": 1
|
|
|
}
|
|
|
```
|
|
|
|
|
|
##### Field
|
|
|
| Field Name | Description | Example | Data Type |
|
|
|
| -----------|---------------| -------| -------|
|
|
|
| status | 成功或失敗 | success | string |
|
|
|
| message | 失敗訊息 | Menu Name does not exist | string |
|
|
|
| menu | menu 物件 | 如上範例 | object |
|
|
|
| menu.type | 此節點類型,目前分兩種:menu, doc| menu | string |
|
|
|
| menu.title | 此節點各語言名稱 |[{lang:1, title: 'Quick Start Guide'}, {lang:2, title: '开始使用'}, {lang:3, title: '開始使用'}] | array |
|
|
|
| menu.subtitle | 此節點各語言副名稱| [{lang:1, subtitle: 'WISE-PaaS'}, {lang:2, subtitle: 'WISE-PaaS'}, {lang:3, subtitle: 'WISE-PaaS'}] | array |
|
|
|
| menu.order | 此節點在此層中的排序 | 2 | int |
|
|
|
| menu.status | 此節點狀態,若為 1 則可顯示在前台 | 1 | int |
|
|
|
| menu.level | 此節點從根目錄算起的階層 | 2 | int |
|
|
|
| menu.id | 若類型為 menu,則節點會有 menu id | 10 | int |
|
|
|
| menu.menuName | 若類型為 menu,則節點會有 menu name | Guides_and_API_References | string |
|
|
|
| menu.docId | 若類型為 doc,則節點會有 doc id | 14 | int |
|
|
|
| menu.docName | 若類型為 doc,則節點會有 doc name | Quick_Start_Guide | string |
|
|
|
| menu.docType | 若類型為 doc,則節點會有 doc type | M.D. | string |
|
|
|
| menu.forumLink | 節點 forum link| 如上範例 | string |
|
|
|
| lang | 此 menu 的語言 | 1 | int | |
|
|
\ No newline at end of file |