App.vue
2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!--
* @Date: 2024-09-26 13:36:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-18 18:58:31
* @FilePath: /hager/src/App.vue
* @Description: 文件描述
-->
<template>
<div style="display: flex; flex-direction: column; min-height: 100vh; overflow: hidden;">
<hager-header></hager-header>
<router-view :class="[!isLoginPage ? 'wrapper' : '', is_xs ? 'xs' : '']"></router-view>
<hager-footer v-if="!isLoginPage"></hager-footer>
</div>
</template>
<script>
import hagerHeader from '@/components/common/hagerHeader.vue';
import hagerFooter from '@/components/common/hagerFooter.vue';
import mixin from '@/common/mixin';
export default {
components: { hagerHeader, hagerFooter },
mixins: [mixin.init],
data () {
return {
}
},
computed: {
// 通过计算属性检查是否是登录页
isLoginPage() {
// 检查当前路由是否为登录页的路径
return this.$route.path.indexOf('/user') !== -1;
},
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less">
* {
outline: none;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
color: @text-color;
p {
margin: 0;
padding: 0;
}
}
body {
font-size: 16px; /* 默认字体大小 */
}
// @media (max-width: 1200px) {
// body {
// font-size: 14px; /* 1200px 以下屏幕的字体大小 */
// }
// }
// @media (max-width: 768px) {
// body {
// font-size: 12px; /* 768px 以下屏幕的字体大小 */
// }
// }
// @media (max-width: 480px) {
// body {
// font-size: 10px; /* 480px 以下屏幕的字体大小 */
// }
// }
.global-center {
position: relative;
top: 50%;
transform: translateY(-50%);
}
.wrapper {
margin-top: 10rem;
flex-grow: 1;
&.xs {
margin-top: 7rem;
}
}
.box-n {
background-color: #fff;
padding: 2rem 0;
}
.box-2n {
background-color: #f1f1f1;
padding: 2rem 0;
}
.banner-text-wrapper {
.text {
font-weight: bold;
.title {
margin-bottom: 1rem;
font-size: 2.5rem;
color: @secondary-color;
}
.sub {
font-size: 2rem;
color: @primary-color;
}
}
.text-sub {
color: @text-color;
margin-top: 1rem;
font-size: 1.2rem;
line-height: 1.5;
}
}
.more-box {
display: flex;
justify-content: center;
}
.el-carousel__item .item {
opacity: 0.75;
margin: 0;
}
.el-carousel__item:nth-child(2n) {
background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n+1) {
background-color: #d3dce6;
}
.el-carousel__indicator.is-active button {
background-color: #EE6D10;
}
</style>