SectionWhatIsWorkflow.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <section class="section-what-is relative overflow-hidden py-20">
  3. <!-- 背景 -->
  4. <div class="absolute inset-0 pointer-events-none" style="background: linear-gradient(180deg, rgba(245,243,255,0) 0%, rgba(237,233,254,0.5) 50%, rgba(245,243,255,0) 100%);"></div>
  5. <div class="relative z-10 max-w-6xl mx-auto px-6">
  6. <!-- 标题 -->
  7. <div class="text-center mb-14 observe-fade">
  8. <span class="inline-flex items-center gap-2 bg-violet-100 border border-violet-200 text-violet-700 text-xs font-bold px-4 py-1.5 rounded-full mb-5 uppercase tracking-wide">
  9. <span class="w-1.5 h-1.5 bg-violet-500 rounded-full animate-pulse"></span>
  10. {{$t('whatIsWorkflow.guideTitle')}}
  11. </span>
  12. <h2 class="text-3xl lg:text-4xl font-black text-gray-900 mb-3">
  13. {{$t('whatIsWorkflow.title')}} <span class="bg-gradient-to-r from-violet-600 to-indigo-600 bg-clip-text text-transparent">{{$t('whatIsWorkflow.aiWorkflow')}}</span>?
  14. </h2>
  15. <p class="text-gray-500 text-base max-w-xl mx-auto">{{$t('whatIsWorkflow.subtitle')}}</p>
  16. </div>
  17. <!-- 3 步说明 -->
  18. <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-12">
  19. <div v-for="(step, idx) in steps" :key="step.title"
  20. class="step-card observe-fade group"
  21. :style="{ transitionDelay: idx * 120 + 'ms' }">
  22. <!-- 步骤号 -->
  23. <div class="step-number">{{ idx + 1 }}</div>
  24. <!-- 图标 -->
  25. <div class="step-icon-wrap" :style="{ background: step.iconBg }">
  26. <span class="text-3xl">{{ step.icon }}</span>
  27. </div>
  28. <!-- 内容 -->
  29. <h3 class="text-gray-900 font-bold text-lg mb-2">{{ step.title }}</h3>
  30. <p class="text-gray-500 text-sm leading-relaxed">{{ step.desc }}</p>
  31. <!-- 示例标签 -->
  32. <div class="mt-4 flex flex-wrap gap-2">
  33. <span v-for="tag in step.examples" :key="tag"
  34. class="text-xs px-2.5 py-1 rounded-full font-medium"
  35. :style="{ background: step.tagBg, color: step.tagColor }">
  36. {{ tag }}
  37. </span>
  38. </div>
  39. <!-- 连接箭头(非最后一个) -->
  40. <div v-if="idx < steps.length - 1" class="step-arrow">→</div>
  41. </div>
  42. </div>
  43. <!-- 底部 CTA -->
  44. <div class="text-center observe-fade">
  45. <p class="text-gray-400 text-sm mb-4" v-html="$t('whatIsWorkflow.userCount', { count: '50,000+' })"></p>
  46. <button class="inline-flex items-center gap-2 bg-gradient-to-r from-violet-600 to-indigo-600 text-white font-bold px-8 py-3.5 rounded-2xl shadow-lg shadow-violet-200 hover:shadow-violet-300 hover:-translate-y-0.5 transition-all duration-300" style="cursor: pointer;"
  47. @click.stop.prevent="goWorkflowMarket">
  48. <span>{{$t('whatIsWorkflow.ctaButton')}}</span>
  49. <span class="text-lg">→</span>
  50. </button>
  51. </div>
  52. </div>
  53. </section>
  54. </template>
  55. <script setup>
  56. import { onMounted } from 'vue'
  57. import { useI18n } from 'vue-i18n'
  58. import {useRouter} from "vue-router";
  59. const router = useRouter();
  60. const { t } = useI18n()
  61. const steps = [
  62. {
  63. icon: '🎯',
  64. title: t('whatIsWorkflow.steps.step1.title'),
  65. desc: t('whatIsWorkflow.steps.step1.desc'),
  66. iconBg: 'linear-gradient(135deg, rgba(139,92,246,0.15), rgba(99,102,241,0.1))',
  67. examples: [t('whatIsWorkflow.steps.step1.examples.0'), t('whatIsWorkflow.steps.step1.examples.1'), t('whatIsWorkflow.steps.step1.examples.2'), t('whatIsWorkflow.steps.step1.examples.3')],
  68. tagBg: 'rgba(139,92,246,0.1)',
  69. tagColor: '#7c3aed'
  70. },
  71. {
  72. icon: '⚡',
  73. title: t('whatIsWorkflow.steps.step2.title'),
  74. desc: t('whatIsWorkflow.steps.step2.desc'),
  75. iconBg: 'linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.1))',
  76. examples: [t('whatIsWorkflow.steps.step2.examples.0'), t('whatIsWorkflow.steps.step2.examples.1'), t('whatIsWorkflow.steps.step2.examples.2'), t('whatIsWorkflow.steps.step2.examples.3')],
  77. tagBg: 'rgba(245,158,11,0.1)',
  78. tagColor: '#d97706'
  79. },
  80. {
  81. icon: '🚀',
  82. title: t('whatIsWorkflow.steps.step3.title'),
  83. desc: t('whatIsWorkflow.steps.step3.desc'),
  84. iconBg: 'linear-gradient(135deg, rgba(34,197,94,0.15), rgba(16,185,129,0.1))',
  85. examples: [t('whatIsWorkflow.steps.step3.examples.0'), t('whatIsWorkflow.steps.step3.examples.1'), t('whatIsWorkflow.steps.step3.examples.2'), t('whatIsWorkflow.steps.step3.examples.3')],
  86. tagBg: 'rgba(34,197,94,0.1)',
  87. tagColor: '#059669'
  88. }
  89. ]
  90. const goWorkflowMarket = () => { router.push({ path: '/workflow-trade' }); };
  91. onMounted(() => {
  92. const observer = new IntersectionObserver((entries) => {
  93. entries.forEach(entry => {
  94. if (entry.isIntersecting) {
  95. entry.target.classList.add('in-view')
  96. }
  97. })
  98. }, { threshold: 0.15 })
  99. document.querySelectorAll('.section-what-is .observe-fade').forEach(el => observer.observe(el))
  100. })
  101. </script>
  102. <style scoped>
  103. .section-what-is {
  104. background: #fff;
  105. }
  106. /* 步骤卡片 */
  107. .step-card {
  108. position: relative;
  109. background: #fff;
  110. border: 1px solid rgba(139, 92, 246, 0.12);
  111. border-radius: 24px;
  112. padding: 32px 28px;
  113. transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  114. box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  115. }
  116. .step-card:hover {
  117. border-color: rgba(139, 92, 246, 0.35);
  118. transform: translateY(-6px);
  119. box-shadow: 0 16px 40px rgba(139, 92, 246, 0.12);
  120. }
  121. .step-number {
  122. position: absolute;
  123. top: -14px;
  124. left: 28px;
  125. width: 28px;
  126. height: 28px;
  127. background: linear-gradient(135deg, #7c3aed, #6366f1);
  128. color: #fff;
  129. font-size: 13px;
  130. font-weight: 900;
  131. border-radius: 50%;
  132. display: flex;
  133. align-items: center;
  134. justify-content: center;
  135. box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  136. }
  137. .step-icon-wrap {
  138. width: 72px;
  139. height: 72px;
  140. border-radius: 20px;
  141. display: flex;
  142. align-items: center;
  143. justify-content: center;
  144. margin-bottom: 20px;
  145. transition: transform 0.3s ease;
  146. }
  147. .step-card:hover .step-icon-wrap {
  148. transform: scale(1.08) rotate(-3deg);
  149. }
  150. .step-arrow {
  151. position: absolute;
  152. right: -20px;
  153. top: 50%;
  154. transform: translateY(-50%);
  155. font-size: 24px;
  156. color: rgba(139, 92, 246, 0.4);
  157. z-index: 10;
  158. display: none;
  159. }
  160. @media (min-width: 768px) {
  161. .step-arrow {
  162. display: block;
  163. }
  164. }
  165. /* 滚动入场动画 */
  166. .observe-fade {
  167. opacity: 0;
  168. transform: translateY(28px);
  169. transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  170. }
  171. .observe-fade.in-view {
  172. opacity: 1;
  173. transform: translateY(0);
  174. }
  175. /* 响应式 */
  176. .section-what-is h2 {
  177. font-size: clamp(1.6rem, 4vw, 2.5rem);
  178. }
  179. @media (max-width: 768px) {
  180. .section-what-is { padding-top: 3rem; padding-bottom: 3rem; }
  181. .step-card { padding: 24px 20px; }
  182. .step-icon-wrap { width: 56px; height: 56px; }
  183. }
  184. @media (max-width: 480px) {
  185. .section-what-is { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  186. .step-card { padding: 20px 16px; }
  187. }
  188. </style>