Showing
4 changed files
with
33 additions
and
29 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-10-17 11:13:44 | 2 | * @Date: 2024-10-17 11:13:44 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-24 15:24:20 | 4 | + * @LastEditTime: 2024-10-24 16:21:41 |
| 5 | * @FilePath: /hager/src/views/about/honors.vue | 5 | * @FilePath: /hager/src/views/about/honors.vue |
| 6 | * @Description: 关于海格-荣誉展示 | 6 | * @Description: 关于海格-荣誉展示 |
| 7 | --> | 7 | --> |
| ... | @@ -40,9 +40,9 @@ | ... | @@ -40,9 +40,9 @@ |
| 40 | <div class="card-image-box"> | 40 | <div class="card-image-box"> |
| 41 | <div class="card-image" :style="{ backgroundImage: `url(${x.cover})` }"></div> | 41 | <div class="card-image" :style="{ backgroundImage: `url(${x.cover})` }"></div> |
| 42 | </div> | 42 | </div> |
| 43 | - <div class="card-content"> | 43 | + <div ref="contentDiv" :class="['card-content', active_idx === 0 ? 'a' : '', active_idx === 1 ? 'b' : '', active_idx === 2 ? 'c' : '', ]"> |
| 44 | <h3>{{ x.post_title }}</h3> | 44 | <h3>{{ x.post_title }}</h3> |
| 45 | - <p ref="contentDiv" v-if="x.post_content">{{ x.post_content }}</p> | 45 | + <p v-if="x.post_content" v-html="x.post_content"></p> |
| 46 | </div> | 46 | </div> |
| 47 | </div> | 47 | </div> |
| 48 | </div> | 48 | </div> |
| ... | @@ -62,7 +62,7 @@ | ... | @@ -62,7 +62,7 @@ |
| 62 | </div> | 62 | </div> |
| 63 | <div class="card-content xs"> | 63 | <div class="card-content xs"> |
| 64 | <h3>{{ x.post_title }}</h3> | 64 | <h3>{{ x.post_title }}</h3> |
| 65 | - <p v-if="x.post_content" class="content">{{ x.post_content }}</p> | 65 | + <p v-if="x.post_content" class="content" v-html="x.post_content"></p> |
| 66 | </div> | 66 | </div> |
| 67 | </div> | 67 | </div> |
| 68 | </div> | 68 | </div> |
| ... | @@ -278,17 +278,27 @@ export default { | ... | @@ -278,17 +278,27 @@ export default { |
| 278 | background-color: #F7F7F7; | 278 | background-color: #F7F7F7; |
| 279 | padding: 2rem 1.5rem; | 279 | padding: 2rem 1.5rem; |
| 280 | padding-bottom: 0.5rem; | 280 | padding-bottom: 0.5rem; |
| 281 | + overflow: scroll; | ||
| 282 | + &.a { | ||
| 283 | + height: 10rem; | ||
| 284 | + } | ||
| 285 | + &.b { | ||
| 286 | + height: 4rem; | ||
| 287 | + } | ||
| 288 | + &.c { | ||
| 289 | + height: 4rem; | ||
| 290 | + } | ||
| 281 | h3 { | 291 | h3 { |
| 282 | color: @secondary-color; | 292 | color: @secondary-color; |
| 283 | font-size: 1rem; | 293 | font-size: 1rem; |
| 284 | margin: 0; | 294 | margin: 0; |
| 285 | - height: 3rem; | 295 | + height: 2rem; |
| 286 | line-height: 1.5; | 296 | line-height: 1.5; |
| 287 | } | 297 | } |
| 288 | p { | 298 | p { |
| 289 | font-size: 0.95rem; | 299 | font-size: 0.95rem; |
| 290 | line-height: 1.8; | 300 | line-height: 1.8; |
| 291 | - height: 8rem; | 301 | + // height: 3rem; |
| 292 | margin-bottom: 0.5rem; | 302 | margin-bottom: 0.5rem; |
| 293 | overflow: scroll; | 303 | overflow: scroll; |
| 294 | } | 304 | } |
| ... | @@ -299,6 +309,7 @@ export default { | ... | @@ -299,6 +309,7 @@ export default { |
| 299 | display: flex; | 309 | display: flex; |
| 300 | flex-wrap: wrap; | 310 | flex-wrap: wrap; |
| 301 | justify-content: flex-start; /* 保证剩余元素靠左对齐 */ | 311 | justify-content: flex-start; /* 保证剩余元素靠左对齐 */ |
| 312 | + align-items: stretch; /* 让所有子元素的高度保持一致 */ | ||
| 302 | } | 313 | } |
| 303 | 314 | ||
| 304 | .card { | 315 | .card { | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-10-18 09:31:05 | 2 | * @Date: 2024-10-18 09:31:05 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-24 13:54:25 | 4 | + * @LastEditTime: 2024-10-24 17:17:49 |
| 5 | * @FilePath: /hager/src/views/concat.vue | 5 | * @FilePath: /hager/src/views/concat.vue |
| 6 | * @Description: 联系我们 | 6 | * @Description: 联系我们 |
| 7 | --> | 7 | --> |
| ... | @@ -415,12 +415,12 @@ | ... | @@ -415,12 +415,12 @@ |
| 415 | <div v-if="!is_xs" v-for="(item, index) in concat_list" :key="index"> | 415 | <div v-if="!is_xs" v-for="(item, index) in concat_list" :key="index"> |
| 416 | <div :class="['concat-area', is_xs ? 'xs' : '']">{{ item.area }}</div> | 416 | <div :class="['concat-area', is_xs ? 'xs' : '']">{{ item.area }}</div> |
| 417 | <div> | 417 | <div> |
| 418 | - <el-row v-for="(concat, idx) in item.list" :key="idx" :gutter="0" style="border-bottom: 1px solid #DADADA;"> | 418 | + <el-row v-for="(concat, idx) in item.list" :key="idx" :gutter="0" :style="{borderBottom: idx === item.list.length - 1 ? '' : '1px solid #DADADA'}"> |
| 419 | <el-col :span="12" v-for="(x, i) in concat" :key="i" :style="{borderRight: i%2 === 0 ? '1px solid #DADADA' : '', padding: '1.5rem 0'}"> | 419 | <el-col :span="12" v-for="(x, i) in concat" :key="i" :style="{borderRight: i%2 === 0 ? '1px solid #DADADA' : '', padding: '1.5rem 0'}"> |
| 420 | <el-row :gutter="0"> | 420 | <el-row :gutter="0"> |
| 421 | <el-col :span="13" class="title"><span class="inner">{{ x.area }}</span></el-col> | 421 | <el-col :span="13" class="title"><span class="inner">{{ x.area }}</span></el-col> |
| 422 | <el-col :span="3" class="name outer"><p class="inner">{{ x.name }}</p></el-col> | 422 | <el-col :span="3" class="name outer"><p class="inner">{{ x.name }}</p></el-col> |
| 423 | - <el-col :span="8" class="number outer"> | 423 | + <el-col :span="8" :class="['number', 'outer', x.tel.length >= 2 ? 'double' : '']"> |
| 424 | <p v-for="(tel, index) in x.tel" :key="index" class="inner">{{ tel }}</p> | 424 | <p v-for="(tel, index) in x.tel" :key="index" class="inner">{{ tel }}</p> |
| 425 | </el-col> | 425 | </el-col> |
| 426 | </el-row> | 426 | </el-row> |
| ... | @@ -770,9 +770,15 @@ export default { | ... | @@ -770,9 +770,15 @@ export default { |
| 770 | .number { | 770 | .number { |
| 771 | color: #F56400; | 771 | color: #F56400; |
| 772 | font-weight: bold; | 772 | font-weight: bold; |
| 773 | + position: relative; | ||
| 773 | &.outer { | 774 | &.outer { |
| 774 | text-align: right; | 775 | text-align: right; |
| 775 | } | 776 | } |
| 777 | + &.double { | ||
| 778 | + position: absolute; | ||
| 779 | + right: 0; | ||
| 780 | + top: -50%; | ||
| 781 | + } | ||
| 776 | .inner { | 782 | .inner { |
| 777 | margin-right: 1.5rem; | 783 | margin-right: 1.5rem; |
| 778 | &.xs { | 784 | &.xs { | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-08-27 10:06:30 | 2 | * @Date: 2024-08-27 10:06:30 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-24 15:39:51 | 4 | + * @LastEditTime: 2024-10-24 16:34:09 |
| 5 | * @FilePath: /hager/src/views/index.vue | 5 | * @FilePath: /hager/src/views/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
| 9 | <div class="hager-container"> | 9 | <div class="hager-container"> |
| 10 | <el-carousel :height="top_img_height" :interval="0"> | 10 | <el-carousel :height="top_img_height" :interval="0"> |
| 11 | <el-carousel-item v-for="(item, index) in banner_list" :key="index"> | 11 | <el-carousel-item v-for="(item, index) in banner_list" :key="index"> |
| 12 | - <el-image style="height: 100%;" fit="fill" :src="item.src"></el-image> | 12 | + <el-image style="height: 100%;" fit="fill" :src="item.value"></el-image> |
| 13 | </el-carousel-item> | 13 | </el-carousel-item> |
| 14 | </el-carousel> | 14 | </el-carousel> |
| 15 | <hager-box class="box-n"> | 15 | <hager-box class="box-n"> |
| ... | @@ -192,20 +192,7 @@ export default { | ... | @@ -192,20 +192,7 @@ export default { |
| 192 | data () { | 192 | data () { |
| 193 | return { | 193 | return { |
| 194 | is_fold: false, | 194 | is_fold: false, |
| 195 | - banner_list: [ | 195 | + banner_list: [], |
| 196 | - { | ||
| 197 | - src: 'https://cdn.ipadbiz.cn/hager/banner/banner01@2x.png', | ||
| 198 | - }, | ||
| 199 | - { | ||
| 200 | - src: 'https://cdn.ipadbiz.cn/hager/banner/banner01@2x.png', | ||
| 201 | - }, | ||
| 202 | - { | ||
| 203 | - src: 'https://cdn.ipadbiz.cn/hager/banner/banner01@2x.png', | ||
| 204 | - }, | ||
| 205 | - { | ||
| 206 | - src: 'https://cdn.ipadbiz.cn/hager/banner/banner01@2x.png', | ||
| 207 | - }, | ||
| 208 | - ], | ||
| 209 | news_list: [], | 196 | news_list: [], |
| 210 | screen_width: 0, | 197 | screen_width: 0, |
| 211 | solution_list: [], | 198 | solution_list: [], |
| ... | @@ -256,7 +243,7 @@ export default { | ... | @@ -256,7 +243,7 @@ export default { |
| 256 | const { code, data } = await getHomeAPI(); | 243 | const { code, data } = await getHomeAPI(); |
| 257 | if (code) { | 244 | if (code) { |
| 258 | this.product_list = data.product; | 245 | this.product_list = data.product; |
| 259 | - // this.banner_list = data.banner; | 246 | + this.banner_list = data.banner; |
| 260 | this.solution_list = data.solution; | 247 | this.solution_list = data.solution; |
| 261 | this.news_list = data.news; | 248 | this.news_list = data.news; |
| 262 | } | 249 | } | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-10-18 12:05:44 | 2 | * @Date: 2024-10-18 12:05:44 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-24 14:42:28 | 4 | + * @LastEditTime: 2024-10-24 15:53:59 |
| 5 | * @FilePath: /hager/src/views/news/index.vue | 5 | * @FilePath: /hager/src/views/news/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -110,7 +110,7 @@ export default { | ... | @@ -110,7 +110,7 @@ export default { |
| 110 | } | 110 | } |
| 111 | .top-center { | 111 | .top-center { |
| 112 | position: absolute; | 112 | position: absolute; |
| 113 | - transform: translateY(100%); /* 垂直与水平居中 */ | 113 | + transform: translateY(50%); /* 垂直与水平居中 */ |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | 116 | ||
| ... | @@ -138,7 +138,7 @@ export default { | ... | @@ -138,7 +138,7 @@ export default { |
| 138 | } | 138 | } |
| 139 | .card-image { | 139 | .card-image { |
| 140 | width: 100%; | 140 | width: 100%; |
| 141 | - height: auto; | 141 | + height: 26rem; |
| 142 | object-fit: cover; | 142 | object-fit: cover; |
| 143 | } | 143 | } |
| 144 | 144 | ... | ... |
-
Please register or login to post a comment