Showing
2 changed files
with
64 additions
and
28 deletions
| ... | @@ -11,6 +11,7 @@ declare module 'vue' { | ... | @@ -11,6 +11,7 @@ declare module 'vue' { |
| 11 | ElBreadcrumbItem: typeof import('element-ui/lib/breadcrumb-item')['default'] | 11 | ElBreadcrumbItem: typeof import('element-ui/lib/breadcrumb-item')['default'] |
| 12 | ElCarousel: typeof import('element-ui/lib/carousel')['default'] | 12 | ElCarousel: typeof import('element-ui/lib/carousel')['default'] |
| 13 | ElCarouselItem: typeof import('element-ui/lib/carousel-item')['default'] | 13 | ElCarouselItem: typeof import('element-ui/lib/carousel-item')['default'] |
| 14 | + ElCheckbox: typeof import('element-ui/lib/checkbox')['default'] | ||
| 14 | ElCol: typeof import('element-ui/lib/col')['default'] | 15 | ElCol: typeof import('element-ui/lib/col')['default'] |
| 15 | ElCollapse: typeof import('element-ui/lib/collapse')['default'] | 16 | ElCollapse: typeof import('element-ui/lib/collapse')['default'] |
| 16 | ElCollapseItem: typeof import('element-ui/lib/collapse-item')['default'] | 17 | ElCollapseItem: typeof import('element-ui/lib/collapse-item')['default'] | ... | ... |
| 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-20 21:33:43 | 4 | + * @LastEditTime: 2024-10-21 11:30:52 |
| 5 | * @FilePath: /hager/src/views/index.vue | 5 | * @FilePath: /hager/src/views/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -48,7 +48,7 @@ | ... | @@ -48,7 +48,7 @@ |
| 48 | </div> | 48 | </div> |
| 49 | </div> | 49 | </div> |
| 50 | <div class="more-box" style="margin-top: 1rem;"> | 50 | <div class="more-box" style="margin-top: 1rem;"> |
| 51 | - <hager-more></hager-more> | 51 | + <hager-more @click.native="getToGroup"></hager-more> |
| 52 | </div> | 52 | </div> |
| 53 | </div> | 53 | </div> |
| 54 | </hager-box> | 54 | </hager-box> |
| ... | @@ -84,7 +84,6 @@ | ... | @@ -84,7 +84,6 @@ |
| 84 | </div> | 84 | </div> |
| 85 | </hager-box> | 85 | </hager-box> |
| 86 | <hager-box class="box-n"> | 86 | <hager-box class="box-n"> |
| 87 | - <!-- TODO: 待完善, 产品分类跳转,没有更多分类了? --> | ||
| 88 | <hager-h1 title="产品中心" sub="Product"></hager-h1> | 87 | <hager-h1 title="产品中心" sub="Product"></hager-h1> |
| 89 | <!-- <div v-if="!is_xs" class="hager-product-center"> | 88 | <!-- <div v-if="!is_xs" class="hager-product-center"> |
| 90 | <el-row :gutter="15"> | 89 | <el-row :gutter="15"> |
| ... | @@ -108,11 +107,11 @@ | ... | @@ -108,11 +107,11 @@ |
| 108 | </div> | 107 | </div> |
| 109 | </swiper-slide> | 108 | </swiper-slide> |
| 110 | </swiper> | 109 | </swiper> |
| 111 | - <div v-if="product_list.length <= productSlidesPerView" class="more-box" style="margin-top: 2rem;"> | 110 | + <!-- <div v-if="product_list.length <= productSlidesPerView" class="more-box" style="margin-top: 2rem;"> |
| 112 | - <hager-more></hager-more> | ||
| 113 | - </div> | ||
| 114 | - <div v-else class="hager-product-center-more xs"> | ||
| 115 | <hager-more></hager-more> | 111 | <hager-more></hager-more> |
| 112 | + </div> --> | ||
| 113 | + <div v-if="product_list.length > productSlidesPerView" class="hager-product-center-more xs"> | ||
| 114 | + <!-- <hager-more></hager-more> --> | ||
| 116 | <div class="xs-control"> | 115 | <div class="xs-control"> |
| 117 | <div> | 116 | <div> |
| 118 | <i :class="['el-icon-arrow-left', activeProductIndex === 0 ? 'disabled' : '']" @click="prevProductBtn()"></i> | 117 | <i :class="['el-icon-arrow-left', activeProductIndex === 0 ? 'disabled' : '']" @click="prevProductBtn()"></i> |
| ... | @@ -127,27 +126,27 @@ | ... | @@ -127,27 +126,27 @@ |
| 127 | <div class="news-container"> | 126 | <div class="news-container"> |
| 128 | <el-row :gutter="0" v-for="(item, index) in news_list" :key="index"> | 127 | <el-row :gutter="0" v-for="(item, index) in news_list" :key="index"> |
| 129 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> | 128 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> |
| 130 | - <img class="news-item-img" v-if="index % 2 === 0" :src="item.src" alt="News Image 1"> | 129 | + <img class="news-item-img" v-if="index % 2 === 0" :src="item.src"> |
| 131 | - <div v-else @click="goToNew(item)" class="news-item"> | 130 | + <div v-else class="news-item"> |
| 132 | <div class="news-item-title">{{ item.title }}</div> | 131 | <div class="news-item-title">{{ item.title }}</div> |
| 133 | <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> | 132 | <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> |
| 134 | <p class="news-item-content" v-clamp="3">{{ item.content }}</p> | 133 | <p class="news-item-content" v-clamp="3">{{ item.content }}</p> |
| 135 | - <div class="news-item-more" style="margin-top: 3rem;">MORE</div> | 134 | + <div @click="goToNew(item)" class="news-item-more" style="margin-top: 3rem;">MORE</div> |
| 136 | </div> | 135 | </div> |
| 137 | </el-col> | 136 | </el-col> |
| 138 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> | 137 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> |
| 139 | - <div v-if="index % 2 === 0" @click="goToNew(item)" class="news-item"> | 138 | + <div v-if="index % 2 === 0" class="news-item"> |
| 140 | <div class="news-item-title">{{ item.title }}</div> | 139 | <div class="news-item-title">{{ item.title }}</div> |
| 141 | <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> | 140 | <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> |
| 142 | <p class="news-item-content" v-clamp="3">{{ item.content }}</p> | 141 | <p class="news-item-content" v-clamp="3">{{ item.content }}</p> |
| 143 | - <div class="news-item-more" style="margin-top: 3rem;">MORE</div> | 142 | + <div @click="goToNew(item)" class="news-item-more" style="margin-top: 3rem;">MORE</div> |
| 144 | </div> | 143 | </div> |
| 145 | - <img class="news-item-img" v-else :src="item.src" alt="News Image 1"> | 144 | + <img class="news-item-img" v-else :src="item.src"> |
| 146 | </el-col> | 145 | </el-col> |
| 147 | </el-row> | 146 | </el-row> |
| 148 | </div> | 147 | </div> |
| 149 | <div class="more-box" style="margin-top: 3rem;"> | 148 | <div class="more-box" style="margin-top: 3rem;"> |
| 150 | - <hager-more></hager-more> | 149 | + <hager-more @click.native="goToNews"></hager-more> |
| 151 | </div> | 150 | </div> |
| 152 | </hager-box> | 151 | </hager-box> |
| 153 | <div v-else style="background-color: #f9f9f9; padding-bottom: 1rem;"> | 152 | <div v-else style="background-color: #f9f9f9; padding-bottom: 1rem;"> |
| ... | @@ -156,11 +155,11 @@ | ... | @@ -156,11 +155,11 @@ |
| 156 | <el-row :gutter="0" v-for="(item, index) in news_list" :key="index"> | 155 | <el-row :gutter="0" v-for="(item, index) in news_list" :key="index"> |
| 157 | <el-col :span="24"> | 156 | <el-col :span="24"> |
| 158 | <img class="news-item-img xs" :src="item.src" alt="News Image 1"> | 157 | <img class="news-item-img xs" :src="item.src" alt="News Image 1"> |
| 159 | - <div @click="goToNew(item)" class="news-item xs"> | 158 | + <div class="news-item xs"> |
| 160 | <div class="news-item-title">{{ item.title }}</div> | 159 | <div class="news-item-title">{{ item.title }}</div> |
| 161 | <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> | 160 | <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> |
| 162 | <p class="news-item-content" v-clamp="3">{{ item.content }}</p> | 161 | <p class="news-item-content" v-clamp="3">{{ item.content }}</p> |
| 163 | - <div class="news-item-more">MORE</div> | 162 | + <div class="news-item-more" @click="goToNew(item)">MORE</div> |
| 164 | </div> | 163 | </div> |
| 165 | </el-col> | 164 | </el-col> |
| 166 | </el-row> | 165 | </el-row> |
| ... | @@ -173,7 +172,7 @@ | ... | @@ -173,7 +172,7 @@ |
| 173 | <hager-h1 title="招聘信息" sub="Recruitment"></hager-h1> | 172 | <hager-h1 title="招聘信息" sub="Recruitment"></hager-h1> |
| 174 | <p style="margin: 2rem 0;">德国匠心,专注为你。海格集团招贤纳士,携手前行!我们诚邀各界精英加入我们的行列,共同书写成功的篇章。用你的才华,创造无限可能! </p> | 173 | <p style="margin: 2rem 0;">德国匠心,专注为你。海格集团招贤纳士,携手前行!我们诚邀各界精英加入我们的行列,共同书写成功的篇章。用你的才华,创造无限可能! </p> |
| 175 | <div class="more-box" style="margin-top: 2rem;"> | 174 | <div class="more-box" style="margin-top: 2rem;"> |
| 176 | - <hager-more></hager-more> | 175 | + <hager-more @click.native="goToRecruit"></hager-more> |
| 177 | </div> | 176 | </div> |
| 178 | </hager-box> | 177 | </hager-box> |
| 179 | </div> | 178 | </div> |
| ... | @@ -223,37 +222,48 @@ export default { | ... | @@ -223,37 +222,48 @@ export default { |
| 223 | }], | 222 | }], |
| 224 | screen_width: 0, | 223 | screen_width: 0, |
| 225 | solution_list: [{ | 224 | solution_list: [{ |
| 226 | - src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', | 225 | + id: '1', |
| 226 | + src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 227 | title: '1住宅解决方案' | 227 | title: '1住宅解决方案' |
| 228 | }, { | 228 | }, { |
| 229 | - src: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg', | 229 | + id: '1', |
| 230 | + src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 230 | title: '2住宅解决方案' | 231 | title: '2住宅解决方案' |
| 231 | }, { | 232 | }, { |
| 232 | - src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', | 233 | + id: '1', |
| 234 | + src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 233 | title: '3住宅解决方案' | 235 | title: '3住宅解决方案' |
| 234 | }, { | 236 | }, { |
| 235 | - src: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg', | 237 | + id: '1', |
| 238 | + src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 236 | title: '4住宅解决方案' | 239 | title: '4住宅解决方案' |
| 237 | }, { | 240 | }, { |
| 238 | - src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', | 241 | + id: '1', |
| 242 | + src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 239 | title: '3住宅解决方案' | 243 | title: '3住宅解决方案' |
| 240 | }, { | 244 | }, { |
| 241 | - src: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg', | 245 | + id: '1', |
| 246 | + src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 242 | title: '4住宅解决方案' | 247 | title: '4住宅解决方案' |
| 243 | }], | 248 | }], |
| 244 | product_list: [{ | 249 | product_list: [{ |
| 250 | + id: '1', | ||
| 245 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | 251 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', |
| 246 | title: '配电产品' | 252 | title: '配电产品' |
| 247 | }, { | 253 | }, { |
| 254 | + id: '1', | ||
| 248 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | 255 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', |
| 249 | title: '成套产品' | 256 | title: '成套产品' |
| 250 | }, { | 257 | }, { |
| 258 | + id: '1', | ||
| 251 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | 259 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', |
| 252 | title: '开关面板' | 260 | title: '开关面板' |
| 253 | }, { | 261 | }, { |
| 262 | + id: '1', | ||
| 254 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | 263 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', |
| 255 | title: '智能控制' | 264 | title: '智能控制' |
| 256 | }, { | 265 | }, { |
| 266 | + id: '1', | ||
| 257 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | 267 | src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', |
| 258 | title: '能源管理' | 268 | title: '能源管理' |
| 259 | }], | 269 | }], |
| ... | @@ -312,6 +322,11 @@ export default { | ... | @@ -312,6 +322,11 @@ export default { |
| 312 | } | 322 | } |
| 313 | }, | 323 | }, |
| 314 | methods: { | 324 | methods: { |
| 325 | + getToGroup () { | ||
| 326 | + this.$router.push({ | ||
| 327 | + path: '/about/global' | ||
| 328 | + }); | ||
| 329 | + }, | ||
| 315 | splitListIntoChunks (list) { | 330 | splitListIntoChunks (list) { |
| 316 | const chunkSize = 4; // 每组4个项目 | 331 | const chunkSize = 4; // 每组4个项目 |
| 317 | const result = []; | 332 | const result = []; |
| ... | @@ -332,7 +347,20 @@ export default { | ... | @@ -332,7 +347,20 @@ export default { |
| 332 | }, | 347 | }, |
| 333 | goToNew (v) { | 348 | goToNew (v) { |
| 334 | this.$router.push({ | 349 | this.$router.push({ |
| 335 | - path: '/news/detail' | 350 | + path: '/news/detail', |
| 351 | + query: { | ||
| 352 | + id: v.id | ||
| 353 | + } | ||
| 354 | + }); | ||
| 355 | + }, | ||
| 356 | + goToNews () { | ||
| 357 | + this.$router.push({ | ||
| 358 | + path: '/news' | ||
| 359 | + }); | ||
| 360 | + }, | ||
| 361 | + goToRecruit () { | ||
| 362 | + this.$router.push({ | ||
| 363 | + path: '/recruit' | ||
| 336 | }); | 364 | }); |
| 337 | }, | 365 | }, |
| 338 | goToSolution (v) { | 366 | goToSolution (v) { |
| ... | @@ -408,6 +436,12 @@ export default { | ... | @@ -408,6 +436,12 @@ export default { |
| 408 | span.strong { | 436 | span.strong { |
| 409 | color: @primary-color; | 437 | color: @primary-color; |
| 410 | } | 438 | } |
| 439 | + i { | ||
| 440 | + color: #F56400; | ||
| 441 | + &:hover { | ||
| 442 | + cursor: pointer; | ||
| 443 | + } | ||
| 444 | + } | ||
| 411 | } | 445 | } |
| 412 | } | 446 | } |
| 413 | .hager-global-info { | 447 | .hager-global-info { |
| ... | @@ -518,9 +552,6 @@ export default { | ... | @@ -518,9 +552,6 @@ export default { |
| 518 | &.xs { | 552 | &.xs { |
| 519 | padding: 2rem; | 553 | padding: 2rem; |
| 520 | } | 554 | } |
| 521 | - &:hover { | ||
| 522 | - cursor: pointer; | ||
| 523 | - } | ||
| 524 | .news-item-title { | 555 | .news-item-title { |
| 525 | font-weight: bold; | 556 | font-weight: bold; |
| 526 | font-size: 1.35rem; | 557 | font-size: 1.35rem; |
| ... | @@ -550,6 +581,10 @@ export default { | ... | @@ -550,6 +581,10 @@ export default { |
| 550 | width: 5rem; | 581 | width: 5rem; |
| 551 | text-align: center; | 582 | text-align: center; |
| 552 | font-size: 0.8rem; | 583 | font-size: 0.8rem; |
| 584 | + | ||
| 585 | + &:hover { | ||
| 586 | + cursor: pointer; | ||
| 587 | + } | ||
| 553 | } | 588 | } |
| 554 | // i { | 589 | // i { |
| 555 | // color: @primary-color; | 590 | // color: @primary-color; |
| ... | @@ -606,7 +641,7 @@ export default { | ... | @@ -606,7 +641,7 @@ export default { |
| 606 | justify-content: center; | 641 | justify-content: center; |
| 607 | margin-top: 2rem; | 642 | margin-top: 2rem; |
| 608 | &.xs { | 643 | &.xs { |
| 609 | - justify-content: space-between; | 644 | + justify-content: flex-end; |
| 610 | padding-left: 20%; | 645 | padding-left: 20%; |
| 611 | } | 646 | } |
| 612 | } | 647 | } | ... | ... |
-
Please register or login to post a comment