CouponGuideV2.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div class="guide-card wide">
  3. <div class="guide-illustration short" style="background: linear-gradient(135deg, #e87722 0%, #f9ca24 100%);">
  4. <div class="illus-bubble bubble-1">🎫</div>
  5. <div class="illus-bubble bubble-2">🎁</div>
  6. <div class="illus-center">🎟️</div>
  7. </div>
  8. <div class="guide-body compact">
  9. <div class="guide-badge compact">Step 8</div>
  10. <h2 class="guide-title small">个人中心 — 礼品券兑换</h2>
  11. <p class="guide-desc compact">在「我的礼品券」Tab 管理你的礼品券,两步轻松使用:</p>
  12. <!-- 截图引导 -->
  13. <div class="screenshot-list">
  14. <div class="screenshot-item">
  15. <div class="screenshot-num">1</div>
  16. <div class="screenshot-content">
  17. <img class="screenshot-img" :src="step1Img" alt="点击去使用" />
  18. <p class="screenshot-label">点击礼品券上的「去使用」按钮</p>
  19. </div>
  20. </div>
  21. <div class="screenshot-item">
  22. <div class="screenshot-num">2</div>
  23. <div class="screenshot-content">
  24. <img class="screenshot-img" :src="step2Img" alt="使用礼品券" />
  25. <p class="screenshot-label">选择商品,确认订单,礼品券自动抵扣</p>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="guide-footer compact">
  31. <button class="btn-primary" @click="handleGoCoupon">
  32. <span>🎫</span> 查看礼品券
  33. </button>
  34. <button class="btn-prev" v-if="!isFirst" @click="$emit('prev')">
  35. 上一步
  36. </button>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. import { setTab } from '@/utils/auth'
  42. import step1Img from '@/assets/image/newUserGuide/step1.png'
  43. import step2Img from '@/assets/image/newUserGuide/step2.png'
  44. export default {
  45. name: 'CouponGuideV2',
  46. props: {
  47. isLast: { type: Boolean, default: false },
  48. isFirst: { type: Boolean, default: false },
  49. isReplay: { type: Boolean, default: false },
  50. },
  51. data() {
  52. return {
  53. step1Img,
  54. step2Img,
  55. }
  56. },
  57. methods: {
  58. handleGoCoupon() {
  59. setTab('welfare')
  60. // 先跳首页再跳 myCenter,确保组件重新 created 读取 Cookie
  61. this.$router.push('/home').then(() => {
  62. this.$router.push('/myCenter')
  63. })
  64. setTimeout(() => this.$emit('next'), 800)
  65. },
  66. },
  67. }
  68. </script>
  69. <style scoped>
  70. @import './guide-common.css';
  71. /* Step 8 V2 专属样式 */
  72. .guide-badge { color: #e87722; background: #fff4e8; }
  73. .btn-primary {
  74. background: linear-gradient(135deg, #e87722, #f9ca24);
  75. box-shadow: 0 4px 14px rgba(232,119,34,0.3);
  76. }
  77. .btn-primary:hover { box-shadow: 0 6px 18px rgba(232,119,34,0.45); }
  78. /* 截图引导 */
  79. .screenshot-list {
  80. display: flex;
  81. flex-direction: column;
  82. gap: 12px;
  83. }
  84. .screenshot-item {
  85. display: flex;
  86. gap: 12px;
  87. align-items: flex-start;
  88. }
  89. .screenshot-num {
  90. width: 24px;
  91. height: 24px;
  92. line-height: 24px;
  93. text-align: center;
  94. font-size: 13px;
  95. font-weight: 700;
  96. color: #fff;
  97. background: #e87722;
  98. border-radius: 50%;
  99. flex-shrink: 0;
  100. margin-top: 4px;
  101. }
  102. .screenshot-content {
  103. flex: 1;
  104. }
  105. .screenshot-img {
  106. width: 100%;
  107. border-radius: 8px;
  108. border: 1px solid #f0e6d8;
  109. box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  110. }
  111. .screenshot-label {
  112. font-size: 12px;
  113. color: #86909c;
  114. margin: 6px 0 0;
  115. line-height: 1.5;
  116. }
  117. </style>