This commit is contained in:
Pan
2017-05-16 11:08:17 +08:00
parent 0da4e5e5a7
commit 4bed888e9d
8 changed files with 22 additions and 25 deletions

View File

@@ -64,11 +64,11 @@ const Permission = resolve => require(['../views/permission/index'], resolve);
Vue.use(Router);
/**
* icon :the icon show in the sidebar
* hidden: if hiddenLtrue will not show in the sidebar
* redirect :if redirect:noredirect will not redirct in the levelbar
* icon : the icon show in the sidebar
* hidden : if hidden:true will not show in the sidebar
* redirect : if redirect:noredirect will not redirct in the levelbar
* noDropdown : if noDropdown:true will not has submenu
* meta: { role: ['admin'] } will control the page role
* meta : { role: ['admin'] } will control the page role
*/
export default new Router({
// mode: 'history', //后端支持可开

View File

@@ -79,7 +79,7 @@ const user = {
},
// 获取用户信息
// 获取用户信息
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
getInfo(state.token).then(response => {
@@ -125,7 +125,7 @@ const user = {
});
},
// 前端 登出
// 前端 登出
FedLogOut({ commit }) {
return new Promise(resolve => {
commit('SET_TOKEN', '');

View File

@@ -37,19 +37,22 @@
$transparent-border-style: $width solid transparent;
height: 0;
width: 0;
@if $direction == up {
@if $direction==up {
border-bottom: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
} @else if $direction == right {
}
@else if $direction==right {
border-left: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
} @else if $direction == down {
}
@else if $direction==down {
border-top: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
} @else if $direction == left {
}
@else if $direction==left {
border-right: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;

View File

@@ -12,7 +12,6 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
// Do something before request is sent
console.log(store.getters.token)
if (store.getters.token) {
config.headers['X-Token'] = store.getters.token; // 让每个请求携带token--['X-Token']为自定义key 请根据实际情况自行修改
}
@@ -28,9 +27,8 @@ service.interceptors.response.use(
response => response
/**
* 下面的注释为通过response自定义code来标示请求状态当code返回如下情况为权限有问题登出并返回到登录页
* 如通过htmlrequest 状态码标 逻辑可写在下面error中
* 如通过xmlhttprequest 状态码标 逻辑可写在下面error中
*/
// const code = response.data.code;
// // 50014:Token 过期了 50012:其他客户端登录了 50008:非法的token
// if (code === 50008 || code === 50014 || code === 50012) {

View File

@@ -1,8 +1,6 @@
/**
* Created by jiachenpan on 16/11/18.
*/
import showdown from 'showdown' // markdown转化
const converter = new showdown.Converter();
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
@@ -214,6 +212,3 @@
}
}
export function showdownMD(md) {
return converter.makeHtml(md)
}

View File

@@ -321,8 +321,8 @@
},
handleFetchPv(pv) {
fetchPv(pv).then(response => {
this.pvData = response.pvData
this.dialogPvVisible = true
this.pvData = response.data.pvData;
this.dialogPvVisible = true;
})
},
handleDownload() {