hookehuyr

新增用户模块相关页面

<!--
* @Date: 2024-09-26 13:36:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-17 15:55:29
* @LastEditTime: 2024-10-18 18:58:31
* @FilePath: /hager/src/App.vue
* @Description: 文件描述
-->
<template>
<div style=" display: flex; flex-direction: column; min-height: 100vh;">
<div style="display: flex; flex-direction: column; min-height: 100vh; overflow: hidden;">
<hager-header></hager-header>
<router-view :class="['wrapper', is_xs ? 'xs' : '']"></router-view>
<hager-footer></hager-footer>
<router-view :class="[!isLoginPage ? 'wrapper' : '', is_xs ? 'xs' : '']"></router-view>
<hager-footer v-if="!isLoginPage"></hager-footer>
</div>
</template>
......@@ -26,6 +26,13 @@ export default {
}
},
computed: {
// 通过计算属性检查是否是登录页
isLoginPage() {
// 检查当前路由是否为登录页的路径
return this.$route.path.indexOf('/user') !== -1;
},
},
mounted () {
},
......
/*
* @Date: 2024-08-26 10:42:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-18 14:59:39
* @LastEditTime: 2024-10-18 18:16:17
* @FilePath: /hager/src/route.js
* @Description: 文件描述
*/
......@@ -149,4 +149,41 @@ export default [{
tag: 'recruit'
},
children: []
}, {
path: '/user',
name: '用户管理',
component: () => import('@/views/user/index'),
meta: {
title: '海格电器',
tag: 'user'
},
children: [
{
path: 'login',
name: '用户登录',
component: () => import('@/views/user/login'),
meta: {
title: '海格电器',
tag: 'login'
},
},
{
path: 'register',
name: '用户注册',
component: () => import('@/views/user/register'),
meta: {
title: '海格电器',
tag: 'register'
},
},
{
path: 'info',
name: '用户信息',
component: () => import('@/views/user/info'),
meta: {
title: '海格电器',
tag: 'info'
},
},
]
}]
......
<!--
* @Date: 2024-10-18 17:57:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-18 19:01:34
* @FilePath: /hager/src/views/user/index.vue
* @Description: 文件描述
-->
<template>
<div class="hager-user-page">
<div class="centered-div">
<el-row>
<el-col :span="14">
<div class="user-box" style="background-color: #EFF7FB;">
<div class="user-logo"></div>
<div class="user-bg"></div>
</div>
</el-col>
<el-col :span="10">
<router-view></router-view>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.hager-user-page {
background-image: url(https://cdn.ipadbiz.cn/hager/img/user/dd-bg.png);
background-size: cover;
background-position: center;
width: 100vw;
height: 100vh;
overflow: hidden;
.centered-div {
// position: absolute;
// top: 55%;
// left: 50%;
// transform: translate(-50%, -55%); /* 将元素移动到居中位置 */
// width: 300px; /* 可选,设置宽度 */
// height: 200px; /* 可选,设置高度 */
margin: 15rem 20vw 0;
background-color: #fff; /* 设置背景颜色,方便看到元素 */
box-shadow: 0rem 0.25rem 0.5rem 0.08rem rgba(0,0,0,0.16);
border-radius: 5px;
.user-box {
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 5px;
}
.user-logo {
background-image: url(https://cdn.ipadbiz.cn/hager/img/user/logo02.png);
height: 15vh;
width: 15vw;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
margin-top: 2rem;
}
.user-bg {
background-image: url(https://cdn.ipadbiz.cn/hager/img/user/l-bg.png);
height: 35vh;
width: 45vw;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
}
}
</style>
<!--
* @Date: 2024-10-18 17:57:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-18 17:59:36
* @FilePath: /hager/src/views/login/info.vue
* @Description: 文件描述
-->
<template>
<div class="hager-info-page"></div>
</template>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.hager-info-page {
}
</style>
<template>
<div class="hager-login-page">
<div>用户注册</div>
<div>
</div>
</div>
</template>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.hager-login-page {
}
</style>
<!--
* @Date: 2024-10-18 17:57:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-18 17:59:14
* @FilePath: /hager/src/views/login/register.vue
* @Description: 文件描述
-->
<template>
<div class="hager-register-page"></div>
</template>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.hager-register-page {
}
</style>