feature: xterm依赖修复 token修复

This commit is contained in:
wanghaoyu
2019-12-26 18:06:51 +08:00
parent 9d5d816aa7
commit 5be6d7831a
4 changed files with 15 additions and 2 deletions

View File

@@ -11664,6 +11664,11 @@
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true
},
"xterm": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/xterm/download/xterm-3.1.0.tgz",
"integrity": "sha1-f34cjPS4C9iBpOiJEhO4UUI+kMk="
},
"xxhashjs": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz",

View File

@@ -15,7 +15,8 @@
"vue": "^2.5.2",
"vue-i18n": "^8.15.1",
"vue-router": "^3.0.1",
"vuex": "^3.1.2"
"vuex": "^3.1.2",
"xterm": "^3.1.0"
},
"devDependencies": {
"autoprefixer": "^7.1.2",

View File

@@ -0,0 +1,7 @@
import { Terminal } from 'xterm'
import * as fit from 'xterm/lib/addons/fit/fit'
import * as attach from 'xterm/lib/addons/attach/attach'
Terminal.applyAddon(fit)
Terminal.applyAddon(attach)
export default Terminal

View File

@@ -95,7 +95,7 @@ router.beforeEach((to, from, next) => {
if (to.path === '/login') {
next()
} else {
let token = sessionStorage.getItem('token');
let token = sessionStorage.getItem('nz-token');
if (token) {
next()
} else {