Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
file
Overview
Overview
Details
Activity
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
vanke
file
Commits
21035ab7
Commit
21035ab7
authored
Jul 09, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档下载,搜索,最新上传,下载排行
parent
0b8330a0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
8 deletions
+29
-8
common.scss
src/assets/scss/common.scss
+4
-1
index.js
src/router/index.js
+17
-3
request.js
src/utils/request.js
+5
-1
index.vue
src/views/login/index.vue
+3
-3
No files found.
src/assets/scss/common.scss
View file @
21035ab7
...
...
@@ -24,13 +24,16 @@ a:link,a:visited,a:hover { text-decoration:none;} //未访问:蓝色、无下
//align-items: center;
//background: #dcdcdc;
}
img
{
object-fit
:
contain
;
}
.input-width
{
width
:
500px
;
}
.container
{
width
:
1200px
;
margin
:
0
auto
;
//
padding: 4% 0;
padding
:
4%
0
;
}
src/router/index.js
View file @
21035ab7
import
Vue
from
'vue'
import
VueRouter
from
'vue-router'
import
Layout
from
'@/views/layout/Layout'
Vue
.
use
(
VueRouter
)
const
routes
=
[
{
path
:
'/login'
,
component
:
()
=>
import
(
'@/views/login/index'
),
hidden
:
true
},
{
path
:
'/forget'
,
component
:
()
=>
import
(
'@/views/login/forgetPwd'
),
hidden
:
true
},
{
path
:
'/404'
,
component
:
()
=>
import
(
'@/views/404'
),
hidden
:
true
},
{
path
:
'/login'
,
name
:
'login'
,
component
:
()
=>
import
(
'@/views/login/index'
),
hidden
:
true
},
{
path
:
'/404'
,
component
:
()
=>
import
(
'@/views/404'
),
hidden
:
true
},
{
path
:
''
,
component
:
Layout
,
...
...
@@ -20,6 +29,11 @@ const routes = [
name
:
'search'
,
component
:
()
=>
import
(
'@/views/search/index.vue'
)
}]
},
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
}
]
...
...
src/utils/request.js
View file @
21035ab7
...
...
@@ -2,6 +2,7 @@
import
axios
from
'axios'
import
{
Message
,
MessageBox
}
from
'element-ui'
import
store
from
'../store'
import
router
from
'../router'
import
{
getToken
}
from
'@/utils/auth'
// 创建axios实例
const
service
=
axios
.
create
({
...
...
@@ -51,7 +52,10 @@ service.interceptors.response.use(
type
:
'warning'
}).
then
(()
=>
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
console
.
log
(
'重新登录'
,
router
)
router
.
replace
({
name
:
'login'
})
})
})
}
...
...
src/views/login/index.vue
View file @
21035ab7
...
...
@@ -23,7 +23,7 @@
autoComplete=
"on"
placeholder=
"请输入用户名"
>
<span
slot=
"prefix"
>
<i
class=
"el-icon-user
-solid
"
/>
<i
class=
"el-icon-user"
/>
</span>
</el-input>
</el-form-item>
...
...
@@ -155,7 +155,7 @@ export default {
.container
{
position
:
relative
;
width
:
100%
;
height
:
100
vh
;
height
:
100
%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
...
...
@@ -168,7 +168,7 @@ export default {
.container
.content
{
width
:
60%
;
padding
:
3%
;
height
:
7
0%
;
height
:
6
0%
;
background
:
#FFFFFF
;
border-radius
:
10px
;
display
:
flex
;
...
...
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