101 lines
2.5 KiB
Java
101 lines
2.5 KiB
Java
<template>
|
|
<div id="userLayout" :class="['user-layout-wrapper',device]">
|
|
<div class="container">
|
|
<div class="top">
|
|
<div class="logo">
|
|
<img class="logo-img" src="~@/assets/logoNew.png" alt="">
|
|
<div class="company">
|
|
<span>合众未来</span>
|
|
<span>HEZHONGWEILAI</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<route-view></route-view>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import RouteView from "@/components/layouts/RouteView"
|
|
import { mixinDevice } from '@/utils/mixin.js'
|
|
|
|
export default {
|
|
name: "UserLayout",
|
|
components: { RouteView },
|
|
mixins: [mixinDevice],
|
|
data () {
|
|
return {}
|
|
},
|
|
mounted () {
|
|
document.body.classList.add('userLayout')
|
|
},
|
|
beforeDestroy () {
|
|
document.body.classList.remove('userLayout')
|
|
},
|
|
}
|
|
var comO,logo,logoImg
|
|
window.onresize = function(){
|
|
comO = document.getElementsByClassName("company")[0]
|
|
logo = document.getElementsByClassName("logo")[0]
|
|
logoImg = document.getElementsByClassName("logo-img")[0]
|
|
console.log(logo.width)
|
|
comO.style.left = (logoImg.width + 10) + 'px'
|
|
comO.style.height = logoImg.height + 'px'
|
|
logo.style.height = logoImg.height + 'px'
|
|
}
|
|
</script>
|
|
<style lang="less" >
|
|
#userLayout.user-layout-wrapper{
|
|
height: 100%;
|
|
.container {
|
|
background: url(~@/assets/home3840.png) no-repeat;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-size: 100% 100%;
|
|
position: relative;
|
|
.top{
|
|
position: absolute;
|
|
left: 2%;
|
|
top: 3%;
|
|
min-width: 100px;
|
|
min-height: 50px;
|
|
width: 100%;
|
|
height: 10%;
|
|
.logo{
|
|
width: 30%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
position: relative;
|
|
img{
|
|
max-width: 100%;
|
|
}
|
|
.company{
|
|
position: absolute;
|
|
bottom: 0;
|
|
display: inline-block;
|
|
color: #000;
|
|
white-space: nowrap;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: flex-end;
|
|
span{
|
|
&:first-child{
|
|
font-size: 140%;
|
|
font-weight: 600;
|
|
line-height: 100%;
|
|
min-height: 20%;
|
|
height: 40%;
|
|
letter-spacing: 1.5px;
|
|
}
|
|
&:last-child{
|
|
font-size: 110%;
|
|
font-weight: 700;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style> |