hookehuyr

fix 显示优化

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-12-12 12:48:45 4 + * @LastEditTime: 2024-12-13 13:34:51
5 * @FilePath: /hager/src/views/news/index.vue 5 * @FilePath: /hager/src/views/news/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
45 <div v-else class="hager-news-list xs"> 45 <div v-else class="hager-news-list xs">
46 <div class="card" v-for="(item, index) in news_list" :key="index"> 46 <div class="card" v-for="(item, index) in news_list" :key="index">
47 <img :src="item.cover" alt="学校图片" class="card-image xs"> 47 <img :src="item.cover" alt="学校图片" class="card-image xs">
48 - <div class="news-item"> 48 + <div class="news-item xs">
49 <div class="news-item-title xs">{{ item.post_title }}</div> 49 <div class="news-item-title xs">{{ item.post_title }}</div>
50 <p class="news-item-sub">{{ item.post_title_en }}</p> 50 <p class="news-item-sub">{{ item.post_title_en }}</p>
51 <p class="news-item-content xs">{{ item.post_excerpt }}</p> 51 <p class="news-item-content xs">{{ item.post_excerpt }}</p>
...@@ -157,6 +157,7 @@ export default { ...@@ -157,6 +157,7 @@ export default {
157 padding: 2rem; 157 padding: 2rem;
158 &.xs { 158 &.xs {
159 padding: 2rem; 159 padding: 2rem;
160 + padding-bottom: 4rem;
160 } 161 }
161 .news-item-title { 162 .news-item-title {
162 font-weight: bold; 163 font-weight: bold;
......
1 <!-- 1 <!--
2 * @Date: 2024-09-27 16:53:09 2 * @Date: 2024-09-27 16:53:09
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-12-12 13:55:31 4 + * @LastEditTime: 2024-12-13 14:58:12
5 * @FilePath: /hager/src/views/product/index.vue 5 * @FilePath: /hager/src/views/product/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
100 category_name: '所有产品', 100 category_name: '所有产品',
101 category_name_en: 'All Products', 101 category_name_en: 'All Products',
102 category_description: '', 102 category_description: '',
103 - banner: '', 103 + banner: 'https://cdn.ipadbiz.cn/hager/img/4-b-02.png',
104 cate_list: [], 104 cate_list: [],
105 product_list: [], 105 product_list: [],
106 no_product_img: 'https://cdn.ipadbiz.cn/hager/img/no-product-img.png', 106 no_product_img: 'https://cdn.ipadbiz.cn/hager/img/no-product-img.png',
...@@ -194,10 +194,10 @@ export default { ...@@ -194,10 +194,10 @@ export default {
194 if (code) { 194 if (code) {
195 let info = data[0]; 195 let info = data[0];
196 this.parent_name = info.parent_name; 196 this.parent_name = info.parent_name;
197 - this.category_name = info.category_name; 197 + this.category_name = info.category_name? info.category_name : '所有产品';
198 - this.category_name_en = info.category_name_en; 198 + this.category_name_en = info.category_name_en ? info.category_name_en : 'All Products';
199 - this.category_description = info.category_description; 199 + this.category_description = info.category_description ? info.category_description : '<p style="margin-bottom: 0.5rem; font-weight: bold;">海格为客户提供安全稳定的电气产品与智能化解决方案。</p>';
200 - this.banner = info.banner; 200 + this.banner = info.banner ? info.banner : 'https://cdn.ipadbiz.cn/hager/img/4-b-02.png';
201 this.product_list = info.list; 201 this.product_list = info.list;
202 202
203 this.search_keyword = ''; 203 this.search_keyword = '';
......