Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
NLT-e-cigarette
Commits
ad5f5464
Commit
ad5f5464
authored
Aug 22, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未登录敲/跳转到登录页,登陆了敲/跳转到第一个目录的第一个菜单
parent
4723d321
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
permission.js
src/permission.js
+4
-4
index.js
src/router/index.js
+5
-5
setPwd.vue
src/views/login/setPwd.vue
+1
-1
No files found.
src/permission.js
View file @
ad5f5464
...
@@ -55,7 +55,7 @@ router.beforeEach((to, from, next) => {
...
@@ -55,7 +55,7 @@ router.beforeEach((to, from, next) => {
}
else
{
}
else
{
Message
.
error
(
'用户无权限'
)
Message
.
error
(
'用户无权限'
)
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
next
({
path
:
'/'
})
next
({
path
:
'/
login
'
})
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
})
})
}
}
...
@@ -63,7 +63,7 @@ router.beforeEach((to, from, next) => {
...
@@ -63,7 +63,7 @@ router.beforeEach((to, from, next) => {
}
else
{
}
else
{
Message
.
error
(
'用户无权限'
)
Message
.
error
(
'用户无权限'
)
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
next
({
path
:
'/'
})
next
({
path
:
'/
login
'
})
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
})
})
}
}
...
@@ -71,7 +71,7 @@ router.beforeEach((to, from, next) => {
...
@@ -71,7 +71,7 @@ router.beforeEach((to, from, next) => {
.
catch
(
err
=>
{
.
catch
(
err
=>
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
Message
.
error
(
err
)
Message
.
error
(
err
)
next
({
path
:
'/'
})
next
({
path
:
'/
login
'
})
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
})
})
})
})
...
@@ -100,7 +100,7 @@ router.beforeEach((to, from, next) => {
...
@@ -100,7 +100,7 @@ router.beforeEach((to, from, next) => {
next
()
next
()
}
else
{
}
else
{
// 临时跳转
// 临时跳转
next
({
path
:
'/'
})
next
({
path
:
'/
login
'
})
// next(`http://login.court.com/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
// next(`http://login.court.com/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_ZT}`
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_ZT}`
// next()
// next()
...
...
src/router/index.js
View file @
ad5f5464
...
@@ -33,11 +33,11 @@ import LayoutLogin from '@/layoutLogin'
...
@@ -33,11 +33,11 @@ import LayoutLogin from '@/layoutLogin'
* 基础页面,所有人可以访问
* 基础页面,所有人可以访问
*/
*/
export
const
constantRoutes
=
[
export
const
constantRoutes
=
[
{
//
{
path
:
'/'
,
//
path: '/',
redirect
:
'/login'
,
//
redirect: '/login',
hidden
:
true
//
hidden: true
},
//
},
{
{
path
:
'/login'
,
path
:
'/login'
,
component
:
(
resolve
)
=>
require
([
'@/views/login/login.vue'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'@/views/login/login.vue'
],
resolve
),
...
...
src/views/login/setPwd.vue
View file @
ad5f5464
...
@@ -92,7 +92,7 @@ export default {
...
@@ -92,7 +92,7 @@ export default {
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
removeToken
()
removeToken
()
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/'
,
path
:
'/
login
'
,
query
:
this
.
$route
.
query
query
:
this
.
$route
.
query
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment