修复:登陆改为登录

This commit is contained in:
jmal 2021-02-18 10:32:02 +08:00
parent b2f44877a5
commit 85df20b775
6 changed files with 10 additions and 8 deletions

View File

@ -197,7 +197,6 @@ export default {
fileName,
{ type: response.type }
);
console.log(file)
let data = new FormData()
data.append("files", file)
data.append("username", that.$store.state.user.name)

View File

@ -21,12 +21,12 @@ router.beforeEach(async(to, from, next) => {
if (hasToken) {
// 已登录的情况
if (to.path === '/login') {
// 登陆页面
// 登录页面
// 如果已登录,则重定向到主页
setMenuList(next, { path: '/' })
NProgress.done()
} else {
// 非登陆页面
// 非登录页面
const hasGetUserInfo = store.getters.name
if (hasGetUserInfo) {
// 存在用户信息
@ -46,7 +46,7 @@ router.beforeEach(async(to, from, next) => {
}
}
} else {
// 没有登陆的情况
// 没有登录的情况
if (whiteList.indexOf(to.path) !== -1) {
// 没有token但是在白名单中,直接进入
next()

View File

@ -54,7 +54,7 @@ service.interceptors.response.use(
setTimeout(function () {
const hasToken = getToken()
if(hasToken){
MessageBox.confirm('登录已失效,可以取消停留在此页面上,或者再次登录', '确认登出', {
MessageBox.confirm('登录已失效,请重新登录', '确认登出', {
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning'

View File

@ -44,7 +44,7 @@ export default {
return {
title: '网盘管理',
syncLoading: false,
webpEnabled: true
webpEnabled: false
}
},
mounted() {

View File

@ -101,6 +101,9 @@ export default {
options: [{
value: 'LOGIN',
label: '登录'
}, {
value: 'BROWSE',
label: '足迹👣'
}, {
value: 'OPERATION',
label: '操作'

View File

@ -23,9 +23,9 @@ export default {
{prop: 'status', minWidth: 80, label: '状态', tag: true,
formatData: (status)=> {
if(status === 0) {
return [{name: '登陆成功', type: 'success'}]
return [{name: '登录成功', type: 'success'}]
} else {
return [{name: '登陆失败', type: 'danger'}]
return [{name: '登录失败', type: 'danger'}]
}
}
},