single serviceIcon

This commit is contained in:
WindowBird 2025-10-23 09:13:46 +08:00
parent 1842b49fe2
commit 5a0497a6fe
3 changed files with 86 additions and 199 deletions

View File

@ -1,16 +1,5 @@
<script setup>
import SmartApiaryCard from "~/components/landing/SmartApiaryCard.vue";
defineProps({
title: {
type: String,
default: '智慧蜂场建设'
},
description: {
type: String,
default: '提供蜂群、蜂箱、蜂场环境等信息远程实时自动获取、统计分析和监测预警'
}
})
</script>
<template>
@ -32,11 +21,15 @@ defineProps({
<!-- 图片作为背景非内容 -->
</UPageHero>
<div class="w-45 h-45">
<SmartApiaryCard
description="提供蜂群、蜂箱、蜂场环境等信息远程实时自动获取、统计分析和监测预警服务,实现智能化养殖,提高管理效率,节省成本。"
icon-src="/img/index/s1.svg"
link-url="/product/smart-farm"
title="智慧蜂场建设"
/>
</div>
<SmartApiaryCard
:description="description"
:title="title"
/>
</div>
</template>

View File

@ -1,208 +1,101 @@
<script lang="ts" setup>
</script>
<template>
<div class="smart-apiary-card">
<div class="card-icon">
<!-- 齿轮图标组 -->
<div class="gear large"/>
<div class="gear medium"/>
<div class="gear small"/>
</div>
<div class="relative w-full h-full perspective-1000">
<div
:class="{ 'rotate-y-180': isFlipped }"
class="relative w-full h-full transition-transform duration-600 transform-style-preserve-3d"
@mouseenter="isFlipped = true"
@mouseleave="isFlipped = false"
>
<!-- 正面内容 -->
<div
class="absolute inset-0 w-full h-full bg-white rounded-lg p-5 flex flex-col justify-center items-center backface-hidden">
<div class="h-16 flex justify-center items-center"/>
<img :src="iconSrc" alt="" class="w-2/3">
<p class="text-black text-xl mt-2.5 font-medium">
{{ title }}
</p>
</div>
<div class="card-content">
<h3 class="card-title">智慧蜂场建设</h3>
<div class="divider"/>
<p class="card-description">
提供蜂群蜂箱蜂场环境等信息远程实时自动获取统计分析和监测预警
</p>
<button class="view-details-btn">
查看详情 &gt;
</button>
<!-- 背面内容 -->
<div
class="absolute inset-0 w-full h-full bg-gradient-to-br from-teal-600 to-teal-800 rounded-lg p-5 backface-hidden transform rotate-y-180">
<NuxtLink
:to="linkUrl"
class="block h-full no-underline text-inherit"
>
<div class="text-left">
<h5 class="text-white text-xl font-bold m-0">{{ title }}</h5>
<div class="h-0.5 bg-white w-10 my-4"/>
</div>
<div class="text-white text-sm leading-relaxed text-left opacity-80 line-clamp-3">
{{ description }}
</div>
<div
class="text-white text-sm text-right w-full mt-1 opacity-90 transition-opacity duration-300 group-hover:opacity-100 group-hover:underline">
查看详情&nbsp;&nbsp;&gt;
</div>
</NuxtLink>
</div>
</div>
</div>
</template>
<script setup>
defineProps({
title: {
type: String,
default: '智慧蜂设'
},
description: {
type: String,
default: '提供蜂群、蜂箱、蜂场环境等信息远程实时自动获取、统计分析和监测预警服务,实现智能化养殖,提高管理效率,节省成本。设备先进,质量和服务双保障。'
},
iconSrc: {
type: String,
default: '/img/index/s1.svg'
},
linkUrl: {
type: String,
default: '/product/beenFactory'
}
})
const isFlipped = ref(false)
</script>
<style scoped>
/* 卡片容器 */
.smart-apiary-card {
position: relative;
width: 320px;
height: 380px;
background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
border-radius: 20px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(13, 148, 136, 0.3);
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
cursor: pointer;
.perspective-1000 {
perspective: 1000px;
}
.smart-apiary-card:hover {
transform: translateY(-8px) scale(1.02);
box-shadow: 0 20px 40px rgba(13, 148, 136, 0.4);
.transform-style-preserve-3d {
transform-style: preserve-3d;
}
/* 背景模糊效果 */
.smart-apiary-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><filter id="blur"><feGaussianBlur stdDeviation="2"/></filter></defs><rect width="100" height="100" fill="%230d9488" filter="url(%23blur)"/></svg>');
opacity: 0.1;
.rotate-y-180 {
transform: rotateY(180deg);
}
/* 齿轮图标样式 */
.card-icon {
position: absolute;
top: 40px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 8px;
z-index: 2;
.backface-hidden {
backface-visibility: hidden;
}
.gear {
background: conic-gradient(from 0deg, #ffffff 0%, #e6fffa 25%, #ffffff 50%, #e6fffa 75%, #ffffff 100%);
border-radius: 50%;
animation: rotate 8s linear infinite;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
.rotate-y-180 {
transform: rotateY(180deg);
}
.gear.large {
width: 60px;
height: 60px;
animation-duration: 12s;
}
.gear.medium {
width: 45px;
height: 45px;
margin-top: 15px;
animation-duration: 8s;
animation-direction: reverse;
}
.gear.small {
width: 30px;
height: 30px;
margin-top: 25px;
animation-duration: 6s;
}
/* 齿轮齿效果 */
.gear::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 70%;
height: 70%;
background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
border-radius: 50%;
z-index: 1;
}
.gear::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle at 50% 50%, transparent 30%, #ffffff 30%, #ffffff 35%, transparent 35%),
repeating-conic-gradient(#ffffff 0% 10%, transparent 10% 20%);
}
/* 内容区域 */
.card-content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 30px 25px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px 20px 20px 20px;
transform: translateY(70%);
transition: transform 0.4s ease;
}
.smart-apiary-card:hover .card-content {
transform: translateY(0);
}
.card-title {
font-size: 24px;
font-weight: 700;
color: #115e59;
margin-bottom: 12px;
text-align: center;
}
.divider {
width: 60px;
height: 3px;
background: linear-gradient(90deg, #0d9488, #34d399);
margin: 0 auto 15px;
border-radius: 2px;
}
.card-description {
font-size: 14px;
line-height: 1.6;
color: #4b5563;
margin-bottom: 20px;
text-align: center;
}
.view-details-btn {
display: block;
width: 100%;
padding: 12px;
background: linear-gradient(90deg, #0d9488, #10b981);
color: white;
border: none;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.view-details-btn:hover {
background: linear-gradient(90deg, #115e59, #0d9488);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(13, 148, 136, 0.3);
}
/* 动画 */
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* 响应式设计 */
/* 移动端适配 */
@media (max-width: 768px) {
.smart-apiary-card {
width: 280px;
height: 350px;
.perspective-1000 {
perspective: none;
}
.card-content {
padding: 20px;
.transform-style-preserve-3d {
transform-style: flat;
}
.card-title {
font-size: 20px;
.rotate-y-180 {
transform: none;
}
}
</style>

1
public/img/index/s1.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.5 KiB