WelcomeGuide.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <div class="step1-card">
  3. <!-- 顶部插画区域 -->
  4. <div class="step1-illustration">
  5. <div class="illustration-bubble bubble-1">🎁</div>
  6. <div class="illustration-bubble bubble-2">⭐</div>
  7. <!-- <div class="illustration-bubble bubble-3">🏆</div> -->
  8. <div class="illustration-icon-wrap">
  9. <div class="illustration-icon">🎉</div>
  10. <div class="illustration-ring ring-1"></div>
  11. <div class="illustration-ring ring-2"></div>
  12. </div>
  13. </div>
  14. <!-- 文字内容 -->
  15. <div class="guide-body step1-body">
  16. <h2 class="step1-title">欢迎来到誉商城!</h2>
  17. <p class="step1-desc">
  18. 这里是你的<strong>专属积分奖励平台</strong><br />
  19. 完成任务赚积分,积分兑换好礼!
  20. </p>
  21. <!-- 特性展示 -->
  22. <div class="step1-features">
  23. <div class="feature-item">
  24. <span class="feature-icon">📌</span>
  25. <span class="feature-text">每日签到赚积分</span>
  26. </div>
  27. <div class="feature-item">
  28. <span class="feature-icon">🛒</span>
  29. <span class="feature-text">积分商城兑好礼</span>
  30. </div>
  31. <div class="feature-item">
  32. <span class="feature-icon">🎊</span>
  33. <span class="feature-text">参与活动赢大奖</span>
  34. </div>
  35. </div>
  36. </div>
  37. <!-- 底部按钮 -->
  38. <div class="step1-footer">
  39. <button class="btn-start" @click="$emit('next')">
  40. {{ isLast ? '完成新手教程' : '开始探索' }}
  41. <span class="btn-arrow" v-if="!isLast">→</span>
  42. <span class="btn-check" v-else>✓</span>
  43. </button>
  44. <button class="btn-prev" v-if="!isFirst" @click="$emit('prev')">
  45. 上一步
  46. </button>
  47. </div>
  48. </div>
  49. </template>
  50. <script>
  51. export default {
  52. name: 'WelcomeGuide',
  53. props: {
  54. isLast: {
  55. type: Boolean,
  56. default: false,
  57. },
  58. isFirst: {
  59. type: Boolean,
  60. default: false,
  61. },
  62. isReplay: { type: Boolean, default: false },
  63. },
  64. }
  65. </script>
  66. <style scoped>
  67. .step1-card {
  68. width: 500px;
  69. max-width: 90vw;
  70. background: #fff;
  71. border-radius: 20px;
  72. overflow: hidden;
  73. box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  74. animation: cardFloat 0.5s ease-out;
  75. }
  76. @keyframes cardFloat {
  77. from {
  78. opacity: 0;
  79. transform: translateY(30px) scale(0.95);
  80. }
  81. to {
  82. opacity: 1;
  83. transform: translateY(0) scale(1);
  84. }
  85. }
  86. /* ---- 插画区域 ---- */
  87. .step1-illustration {
  88. position: relative;
  89. height: 180px;
  90. background: linear-gradient(135deg, #2C6FBF 0%, #5B9FE6 50%, #87CEEB 100%);
  91. display: flex;
  92. align-items: center;
  93. justify-content: center;
  94. overflow: hidden;
  95. }
  96. .illustration-icon-wrap {
  97. position: relative;
  98. z-index: 2;
  99. }
  100. .illustration-icon {
  101. width: 80px;
  102. height: 80px;
  103. line-height: 80px;
  104. text-align: center;
  105. font-size: 52px;
  106. background: rgba(255, 255, 255, 0.2);
  107. border-radius: 50%;
  108. backdrop-filter: blur(4px);
  109. }
  110. .illustration-ring {
  111. position: absolute;
  112. top: 50%;
  113. left: 50%;
  114. border: 2px solid rgba(255, 255, 255, 0.2);
  115. border-radius: 50%;
  116. animation: ringPulse 3s ease-in-out infinite;
  117. }
  118. .ring-1 {
  119. width: 120px;
  120. height: 120px;
  121. margin-top: -60px;
  122. margin-left: -60px;
  123. animation-delay: 0s;
  124. }
  125. .ring-2 {
  126. width: 160px;
  127. height: 160px;
  128. margin-top: -80px;
  129. margin-left: -80px;
  130. animation-delay: 1.5s;
  131. }
  132. @keyframes ringPulse {
  133. 0%, 100% {
  134. transform: scale(1);
  135. opacity: 0.3;
  136. }
  137. 50% {
  138. transform: scale(1.1);
  139. opacity: 0.6;
  140. }
  141. }
  142. .illustration-bubble {
  143. position: absolute;
  144. font-size: 24px;
  145. z-index: 1;
  146. animation: bubbleFloat 4s ease-in-out infinite;
  147. }
  148. .bubble-1 {
  149. top: 20px;
  150. left: 30px;
  151. animation-delay: 0s;
  152. }
  153. .bubble-2 {
  154. top: 30px;
  155. right: 40px;
  156. animation-delay: 1.3s;
  157. }
  158. .bubble-3 {
  159. bottom: 25px;
  160. left: 50%;
  161. transform: translateX(-50%);
  162. animation-delay: 2.6s;
  163. }
  164. @keyframes bubbleFloat {
  165. 0%, 100% { transform: translateY(0); }
  166. 50% { transform: translateY(-10px); }
  167. }
  168. /* ---- 内容区域 ---- */
  169. .step1-body {
  170. text-align: center;
  171. min-height: calc(300px + 18px);
  172. }
  173. .step1-title {
  174. font-size: 22px;
  175. font-weight: 700;
  176. color: #1d2129;
  177. margin: 0 0 12px;
  178. }
  179. .step1-desc {
  180. font-size: 14px;
  181. line-height: 1.8;
  182. color: #86909c;
  183. margin: 0 0 24px;
  184. }
  185. .step1-desc strong {
  186. color: #2C6FBF;
  187. }
  188. /* ---- 特性卡片 ---- */
  189. .step1-features {
  190. display: flex;
  191. gap: 12px;
  192. justify-content: center;
  193. }
  194. .feature-item {
  195. display: flex;
  196. flex-direction: column;
  197. align-items: center;
  198. gap: 8px;
  199. flex: 1;
  200. padding: 14px 8px;
  201. background: #f7f9fc;
  202. border-radius: 12px;
  203. transition: all 0.25s;
  204. }
  205. .feature-item:hover {
  206. background: #eaf2ff;
  207. transform: translateY(-2px);
  208. }
  209. .feature-icon {
  210. font-size: 22px;
  211. }
  212. .feature-text {
  213. font-size: 12px;
  214. color: #4e5969;
  215. font-weight: 500;
  216. }
  217. /* ---- 底部按钮 ---- */
  218. .step1-footer {
  219. padding: 0 32px 28px;
  220. text-align: center;
  221. }
  222. .btn-start {
  223. display: inline-flex;
  224. align-items: center;
  225. justify-content: center;
  226. gap: 8px;
  227. width: 100%;
  228. height: 48px;
  229. font-size: 16px;
  230. font-weight: 600;
  231. color: #fff;
  232. background: linear-gradient(135deg, #2C6FBF, #5B9FE6);
  233. border: none;
  234. border-radius: 24px;
  235. cursor: pointer;
  236. transition: all 0.3s;
  237. box-shadow: 0 4px 16px rgba(44, 111, 191, 0.35);
  238. }
  239. .btn-start:hover {
  240. transform: translateY(-1px);
  241. box-shadow: 0 6px 20px rgba(44, 111, 191, 0.5);
  242. }
  243. .btn-start:active {
  244. transform: translateY(0);
  245. }
  246. .btn-arrow {
  247. font-size: 18px;
  248. transition: transform 0.25s;
  249. }
  250. .btn-start:hover .btn-arrow {
  251. transform: translateX(4px);
  252. }
  253. .btn-prev {
  254. display: inline-flex;
  255. align-items: center;
  256. justify-content: center;
  257. width: 100%;
  258. height: 40px;
  259. margin-top: 10px;
  260. font-size: 14px;
  261. font-weight: 500;
  262. color: #86909c;
  263. background: #f7f9fc;
  264. border: none;
  265. border-radius: 20px;
  266. cursor: pointer;
  267. transition: all 0.25s;
  268. }
  269. .btn-prev:hover {
  270. color: #4e5969;
  271. background: #eef1f6;
  272. }
  273. </style>