-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
youme
committed
May 6, 2020
1 parent
4502b00
commit af7ccb2
Showing
12 changed files
with
382 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<!-- | ||
* @Description:登录注册页面的通用布局 | ||
* @Author: youme | ||
* @LastEditors: youme | ||
* @Date: 2020-05-06 09:30:27 | ||
* @LastEditTime: 2020-05-06 09:48:04 | ||
--> | ||
<template> | ||
<div class="login-wrap"> | ||
<div class="login-title" :class="{easeOut: accessToken}">SWEET-MIND</div> | ||
<div class="login-form" :class="{zoomOut: accessToken}"> | ||
<router-view /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
computed: { | ||
accessToken() { | ||
return this.$store.state.login.access_token | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
.login-wrap { | ||
height: 100vh; | ||
background: url('../assets/login_images/cover.jpeg') 0 / cover fixed; | ||
.login-title { | ||
position: absolute; | ||
top: 50%; | ||
width: 100%; | ||
margin-top: -230px; | ||
text-align: center; | ||
font-size: 30px; | ||
color: #fff; | ||
text-shadow: 2px 2px 3px #000; | ||
transition-duration: 2s; | ||
&.easeOut { | ||
-webkit-transform: translateY(190px); | ||
-ms-transform: translateY(190px); | ||
transform: translateY(190px); | ||
} | ||
} | ||
.login-form { | ||
position: absolute; | ||
left: 50%; | ||
top: 50%; | ||
width: 420px; | ||
min-height: 270px; | ||
margin: -165px 0 0 -210px; | ||
padding: 40px; | ||
border-radius: 5px; | ||
box-shadow: inset 0 0 0 1px hsla(0, 0%, 100%, 0.3), 0 0.5em 1em rgba(0, 0, 0, 0.6); | ||
background: hsla(0, 0%, 100%, 0.25); | ||
overflow: hidden; | ||
box-sizing: border-box; | ||
&::before { | ||
background: url('../assets/login_images/cover.jpeg') 0 / cover fixed; | ||
content: ''; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
bottom: 0; | ||
margin: -30px; | ||
z-index: 0; | ||
filter: blur(1px); | ||
} | ||
} | ||
.zoomOut { | ||
animation-duration: 1.5s; | ||
animation-fill-mode: both; | ||
animation-name: zoomOut; | ||
} | ||
@keyframes zoomOut { | ||
0% { | ||
opacity: 1; | ||
} | ||
50% { | ||
opacity: 0; | ||
transform: scale3d(0.3, 0.3, 0.3); | ||
} | ||
to { | ||
opacity: 0; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- | ||
* @Description:基础页面布局 | ||
* @Author: youme | ||
* @LastEditors: youme | ||
* @Date: 2020-05-06 08:26:02 | ||
* @LastEditTime: 2020-05-06 10:20:58 | ||
--> | ||
<template> | ||
<div> | ||
<div>123</div> | ||
<router-view /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
} | ||
</script> | ||
|
||
<style scope> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!-- | ||
* @Description:基础布局权限 | ||
* @Author: youme | ||
* @LastEditors: youme | ||
* @Date: 2020-05-06 08:26:02 | ||
* @LastEditTime: 2020-05-06 10:20:03 | ||
--> | ||
<template> | ||
<div> | ||
<div v-if="typeof this.userName === 'undefined'" class="placeholder" v-loading="true"/> | ||
<user-layout/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import UserLayout from './UserLayout' | ||
export default { | ||
components: { UserLayout }, | ||
created() { | ||
this.$store.dispatch('user/saveCurrentUser') | ||
}, | ||
mounted() { | ||
console.log(this.userName) | ||
if (!this.userName && typeof this.userName !== 'undefined' && this.userName !== 0) { | ||
this.$router.push('/user') | ||
} | ||
}, | ||
computed: { | ||
userName() { | ||
return this.$store.state.user.currentUser.name | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scope> | ||
.placeholder { | ||
height: 100%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* @Description:系统管理路由 | ||
* @Author: youme | ||
* @LastEditors: youme | ||
* @Date: 2020-05-06 09:58:55 | ||
* @LastEditTime: 2020-05-06 10:15:11 | ||
*/ | ||
export default { | ||
path: 'login', | ||
component: () => import('@/views/log') | ||
} |
Oops, something went wrong.