hookehuyr

fix 图片压缩替换

<!--
* @Date: 2024-09-26 13:42:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-24 12:51:47
* @LastEditTime: 2024-10-26 14:40:43
* @FilePath: /hager/src/components/common/hagerFooter.vue
* @Description: 文件描述
-->
......@@ -150,7 +150,7 @@ export default {
content: '海格电气一直致力于创新,我们与客户共同着手面向未来的主题。海格电气仔细倾听客户的声音,以使我们的设计语言能够被普遍理解。',
link: '/about/design',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g04@2x.png',
img: 'https://cdn.ipadbiz.cn/hager/img/tiny/g04@2x.png',
c_title: '生产研发',
e_title: 'Production and R&D',
content: '为配合海格集团在全球的业务扩展计划,目前中国有2个生产基地,分别位于惠州和东莞,主要为亚太乃至全球市场提供优质的配电及相关产品。海格集团在全球拥有22家生产基地,主要分布于欧洲。',
......
<!--
* @Date: 2024-10-17 09:22:56
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-24 14:43:28
* @LastEditTime: 2024-10-26 14:42:38
* @FilePath: /hager/src/views/about/index.vue
* @Description: 文件描述
-->
<template>
<div class="hager-about-page">
<hager-box :class="['top-img', is_xs ? 'xs' : '']" :style="{ backgroundImage: 'url(https://cdn.ipadbiz.cn/hager/banner/banner04@2x.png)' }">
<hager-box :class="['top-img', is_xs ? 'xs' : '']" :style="{ backgroundImage: 'url(https://cdn.ipadbiz.cn/hager/img/tiny/banner04@2x.png)' }">
<div v-if="!is_xs" class="banner-text-wrapper" style="margin-top: 8%;">
<div class="text">
<p class="title">海格E3可持续发展理念</p>
......@@ -93,13 +93,13 @@ export default {
content: '海格电气一直致力于创新,我们与客户共同着手面向未来的主题。海格电气仔细倾听客户的声音,以使我们的设计语言能够被普遍理解。',
link: '/about/design',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g04@2x.png',
img: 'https://cdn.ipadbiz.cn/hager/img/tiny/g04@2x.png',
c_title: '生产研发',
e_title: 'Production and R&D',
content: '为配合海格集团在全球的业务扩展计划,目前中国有2个生产基地,分别位于惠州和东莞,主要为亚太乃至全球市场提供优质的配电及相关产品。海格集团在全球拥有22家生产基地,主要分布于欧洲。',
link: '/about/product',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g05@2x.png',
img: 'https://cdn.ipadbiz.cn/hager/img/tiny/g05@2x.png',
c_title: '可持续发展',
e_title: 'Sustainable Development',
content: '海格集团是全球领先的电气及智能化解决方案和服务提供商,应用领域涵盖住宅、商业建筑、公共建筑和工业。',
......
<!--
* @Date: 2024-10-18 09:31:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-25 16:15:12
* @LastEditTime: 2024-10-26 14:40:07
* @FilePath: /hager/src/views/concat.vue
* @Description: 联系我们
-->
......@@ -705,7 +705,7 @@ export default {
.hager-concat-page {
.top-img {
height: 22rem;
background-image: url(https://cdn.ipadbiz.cn/hager/banner/banner05.png);
background-image: url('https://cdn.ipadbiz.cn/hager/img/tiny/banner05.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
......
<!--
* @Date: 2024-10-18 13:45:53
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-24 17:33:52
* @LastEditTime: 2024-10-26 14:45:50
* @FilePath: /hager/src/views/recruit.vue
* @Description: 招聘信息
-->
......@@ -540,7 +540,7 @@ export default {
background-repeat: no-repeat;
background-size: cover;
background-position: center;
background-image: url(https://cdn.ipadbiz.cn/hager/img/recruit/r01@2x.png);
background-image: url('https://cdn.ipadbiz.cn/hager/img/tiny/r01@2x.png');
&.xs {
height: 15rem;
margin-top: 1rem;
......
<!--
* @Date: 2024-10-20 16:57:48
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-26 14:28:58
* @LastEditTime: 2024-10-27 12:01:24
* @FilePath: /hager/src/views/search.vue
* @Description: 文件描述
-->
......@@ -111,14 +111,17 @@ export default {
watch: {
'$route.query.keyword': function(newKeyword, oldKeyword) {
this.keyword = newKeyword || '';
if (newKeyword !== oldKeyword) {
if (newKeyword !== oldKeyword) { // 关键词变化时,重新搜索
this.activeName = 'product';
// 获取默认列表
this.getList();
}
},
},
async mounted () {
// 获取默认列表
this.getList();
//
objectFitImages(this.$el); // 对当前组件的 DOM 元素应用
if (this.is_xs) { // 自适应模式下,左右箭头的颜色修改
this.modifyTabColor();
......@@ -131,7 +134,7 @@ export default {
window.removeEventListener('resize', this.modifyTabColor);
},
methods: {
modifyTabColor () {
modifyTabColor () { // 调整Tab箭头颜色
this.$nextTick(() => {
setTimeout(() => {
// next按钮修改颜色
......@@ -147,25 +150,27 @@ export default {
}, 100);
})
},
async getList () {
async getList () { // 获取默认列表数据
const { code, data } = await searchAPI({ keyword: this.keyword });
if (code) {
//
this.count_news = data.count_news;
this.count_case = data.count_case;
this.count_product = data.count_product;
this.count_solution = data.count_solution;
//
this.product_list = data.product;
this.solution_list = data.solution;
}
},
async getNewsList (type = '', page) {
async getNewsList (type = '', page) { // 获取新闻列表数据
const { code, data } = await searchAPI({ keyword: this.keyword, type, page, limit: this.limit });
if (code) {
this.news_list = data.list;
this.news_max_page = data.max_page;
}
},
async getCaseList (type = '', page) {
async getCaseList (type = '', page) { // 获取成功案例列表数据
const { code, data } = await searchAPI({ keyword: this.keyword, type, page, limit: this.limit });
if (code) {
this.case_list = data.list;
......@@ -189,7 +194,7 @@ export default {
case 'product':
this.getList();
break;
case 'case':
case 'solution':
this.getList();
break;
case 'case':
......