hookehuyr

解决方案接口联调,和其他页面调整

...@@ -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));
......
This diff is collapsed. Click to expand it.
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: {
......