ActivityGuide.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <div class="guide-card">
  3. <div
  4. class="guide-illustration"
  5. style="background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);"
  6. >
  7. <div class="illus-bubble bubble-1">🎊</div>
  8. <div class="illus-bubble bubble-2">🏅</div>
  9. <div class="illus-center">🎉</div>
  10. </div>
  11. <div class="guide-body">
  12. <div class="guide-badge">Step 4</div>
  13. <h2 class="guide-title">参与活动,赢取大奖</h2>
  14. <p class="guide-desc">
  15. <!-- 节日活动、答题游戏、转盘抽奖...<br /> -->
  16. 参与活动可解锁<strong>限时积分奖励</strong>!
  17. </p>
  18. <!-- 活动类型展示 -->
  19. <div class="activity-list">
  20. <div
  21. v-for="item in activities"
  22. :key="item.id"
  23. class="activity-item"
  24. >
  25. <span class="activity-icon">{{ item.icon }}</span>
  26. <div class="activity-info">
  27. <div class="activity-name">{{ item.name }}</div>
  28. <div class="activity-reward">+{{ item.reward }} 积分</div>
  29. </div>
  30. <span class="activity-tag">{{ item.tag }}</span>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="guide-footer">
  35. <button class="btn-primary" @click="handleGoActivity">
  36. <span>🎯</span> 了解活动
  37. </button>
  38. <button v-if="false" class="btn-secondary" @click="$emit('next')">
  39. {{ isLast ? '完成新手教程 ✓' : '下一步' }}
  40. </button>
  41. <button v-if="!isFirst" class="btn-prev" @click="$emit('prev')">
  42. 上一步
  43. </button>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. export default {
  49. name: 'ActivityGuide',
  50. props: {
  51. isLast: { type: Boolean, default: false },
  52. isFirst: { type: Boolean, default: false },
  53. isReplay: { type: Boolean, default: false },
  54. },
  55. data() {
  56. return {
  57. activities: [
  58. { id: 3, icon: '📝', name: '每日答题', reward: 30, tag: '每日' },
  59. { id: 1, icon: '🎮', name: '每周竞技', reward: 50, tag: '热门' },
  60. { id: 2, icon: '🎡', name: '节日活动', reward: 100, tag: '限时' },
  61. ],
  62. }
  63. },
  64. methods: {
  65. handleGoActivity() {
  66. this.$router.push('/home/festiveEvents')
  67. setTimeout(() => this.$emit('next'), 500)
  68. },
  69. },
  70. }
  71. </script>
  72. <style scoped>
  73. @import './guide-common.css';
  74. /* Step 4 专属样式 */
  75. .guide-badge {
  76. color: #6a11cb;
  77. background: #f3eeff;
  78. }
  79. .guide-desc strong {
  80. color: #6a11cb;
  81. }
  82. .btn-primary {
  83. background: linear-gradient(135deg, #6a11cb, #2575fc);
  84. box-shadow: 0 4px 14px rgba(106, 17, 203, 0.3);
  85. }
  86. .btn-primary:hover {
  87. box-shadow: 0 6px 18px rgba(106, 17, 203, 0.45);
  88. }
  89. /* 活动列表 */
  90. .activity-list {
  91. display: flex;
  92. flex-direction: column;
  93. gap: 8px;
  94. }
  95. .activity-item {
  96. display: flex;
  97. align-items: center;
  98. gap: 12px;
  99. padding: 10px 14px;
  100. background: #f7f9fc;
  101. border-radius: 10px;
  102. transition: all 0.25s;
  103. }
  104. .activity-item:hover {
  105. background: #f3eeff;
  106. transform: translateX(4px);
  107. }
  108. .activity-icon {
  109. font-size: 22px;
  110. }
  111. .activity-info {
  112. flex: 1;
  113. }
  114. .activity-name {
  115. font-size: 13px;
  116. font-weight: 600;
  117. color: #1d2129;
  118. }
  119. .activity-reward {
  120. font-size: 12px;
  121. color: #6a11cb;
  122. font-weight: 700;
  123. margin-top: 2px;
  124. }
  125. .activity-tag {
  126. padding: 2px 8px;
  127. font-size: 11px;
  128. color: #fff;
  129. background: linear-gradient(135deg, #6a11cb, #2575fc);
  130. border-radius: 10px;
  131. }
  132. </style>