hookehuyr

fix 显示优化

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