## 菜單配置
> 詳見文檔的前端開發指南部分
#### 方式一 動態路由配置

* 記得在角色菜單為該用戶分配該新添加的菜單權限
#### 方式二 固定路由配置
* `src/router/router.js`
~~~
// 作為Main組件的子頁面展示但是不在左側菜單顯示的路由寫在otherRouter里
export const otherRouter = {
path: '/',
name: 'otherRouter',
redirect: '/home',
component: Main,
children: [
{ path: 'test', title: '測試頁面', name: 'test', component: () => import('@/views/xboot-vue-generator/test.vue') },
]
};
~~~
## 頁面編寫
~~~
// test.vue文件
<template>
<div>
<Card>
<h1>代碼生成測試頁 可將生成的代碼全部粘貼至此test.vue文件</h1>
</Card>
</div>
</template>
~~~
## 獲取后臺數據
文件可以被訪問后,接下來就是完善界面信息,從后臺獲取數據。獲取數據的方法都寫在和文件對應的api文件夾中。
### axios()函數
axios()可以設置全局的配置,例如請求頭信息,攔截器等,這樣的好處是可以避免重復配置。`src/libs/axios.js`中已封裝好各種請求方法。
關于axios()的使用可以參考:[http://www.hmoore.net/yunye/axios/234845](http://www.hmoore.net/yunye/axios/234845)