Showing
5 changed files
with
53 additions
and
133 deletions
| ... | @@ -22,7 +22,6 @@ declare module 'vue' { | ... | @@ -22,7 +22,6 @@ declare module 'vue' { |
| 22 | ElRow: typeof import('element-ui/lib/row')['default'] | 22 | ElRow: typeof import('element-ui/lib/row')['default'] |
| 23 | ElTabPane: typeof import('element-ui/lib/tab-pane')['default'] | 23 | ElTabPane: typeof import('element-ui/lib/tab-pane')['default'] |
| 24 | ElTabs: typeof import('element-ui/lib/tabs')['default'] | 24 | ElTabs: typeof import('element-ui/lib/tabs')['default'] |
| 25 | - ElTooltip: typeof import('element-ui/lib/tooltip')['default'] | ||
| 26 | HagerBox: typeof import('./src/components/common/hagerBox.vue')['default'] | 25 | HagerBox: typeof import('./src/components/common/hagerBox.vue')['default'] |
| 27 | HagerCarousel: typeof import('./src/components/hagerCarousel.vue')['default'] | 26 | HagerCarousel: typeof import('./src/components/hagerCarousel.vue')['default'] |
| 28 | HagerFooter: typeof import('./src/components/common/hagerFooter.vue')['default'] | 27 | HagerFooter: typeof import('./src/components/common/hagerFooter.vue')['default'] | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Date: 2024-09-26 13:36:06 | 2 | * @Date: 2024-09-26 13:36:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-24 09:34:46 | 4 | + * @LastEditTime: 2024-10-24 10:26:13 |
| 5 | * @FilePath: /hager/src/api/hager.js | 5 | * @FilePath: /hager/src/api/hager.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -15,6 +15,7 @@ const Api = { | ... | @@ -15,6 +15,7 @@ const Api = { |
| 15 | PRODUCT_CATE: '/srv/?a=cate&type=product', | 15 | PRODUCT_CATE: '/srv/?a=cate&type=product', |
| 16 | PRODUCT_INFO: '/srv/?a=detail&type=product', | 16 | PRODUCT_INFO: '/srv/?a=detail&type=product', |
| 17 | PRODUCT_SEARCH: '/srv/?a=cate&type=product_search', | 17 | PRODUCT_SEARCH: '/srv/?a=cate&type=product_search', |
| 18 | + SOLUTION: '/srv/?a=cate&type=solution', | ||
| 18 | }; | 19 | }; |
| 19 | 20 | ||
| 20 | export const honorAPI = (params) => fn(fetch.get(Api.HONOR, params)); | 21 | export const honorAPI = (params) => fn(fetch.get(Api.HONOR, params)); |
| ... | @@ -30,3 +31,5 @@ export const getProductCateAPI = (params) => fn(fetch.get(Api.PRODUCT_CATE, para | ... | @@ -30,3 +31,5 @@ export const getProductCateAPI = (params) => fn(fetch.get(Api.PRODUCT_CATE, para |
| 30 | export const getProductInfoAPI = (params) => fn(fetch.get(Api.PRODUCT_INFO, params)); | 31 | export const getProductInfoAPI = (params) => fn(fetch.get(Api.PRODUCT_INFO, params)); |
| 31 | 32 | ||
| 32 | export const getProductSearchAPI = (params) => fn(fetch.get(Api.PRODUCT_SEARCH, params)); | 33 | export const getProductSearchAPI = (params) => fn(fetch.get(Api.PRODUCT_SEARCH, params)); |
| 34 | + | ||
| 35 | +export const getSolutionListAPI = (params) => fn(fetch.get(Api.SOLUTION, params)); | ... | ... |
| 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-23 16:32:21 | 4 | + * @LastEditTime: 2024-10-24 10:52:43 |
| 5 | * @FilePath: /hager/src/views/index.vue | 5 | * @FilePath: /hager/src/views/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -60,9 +60,9 @@ | ... | @@ -60,9 +60,9 @@ |
| 60 | <div | 60 | <div |
| 61 | @click="goToSolution(x)" | 61 | @click="goToSolution(x)" |
| 62 | :class="['solution-item', x.id === 'other' ? 'other' : '']" | 62 | :class="['solution-item', x.id === 'other' ? 'other' : '']" |
| 63 | - :style="{ backgroundImage: 'url('+x.src+')' }" | 63 | + :style="{ backgroundImage: 'url('+x.cover+')' }" |
| 64 | > | 64 | > |
| 65 | - <p>{{ x.title }}</p> | 65 | + <p>{{ x.category_name }}</p> |
| 66 | </div> | 66 | </div> |
| 67 | </el-col> | 67 | </el-col> |
| 68 | </el-row> | 68 | </el-row> |
| ... | @@ -70,8 +70,8 @@ | ... | @@ -70,8 +70,8 @@ |
| 70 | <div v-else> | 70 | <div v-else> |
| 71 | <swiper ref="mySolutionSwiper" class="swiper" :options="swiperOption" @slideChange="onSolutionSlideChange"> | 71 | <swiper ref="mySolutionSwiper" class="swiper" :options="swiperOption" @slideChange="onSolutionSlideChange"> |
| 72 | <swiper-slide v-for="(item, index) in solution_list" :key="index"> | 72 | <swiper-slide v-for="(item, index) in solution_list" :key="index"> |
| 73 | - <div @click="goToSolution(item)" class="solution-item xs" :style="{ backgroundImage: 'url('+item.src+')' }"> | 73 | + <div @click="goToSolution(item)" class="solution-item xs" :style="{ backgroundImage: 'url('+item.cover+')' }"> |
| 74 | - <p @click="goToSolution(item)">{{ item.title }}</p> | 74 | + <p @click="goToSolution(item)">{{ item.category_name }}</p> |
| 75 | </div> | 75 | </div> |
| 76 | </swiper-slide> | 76 | </swiper-slide> |
| 77 | </swiper> | 77 | </swiper> |
| ... | @@ -118,7 +118,7 @@ | ... | @@ -118,7 +118,7 @@ |
| 118 | <i :class="['el-icon-arrow-right', reach_product_end ? 'disabled' : '']" @click="nextProductBtn()"></i> | 118 | <i :class="['el-icon-arrow-right', reach_product_end ? 'disabled' : '']" @click="nextProductBtn()"></i> |
| 119 | </div> | 119 | </div> |
| 120 | </div> | 120 | </div> |
| 121 | - </div> | 121 | + </div>{{ product_list.length > productSlidesPerView }}/{{ is_xs }}/{{ !isEnd }} |
| 122 | </div> | 122 | </div> |
| 123 | </hager-box> | 123 | </hager-box> |
| 124 | <hager-box v-if="!is_xs" class="box-2n"> | 124 | <hager-box v-if="!is_xs" class="box-2n"> |
| ... | @@ -126,22 +126,22 @@ | ... | @@ -126,22 +126,22 @@ |
| 126 | <div class="news-container"> | 126 | <div class="news-container"> |
| 127 | <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"> |
| 128 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> | 128 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> |
| 129 | - <img class="news-item-img" v-if="index % 2 === 0" :src="item.src"> | 129 | + <img class="news-item-img" v-if="index % 2 === 0" :src="item.cover"> |
| 130 | <div v-else class="news-item"> | 130 | <div v-else class="news-item"> |
| 131 | - <div class="news-item-title">{{ item.title }}</div> | 131 | + <div class="news-item-title">{{ item.post_title }}</div> |
| 132 | - <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> | 132 | + <p class="news-item-sub" v-clamp="2">{{ item.post_title_en }}</p> |
| 133 | - <p class="news-item-content" v-clamp="3">{{ item.content }}</p> | 133 | + <p class="news-item-content" v-clamp="3">{{ item.post_excerpt }}</p> |
| 134 | <div @click="goToNew(item)" 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> |
| 135 | </div> | 135 | </div> |
| 136 | </el-col> | 136 | </el-col> |
| 137 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> | 137 | <el-col :span="12" style="background-color: #FFF; height: 25rem;"> |
| 138 | <div v-if="index % 2 === 0" class="news-item"> | 138 | <div v-if="index % 2 === 0" class="news-item"> |
| 139 | - <div class="news-item-title">{{ item.title }}</div> | 139 | + <div class="news-item-title">{{ item.post_title }}</div> |
| 140 | - <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> | 140 | + <p class="news-item-sub" v-clamp="2">{{ item.post_title_en }}</p> |
| 141 | - <p class="news-item-content" v-clamp="3">{{ item.content }}</p> | 141 | + <p class="news-item-content" v-clamp="3">{{ item.post_excerpt }}</p> |
| 142 | <div @click="goToNew(item)" 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> |
| 143 | </div> | 143 | </div> |
| 144 | - <img class="news-item-img" v-else :src="item.src"> | 144 | + <img class="news-item-img" v-else :src="item.cover"> |
| 145 | </el-col> | 145 | </el-col> |
| 146 | </el-row> | 146 | </el-row> |
| 147 | </div> | 147 | </div> |
| ... | @@ -154,11 +154,11 @@ | ... | @@ -154,11 +154,11 @@ |
| 154 | <div class="news-container xs"> | 154 | <div class="news-container xs"> |
| 155 | <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"> |
| 156 | <el-col :span="24"> | 156 | <el-col :span="24"> |
| 157 | - <img class="news-item-img xs" :src="item.src" alt="News Image 1"> | 157 | + <img class="news-item-img xs" :src="item.cover" alt="News Image 1"> |
| 158 | <div class="news-item xs"> | 158 | <div class="news-item xs"> |
| 159 | - <div class="news-item-title">{{ item.title }}</div> | 159 | + <div class="news-item-title">{{ item.post_title }}</div> |
| 160 | - <p class="news-item-sub" v-clamp="2">{{ item.sub }}</p> | 160 | + <p class="news-item-sub" v-clamp="2">{{ item.post_title_en }}</p> |
| 161 | - <p class="news-item-content" v-clamp="3">{{ item.content }}</p> | 161 | + <p class="news-item-content" v-clamp="3">{{ item.post_excerpt }}</p> |
| 162 | <div class="news-item-more" @click="goToNew(item)">MORE</div> | 162 | <div class="news-item-more" @click="goToNew(item)">MORE</div> |
| 163 | </div> | 163 | </div> |
| 164 | </el-col> | 164 | </el-col> |
| ... | @@ -205,69 +205,10 @@ export default { | ... | @@ -205,69 +205,10 @@ export default { |
| 205 | src: 'https://cdn.ipadbiz.cn/hager/banner/banner01@2x.png', | 205 | src: 'https://cdn.ipadbiz.cn/hager/banner/banner01@2x.png', |
| 206 | }, | 206 | }, |
| 207 | ], | 207 | ], |
| 208 | - news_list: [{ | 208 | + news_list: [], |
| 209 | - src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', | ||
| 210 | - title: '获奖+1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀', | ||
| 211 | - content: '11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整', | ||
| 212 | - sub: 'o Ehe gy aha oid asto Ehe gy aha oid asto Ehe gy aha oid ast o Ehe gy aha oid asto Ehe gy aha oid asto Ehe gy aha oid astgy aha oid asto Ehe gy aha oid asto Ehe gy aha oid ast' | ||
| 213 | - }, { | ||
| 214 | - src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', | ||
| 215 | - title: '获奖+1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀', | ||
| 216 | - content: '11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整', | ||
| 217 | - sub: 'o Ehe gy aha oid asto Ehe gy aha oid asto Ehe gy aha oid ast' | ||
| 218 | - }, { | ||
| 219 | - src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', | ||
| 220 | - title: '获奖+1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀国际标1!海格电气荣获2023酒店文旅优秀', | ||
| 221 | - content: '11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整11月28-29日,2023汤点文旅住宿节在苏州国际会议酒店隆重开幕,作为酒店整', | ||
| 222 | - sub: 'o Ehe gy aha oid asto Ehe gy aha oid asto Ehe gy aha oid ast' | ||
| 223 | - }], | ||
| 224 | screen_width: 0, | 209 | screen_width: 0, |
| 225 | - solution_list: [{ | 210 | + solution_list: [], |
| 226 | - id: '1', | 211 | + product_list: [], |
| 227 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 228 | - title: '1住宅解决方案' | ||
| 229 | - }, { | ||
| 230 | - id: '1', | ||
| 231 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 232 | - title: '2住宅解决方案' | ||
| 233 | - }, { | ||
| 234 | - id: '1', | ||
| 235 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 236 | - title: '3住宅解决方案' | ||
| 237 | - }, { | ||
| 238 | - id: '1', | ||
| 239 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 240 | - title: '4住宅解决方案' | ||
| 241 | - }, { | ||
| 242 | - id: '1', | ||
| 243 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 244 | - title: '3住宅解决方案' | ||
| 245 | - }, { | ||
| 246 | - id: '1', | ||
| 247 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 248 | - title: '4住宅解决方案' | ||
| 249 | - }], | ||
| 250 | - product_list: [{ | ||
| 251 | - id: '1', | ||
| 252 | - src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | ||
| 253 | - title: '配电产品' | ||
| 254 | - }, { | ||
| 255 | - id: '1', | ||
| 256 | - src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | ||
| 257 | - title: '成套产品' | ||
| 258 | - }, { | ||
| 259 | - id: '1', | ||
| 260 | - src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | ||
| 261 | - title: '开关面板' | ||
| 262 | - }, { | ||
| 263 | - id: '1', | ||
| 264 | - src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | ||
| 265 | - title: '智能控制' | ||
| 266 | - }, { | ||
| 267 | - id: '1', | ||
| 268 | - src: 'https://cdn.ipadbiz.cn/hager/img/pp01@2x.png', | ||
| 269 | - title: '能源管理' | ||
| 270 | - }], | ||
| 271 | swiperOption: { | 212 | swiperOption: { |
| 272 | slidesPerView: 2, | 213 | slidesPerView: 2, |
| 273 | spaceBetween: 20, | 214 | spaceBetween: 20, |
| ... | @@ -306,7 +247,7 @@ export default { | ... | @@ -306,7 +247,7 @@ export default { |
| 306 | reach_solution_end: false, | 247 | reach_solution_end: false, |
| 307 | reach_product_end: false, | 248 | reach_product_end: false, |
| 308 | productSlidesPerView: 5, | 249 | productSlidesPerView: 5, |
| 309 | - isEnd: true, | 250 | + isEnd: false, |
| 310 | } | 251 | } |
| 311 | }, | 252 | }, |
| 312 | async mounted () { | 253 | async mounted () { |
| ... | @@ -314,9 +255,12 @@ export default { | ... | @@ -314,9 +255,12 @@ export default { |
| 314 | if (code) { | 255 | if (code) { |
| 315 | console.warn(data); | 256 | console.warn(data); |
| 316 | this.product_list = data.product; | 257 | this.product_list = data.product; |
| 258 | + // this.banner_list = data.banner; | ||
| 259 | + this.solution_list = data.solution; | ||
| 260 | + this.news_list = data.news; | ||
| 317 | } | 261 | } |
| 318 | - this.isEnd = this.$refs.myProductSwiper.$swiper.isEnd; // 是否全部显示出来 | ||
| 319 | this.$nextTick(() => { | 262 | this.$nextTick(() => { |
| 263 | + this.isEnd = this.$refs.myProductSwiper.$swiper.isEnd; // 是否全部显示出来 | ||
| 320 | this.$refs.myProductSwiper.$swiper?.on('breakpoint', (swiper) => { | 264 | this.$refs.myProductSwiper.$swiper?.on('breakpoint', (swiper) => { |
| 321 | // breakpoint时 显示的条数 | 265 | // breakpoint时 显示的条数 |
| 322 | this.productSlidesPerView = swiper.slidesPerView; | 266 | this.productSlidesPerView = swiper.slidesPerView; |
| ... | @@ -346,7 +290,7 @@ export default { | ... | @@ -346,7 +290,7 @@ export default { |
| 346 | } | 290 | } |
| 347 | 291 | ||
| 348 | // 在最后一组添加 {src:'', title:'other'} | 292 | // 在最后一组添加 {src:'', title:'other'} |
| 349 | - result[result.length - 1].push({ id: 'other', src: '', title: 'Other解决方案' }); | 293 | + // result[result.length - 1].push({ id: 'other', cover: '', category_name: 'Other解决方案' }); |
| 350 | 294 | ||
| 351 | return result; | 295 | return result; |
| 352 | }, | 296 | }, | ... | ... |
| 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-10-21 14:43:11 | 4 | + * @LastEditTime: 2024-10-24 10:32:43 |
| 5 | * @FilePath: /hager/src/views/solution/detail.vue | 5 | * @FilePath: /hager/src/views/solution/detail.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -10,12 +10,12 @@ | ... | @@ -10,12 +10,12 @@ |
| 10 | <hager-box class="top-img" :style="{ height: top_img_height, backgroundImage: 'url(https://cdn.ipadbiz.cn/hager/banner/banner03@2x.png)' }"> | 10 | <hager-box class="top-img" :style="{ height: top_img_height, backgroundImage: 'url(https://cdn.ipadbiz.cn/hager/banner/banner03@2x.png)' }"> |
| 11 | <div v-if="!is_xs" class="banner-text-wrapper top-center"> | 11 | <div v-if="!is_xs" class="banner-text-wrapper top-center"> |
| 12 | <div class="text"> | 12 | <div class="text"> |
| 13 | - <p class="title">学校解决方案</p> | 13 | + <p class="title" style="margin-bottom: 0;">学校解决方案</p> |
| 14 | <p class="sub">Campus Solution</p> | 14 | <p class="sub">Campus Solution</p> |
| 15 | </div> | 15 | </div> |
| 16 | - <div class="text-sub"> | 16 | + <!-- <div class="text-sub"> |
| 17 | 海格用丰富的行业知识和应用经验,为多个行业提供先进的数字化解决方案。 | 17 | 海格用丰富的行业知识和应用经验,为多个行业提供先进的数字化解决方案。 |
| 18 | - </div> | 18 | + </div> --> |
| 19 | </div> | 19 | </div> |
| 20 | </hager-box> | 20 | </hager-box> |
| 21 | <hager-box v-if="!is_xs" class="box-n"> | 21 | <hager-box v-if="!is_xs" class="box-n"> |
| ... | @@ -29,7 +29,7 @@ | ... | @@ -29,7 +29,7 @@ |
| 29 | </el-col> | 29 | </el-col> |
| 30 | <el-col :span="12" class="brief-introduction"> | 30 | <el-col :span="12" class="brief-introduction"> |
| 31 | <div class="intro-box"> | 31 | <div class="intro-box"> |
| 32 | - <hager-h1 title="学校解决方案" sub="Electronic solutions"></hager-h1> | 32 | + <!-- <hager-h1 title="学校解决方案" sub="Electronic solutions"></hager-h1> --> |
| 33 | <p style="margin: 2rem 0;">淨於电气开乐驾能民电峰决方案,提供安全。可靠。摄作友好。易于堆护的电力划! 1h14. n53 X0(009121 3098. 228 41324849 56MeD 换至备用电源,保障救学和生活的连续性。</p> | 33 | <p style="margin: 2rem 0;">淨於电气开乐驾能民电峰决方案,提供安全。可靠。摄作友好。易于堆护的电力划! 1h14. n53 X0(009121 3098. 228 41324849 56MeD 换至备用电源,保障救学和生活的连续性。</p> |
| 34 | <i class="el-icon-right"></i> | 34 | <i class="el-icon-right"></i> |
| 35 | </div> | 35 | </div> |
| ... | @@ -308,7 +308,7 @@ export default { | ... | @@ -308,7 +308,7 @@ export default { |
| 308 | position: relative; | 308 | position: relative; |
| 309 | .top-center { | 309 | .top-center { |
| 310 | position: absolute; | 310 | position: absolute; |
| 311 | - transform: translateY(100%); /* 垂直与水平居中 */ | 311 | + transform: translateY(150%); /* 垂直与水平居中 */ |
| 312 | } | 312 | } |
| 313 | } | 313 | } |
| 314 | .carousel-img { | 314 | .carousel-img { |
| ... | @@ -324,6 +324,7 @@ export default { | ... | @@ -324,6 +324,7 @@ export default { |
| 324 | } | 324 | } |
| 325 | .intro-box { | 325 | .intro-box { |
| 326 | padding: 3rem; | 326 | padding: 3rem; |
| 327 | + padding-top: 0; | ||
| 327 | &.xs { | 328 | &.xs { |
| 328 | padding: 2rem; | 329 | padding: 2rem; |
| 329 | } | 330 | } | ... | ... |
| ... | @@ -26,11 +26,11 @@ | ... | @@ -26,11 +26,11 @@ |
| 26 | <div v-if="!is_xs" class="hager-industry-solutions"> | 26 | <div v-if="!is_xs" class="hager-industry-solutions"> |
| 27 | <el-row :gutter="15" v-for="(item, index) in splitListIntoChunks(solution_list)" :key="index"> | 27 | <el-row :gutter="15" v-for="(item, index) in splitListIntoChunks(solution_list)" :key="index"> |
| 28 | <el-col :span="6" v-for="(x, idx) in item" :key="idx"> | 28 | <el-col :span="6" v-for="(x, idx) in item" :key="idx"> |
| 29 | - <div @click="goToSolution(item)" class="card"> | 29 | + <div @click="goToSolution(x)" class="card"> |
| 30 | - <img :src="x.src" class="card-image"> | 30 | + <img :src="x.cover" class="card-image"> |
| 31 | <div class="card-content"> | 31 | <div class="card-content"> |
| 32 | <div class="card-title"> | 32 | <div class="card-title"> |
| 33 | - <span>{{ x.title }}</span> | 33 | + <span>{{ x.category_name }}</span> |
| 34 | <i class="el-icon-right" style="color: #00ABE5;"></i> | 34 | <i class="el-icon-right" style="color: #00ABE5;"></i> |
| 35 | </div> | 35 | </div> |
| 36 | <p class="card-sub">{{ x.sub }}</p> | 36 | <p class="card-sub">{{ x.sub }}</p> |
| ... | @@ -43,10 +43,10 @@ | ... | @@ -43,10 +43,10 @@ |
| 43 | <swiper ref="mySolutionSwiper" class="swiper" :options="swiperOption" @slideChange="onSlideChange()"> | 43 | <swiper ref="mySolutionSwiper" class="swiper" :options="swiperOption" @slideChange="onSlideChange()"> |
| 44 | <swiper-slide v-for="(item, index) in solution_list" :key="index"> | 44 | <swiper-slide v-for="(item, index) in solution_list" :key="index"> |
| 45 | <div @click="goToSolution(item)" class="card" style="margin-bottom: 1rem;"> | 45 | <div @click="goToSolution(item)" class="card" style="margin-bottom: 1rem;"> |
| 46 | - <img :src="item.src" alt="学校图片" class="card-image"> | 46 | + <img :src="item.cover" alt="学校图片" class="card-image"> |
| 47 | <div class="card-content"> | 47 | <div class="card-content"> |
| 48 | <div class="card-title"> | 48 | <div class="card-title"> |
| 49 | - <span>{{ item.title }}</span> | 49 | + <span>{{ item.category_name }}</span> |
| 50 | <i class="el-icon-right"></i> | 50 | <i class="el-icon-right"></i> |
| 51 | </div> | 51 | </div> |
| 52 | <p class="card-sub">{{ item.sub }}</p> | 52 | <p class="card-sub">{{ item.sub }}</p> |
| ... | @@ -61,9 +61,9 @@ | ... | @@ -61,9 +61,9 @@ |
| 61 | </div> | 61 | </div> |
| 62 | </div> | 62 | </div> |
| 63 | </div> | 63 | </div> |
| 64 | - <div class="more-box" style="margin-top: 2rem;"> | 64 | + <!-- <div class="more-box" style="margin-top: 2rem;"> |
| 65 | <hager-more></hager-more> | 65 | <hager-more></hager-more> |
| 66 | - </div> | 66 | + </div> --> |
| 67 | </hager-box> | 67 | </hager-box> |
| 68 | <hager-service></hager-service> | 68 | <hager-service></hager-service> |
| 69 | </div> | 69 | </div> |
| ... | @@ -75,45 +75,14 @@ import hagerBox from '@/components/common/hagerBox'; | ... | @@ -75,45 +75,14 @@ import hagerBox from '@/components/common/hagerBox'; |
| 75 | import hagerH1 from '@/components/common/hagerH1.vue'; | 75 | import hagerH1 from '@/components/common/hagerH1.vue'; |
| 76 | import hagerMore from '@/components/hagerMore.vue'; | 76 | import hagerMore from '@/components/hagerMore.vue'; |
| 77 | import hagerService from '@/components/common/hagerService.vue'; | 77 | import hagerService from '@/components/common/hagerService.vue'; |
| 78 | +import { getSolutionListAPI } from "@/api/hager.js"; | ||
| 78 | 79 | ||
| 79 | export default { | 80 | export default { |
| 80 | components: { hagerBox, hagerH1, hagerMore, hagerService }, | 81 | components: { hagerBox, hagerH1, hagerMore, hagerService }, |
| 81 | mixins: [mixin.init], | 82 | mixins: [mixin.init], |
| 82 | data () { | 83 | data () { |
| 83 | return { | 84 | return { |
| 84 | - solution_list: [{ | 85 | + solution_list: [], |
| 85 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 86 | - title: '1住宅解决方案', | ||
| 87 | - sub: 'Residential Solution Case' | ||
| 88 | - }, { | ||
| 89 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 90 | - title: '2住宅解决方案', | ||
| 91 | - sub: 'Residential Solution Case' | ||
| 92 | - }, { | ||
| 93 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 94 | - title: '3住宅解决方案', | ||
| 95 | - sub: 'Residential Solution Case' | ||
| 96 | - }, { | ||
| 97 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 98 | - title: '4住宅解决方案', | ||
| 99 | - sub: 'Residential Solution Case' | ||
| 100 | - }, { | ||
| 101 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 102 | - title: '1住宅解决方案', | ||
| 103 | - sub: 'Residential Solution Case' | ||
| 104 | - }, { | ||
| 105 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 106 | - title: '2住宅解决方案', | ||
| 107 | - sub: 'Residential Solution Case' | ||
| 108 | - }, { | ||
| 109 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 110 | - title: '3住宅解决方案', | ||
| 111 | - sub: 'Residential Solution Case' | ||
| 112 | - }, { | ||
| 113 | - src: 'https://cdn.ipadbiz.cn/hager/img/WX20241021-110827@2x.png', | ||
| 114 | - title: '4住宅解决方案', | ||
| 115 | - sub: 'Residential Solution Case' | ||
| 116 | - }], | ||
| 117 | swiperOption: { | 86 | swiperOption: { |
| 118 | slidesPerView: 2, | 87 | slidesPerView: 2, |
| 119 | spaceBetween: 50, | 88 | spaceBetween: 50, |
| ... | @@ -147,8 +116,11 @@ export default { | ... | @@ -147,8 +116,11 @@ export default { |
| 147 | reach_end: false, | 116 | reach_end: false, |
| 148 | } | 117 | } |
| 149 | }, | 118 | }, |
| 150 | - mounted () { | 119 | + async mounted () { |
| 151 | - | 120 | + const { code, data } = await getSolutionListAPI(); |
| 121 | + if (code) { | ||
| 122 | + this.solution_list = data; | ||
| 123 | + } | ||
| 152 | }, | 124 | }, |
| 153 | methods: { | 125 | methods: { |
| 154 | splitListIntoChunks (list) { | 126 | splitListIntoChunks (list) { |
| ... | @@ -164,6 +136,7 @@ export default { | ... | @@ -164,6 +136,7 @@ export default { |
| 164 | return result; | 136 | return result; |
| 165 | }, | 137 | }, |
| 166 | goToSolution (v) { | 138 | goToSolution (v) { |
| 139 | + console.warn(v); | ||
| 167 | this.$router.push({ | 140 | this.$router.push({ |
| 168 | path: '/solution/detail', | 141 | path: '/solution/detail', |
| 169 | query: { | 142 | query: { | ... | ... |
-
Please register or login to post a comment