修复:登陆改为登录
This commit is contained in:
parent
b2f44877a5
commit
85df20b775
@ -197,7 +197,6 @@ export default {
|
|||||||
fileName,
|
fileName,
|
||||||
{ type: response.type }
|
{ type: response.type }
|
||||||
);
|
);
|
||||||
console.log(file)
|
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
data.append("files", file)
|
data.append("files", file)
|
||||||
data.append("username", that.$store.state.user.name)
|
data.append("username", that.$store.state.user.name)
|
||||||
|
|||||||
@ -21,12 +21,12 @@ router.beforeEach(async(to, from, next) => {
|
|||||||
if (hasToken) {
|
if (hasToken) {
|
||||||
// 已登录的情况
|
// 已登录的情况
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
// 登陆页面
|
// 登录页面
|
||||||
// 如果已登录,则重定向到主页
|
// 如果已登录,则重定向到主页
|
||||||
setMenuList(next, { path: '/' })
|
setMenuList(next, { path: '/' })
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
// 非登陆页面
|
// 非登录页面
|
||||||
const hasGetUserInfo = store.getters.name
|
const hasGetUserInfo = store.getters.name
|
||||||
if (hasGetUserInfo) {
|
if (hasGetUserInfo) {
|
||||||
// 存在用户信息
|
// 存在用户信息
|
||||||
@ -46,7 +46,7 @@ router.beforeEach(async(to, from, next) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 没有登陆的情况
|
// 没有登录的情况
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 没有token但是在白名单中,直接进入
|
// 没有token但是在白名单中,直接进入
|
||||||
next()
|
next()
|
||||||
|
|||||||
@ -54,7 +54,7 @@ service.interceptors.response.use(
|
|||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
const hasToken = getToken()
|
const hasToken = getToken()
|
||||||
if(hasToken){
|
if(hasToken){
|
||||||
MessageBox.confirm('登录已失效,可以取消停留在此页面上,或者再次登录', '确认登出', {
|
MessageBox.confirm('登录已失效,请重新登录', '确认登出', {
|
||||||
confirmButtonText: '重新登录',
|
confirmButtonText: '重新登录',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|||||||
@ -44,7 +44,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
title: '网盘管理',
|
title: '网盘管理',
|
||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
webpEnabled: true
|
webpEnabled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@ -101,6 +101,9 @@ export default {
|
|||||||
options: [{
|
options: [{
|
||||||
value: 'LOGIN',
|
value: 'LOGIN',
|
||||||
label: '登录'
|
label: '登录'
|
||||||
|
}, {
|
||||||
|
value: 'BROWSE',
|
||||||
|
label: '足迹👣'
|
||||||
}, {
|
}, {
|
||||||
value: 'OPERATION',
|
value: 'OPERATION',
|
||||||
label: '操作'
|
label: '操作'
|
||||||
|
|||||||
@ -23,9 +23,9 @@ export default {
|
|||||||
{prop: 'status', minWidth: 80, label: '状态', tag: true,
|
{prop: 'status', minWidth: 80, label: '状态', tag: true,
|
||||||
formatData: (status)=> {
|
formatData: (status)=> {
|
||||||
if(status === 0) {
|
if(status === 0) {
|
||||||
return [{name: '登陆成功', type: 'success'}]
|
return [{name: '登录成功', type: 'success'}]
|
||||||
} else {
|
} else {
|
||||||
return [{name: '登陆失败', type: 'danger'}]
|
return [{name: '登录失败', type: 'danger'}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user