# log-system **Repository Path**: david_gdg/log-system ## Basic Information - **Project Name**: log-system - **Description**: 充电桩日志查看系统 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-03-06 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # log-system > A Vue.js project ## Build Setup ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). ###设置登录拦截 1. 在login.vue中将登录状态写入web Storage里(一般写入session Storage,会话关闭,存储数据自动删除): `sessionStorage.setItem('accessToken' , '写入登录成功返回的登录令牌或者自定义的判断字符串');` 2. 在全局main.js钩子函数beforeEach中验证页面是否需要登录: `sessionStorage.getItem('accessToken') =='yes'`