Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcsjsb-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
731e47d8
authored
2023-05-25 14:53:37 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:登录修改
1 parent
f4aa11c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
87 deletions
src/layout/components/Navbar.vue
src/utils/request.js
src/layout/components/Navbar.vue
View file @
731e47d
...
...
@@ -17,92 +17,92 @@
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
Breadcrumb
from
'./Breadcrumb'
import
{
logout
}
from
"@/api/login.js"
;
export
default
{
components
:
{
Breadcrumb
},
computed
:
{
...
mapGetters
([
"userInfo"
]),
userName
()
{
return
this
.
userInfo
?
this
.
userInfo
.
name
:
""
}
},
methods
:
{
handleDataView
()
{
const
{
href
}
=
this
.
$router
.
resolve
(
'/dataView'
);
window
.
open
(
href
,
'_blank'
);
import
{
mapGetters
}
from
'vuex'
import
Breadcrumb
from
'./Breadcrumb'
import
{
logout
}
from
"@/api/login.js"
;
export
default
{
components
:
{
Breadcrumb
},
themeChange
(
val
)
{
this
.
$store
.
dispatch
(
'app/updateTheme'
,
val
)
computed
:
{
...
mapGetters
([
"userInfo"
]),
userName
()
{
return
this
.
userInfo
?
this
.
userInfo
.
name
:
""
}
},
onCancel
()
{
logout
()
.
then
((
res
)
=>
{
sessionStorage
.
removeItem
(
"token"
);
this
.
$store
.
dispatch
(
"user/resetState"
);
this
.
$store
.
dispatch
(
"permission/resetRoutes"
);
this
.
$router
.
replace
({
path
:
"/sb"
methods
:
{
handleDataView
()
{
const
{
href
}
=
this
.
$router
.
resolve
(
'/dataView'
);
window
.
open
(
href
,
'_blank'
);
},
themeChange
(
val
)
{
this
.
$store
.
dispatch
(
'app/updateTheme'
,
val
)
},
onCancel
()
{
logout
()
.
then
((
res
)
=>
{
sessionStorage
.
removeItem
(
"token"
);
this
.
$store
.
dispatch
(
"user/resetState"
);
this
.
$store
.
dispatch
(
"permission/resetRoutes"
);
this
.
$router
.
replace
({
path
:
"/login"
})
})
.
catch
((
error
)
=>
{
// console.dir(error);
})
})
.
catch
((
error
)
=>
{
// console.dir(error);
})
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"~@/styles/_handle.scss"
;
@import
"~@/styles/_handle.scss"
;
.navbar-con
{
position
:
relative
;
.navbar-con
{
position
:
relative
;
.logo
{
color
:
#fff
;
font-size
:
26px
;
font-weight
:
700
;
display
:
flex
;
margin-left
:
15px
;
.logo
{
color
:
#fff
;
font-size
:
26px
;
font-weight
:
700
;
display
:
flex
;
margin-left
:
15px
;
img
{
width
:
47px
;
height
:
47px
;
}
img
{
width
:
47px
;
height
:
47px
;
}
h4
{
margin-left
:
20px
;
height
:
50px
;
line-height
:
50px
;
h4
{
margin-left
:
20px
;
height
:
50px
;
line-height
:
50px
;
}
}
}
}
.navbar
{
height
:
$
headerHeight
;
overflow
:
hidden
;
position
:
relative
;
@include
background("navbg");
.navbar
{
height
:
$
headerHeight
;
overflow
:
hidden
;
position
:
relative
;
@include
background("navbg");
display
:
flex
;
align-items
:
center
;
padding-right
:
20px
;
justify-content
:
space-between
;
display
:
flex
;
align-items
:
center
;
padding-right
:
20px
;
justify-content
:
space-between
;
.header-logo
{
width
:
300px
;
}
.header-logo
{
width
:
300px
;
}
.right-menu-item
{
&.hover-effect
{
cursor
:
pointer
;
transition
:
background
0.3s
;
display
:
flex
;
align-items
:
center
;
.right-menu-item
{
&.hover-effect
{
cursor
:
pointer
;
transition
:
background
0.3s
;
display
:
flex
;
align-items
:
center
;
}
}
}
}
</
style
>
...
...
src/utils/request.js
View file @
731e47d
/*
* @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
* @Autor: renchao
* @LastEditTime: 2023-0
4-27 17:09:51
* @LastEditTime: 2023-0
5-25 14:52:20
*/
import
Vue
from
'vue'
import
axios
from
"axios"
;
...
...
@@ -69,23 +69,12 @@ function handleErrorData (status) {
window
.
tokenValid
=
false
;
Message
.
error
(
"由于长时间未操作,请重新登录!"
);
localStorage
.
removeItem
(
"token"
);
let
code
=
Vue
.
prototype
.
BASE_API
.
CODE
if
(
code
==
'BDCSBPT'
)
{
router
.
replace
({
path
:
"/sb"
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
,
},
});
}
else
{
router
.
replace
({
path
:
"/jg"
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
,
},
});
}
router
.
replace
({
path
:
"/login"
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
,
}
})
}
break
;
case
404
:
...
...
Please
register
or
sign in
to post a comment