Showing
3 changed files
with
111 additions
and
4 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2024-08-26 10:42:15 | 2 | * @Date: 2024-08-26 10:42:15 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-23 16:46:46 | 4 | + * @LastEditTime: 2024-11-04 09:33:28 |
| 5 | * @FilePath: /hager/src/route.js | 5 | * @FilePath: /hager/src/route.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -51,6 +51,15 @@ export default [{ | ... | @@ -51,6 +51,15 @@ export default [{ |
| 51 | }, | 51 | }, |
| 52 | children: [] | 52 | children: [] |
| 53 | }, { | 53 | }, { |
| 54 | + path: '/solution/case', | ||
| 55 | + name: '成功案例', | ||
| 56 | + component: () => import('@/views/solution/case'), | ||
| 57 | + meta: { | ||
| 58 | + title: '海格电气', | ||
| 59 | + tag: 'solution' | ||
| 60 | + }, | ||
| 61 | + children: [] | ||
| 62 | +}, { | ||
| 54 | path: '/about', | 63 | path: '/about', |
| 55 | name: '关于海格', | 64 | name: '关于海格', |
| 56 | component: () => import('@/views/about'), | 65 | component: () => import('@/views/about'), | ... | ... |
src/views/solution/case.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2024-10-18 12:06:09 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2024-11-04 09:40:35 | ||
| 5 | + * @FilePath: /hager/src/views/solution/case.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <div class="hager-case-page"> | ||
| 10 | + <hager-box> | ||
| 11 | + <div style="margin-top: 1.5rem;"> | ||
| 12 | + <el-breadcrumb separator="/"> | ||
| 13 | + <el-breadcrumb-item v-if="!is_xs">解决方案</el-breadcrumb-item> | ||
| 14 | + <el-breadcrumb-item>商建解决方案</el-breadcrumb-item> | ||
| 15 | + <el-breadcrumb-item>成功案例</el-breadcrumb-item> | ||
| 16 | + </el-breadcrumb> | ||
| 17 | + </div> | ||
| 18 | + </hager-box> | ||
| 19 | + <hager-box class="box-n"> | ||
| 20 | + <hager-h1 title="深圳华侨城洲际酒店" sub="异域风情 奢华享受"></hager-h1> | ||
| 21 | + </hager-box> | ||
| 22 | + <hager-box> | ||
| 23 | + <div class="case-title">{{ title }}</div> | ||
| 24 | + <div :class="['case-content', is_xs ? 'xs' : '']" v-html="content"></div> | ||
| 25 | + </hager-box> | ||
| 26 | + </div> | ||
| 27 | +</template> | ||
| 28 | + | ||
| 29 | +<script> | ||
| 30 | +import mixin from 'common/mixin'; | ||
| 31 | +import hagerBox from '@/components/common/hagerBox'; | ||
| 32 | +import hagerH1 from '@/components/common/hagerH1.vue'; | ||
| 33 | +import { getNewsDetailAPI } from "@/api/hager.js"; | ||
| 34 | + | ||
| 35 | +export default { | ||
| 36 | + components: { hagerBox }, | ||
| 37 | + mixins: [mixin.init], | ||
| 38 | + data () { | ||
| 39 | + return { | ||
| 40 | + title: '默认标题', | ||
| 41 | + content: '默认内容', | ||
| 42 | + } | ||
| 43 | + }, | ||
| 44 | + async mounted () { | ||
| 45 | + const { code, data } = await getNewsDetailAPI({ id: this.$route.query.id }); | ||
| 46 | + if (code) { | ||
| 47 | + this.title = data.post_title; | ||
| 48 | + this.content = data.product_advantages; | ||
| 49 | + } | ||
| 50 | + }, | ||
| 51 | + methods: { | ||
| 52 | + | ||
| 53 | + } | ||
| 54 | +} | ||
| 55 | +</script> | ||
| 56 | + | ||
| 57 | +<style lang="less" scoped> | ||
| 58 | + .hager-case-page { | ||
| 59 | + .top-img { | ||
| 60 | + width: 100%; | ||
| 61 | + background-repeat: no-repeat; | ||
| 62 | + background-size: cover; | ||
| 63 | + background-position: center; | ||
| 64 | + position: relative; | ||
| 65 | + height: 25rem; | ||
| 66 | + &.xs { | ||
| 67 | + height: 12rem; | ||
| 68 | + } | ||
| 69 | + .top-center { | ||
| 70 | + position: absolute; | ||
| 71 | + transform: translateY(50%); /* 垂直与水平居中 */ | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + .case-title { | ||
| 76 | + color: @secondary-color; | ||
| 77 | + text-align: center; | ||
| 78 | + font-size: 1.75rem; | ||
| 79 | + font-weight: bold; | ||
| 80 | + margin: 3rem 0; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + :deep(.case-content) { | ||
| 84 | + margin-bottom: 2rem; | ||
| 85 | + &.xs { | ||
| 86 | + img { | ||
| 87 | + width: 100%; | ||
| 88 | + height: auto; | ||
| 89 | + } | ||
| 90 | + } | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | +</style> |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-29 15:49:27 | 2 | * @Date: 2024-09-29 15:49:27 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-11-01 11:52:12 | 4 | + * @LastEditTime: 2024-11-04 09:34:50 |
| 5 | * @FilePath: /hager/src/views/solution/detail.vue | 5 | * @FilePath: /hager/src/views/solution/detail.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -56,7 +56,7 @@ | ... | @@ -56,7 +56,7 @@ |
| 56 | <hager-h1 title="成功案例" sub="Success Cases" style="margin: 2rem 0;"></hager-h1> | 56 | <hager-h1 title="成功案例" sub="Success Cases" style="margin: 2rem 0;"></hager-h1> |
| 57 | <div v-if="!is_xs"> | 57 | <div v-if="!is_xs"> |
| 58 | <div class="hager-success-cases"> | 58 | <div class="hager-success-cases"> |
| 59 | - <div class="card" v-for="(item, index) in success_data_list" :key="index"> | 59 | + <div @click="goToCase(item)" class="card" v-for="(item, index) in success_data_list" :key="index"> |
| 60 | <img :src="item.img" alt="学校图片" class="card-image"> | 60 | <img :src="item.img" alt="学校图片" class="card-image"> |
| 61 | <div class="card-content"> | 61 | <div class="card-content"> |
| 62 | <h3>{{ item.title }}</h3> | 62 | <h3>{{ item.title }}</h3> |
| ... | @@ -72,7 +72,7 @@ | ... | @@ -72,7 +72,7 @@ |
| 72 | <div v-else> | 72 | <div v-else> |
| 73 | <swiper ref="mySuccessSwiper" class="swiper" :options="swiperOption" @slideChange="onSuccessSlideChange"> | 73 | <swiper ref="mySuccessSwiper" class="swiper" :options="swiperOption" @slideChange="onSuccessSlideChange"> |
| 74 | <swiper-slide v-for="(item, index) in success_data_list" :key="index"> | 74 | <swiper-slide v-for="(item, index) in success_data_list" :key="index"> |
| 75 | - <div class="hager-success-cases xs"> | 75 | + <div @click="goToCase(item)" class="hager-success-cases xs"> |
| 76 | <div class="card"> | 76 | <div class="card"> |
| 77 | <img :src="item.img" alt="学校图片" class="card-image"> | 77 | <img :src="item.img" alt="学校图片" class="card-image"> |
| 78 | <div class="card-content"> | 78 | <div class="card-content"> |
| ... | @@ -261,6 +261,11 @@ export default { | ... | @@ -261,6 +261,11 @@ export default { |
| 261 | path: '/product/detail' | 261 | path: '/product/detail' |
| 262 | }); | 262 | }); |
| 263 | }, | 263 | }, |
| 264 | + goToCase (v) { | ||
| 265 | + this.$router.push({ | ||
| 266 | + path: '/solution/case' | ||
| 267 | + }); | ||
| 268 | + }, | ||
| 264 | prevProductBtn () { | 269 | prevProductBtn () { |
| 265 | this.$refs.myProductSwiper.$swiper.slidePrev(); | 270 | this.$refs.myProductSwiper.$swiper.slidePrev(); |
| 266 | }, | 271 | }, | ... | ... |
-
Please register or login to post a comment