ExchangeGuide.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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 7</div>
  10. <h2 class="guide-title small">个人中心 — 我的兑换</h2>
  11. <p class="guide-desc compact">在「我的兑换」Tab 查看所有兑换订单状态:</p>
  12. <!-- 订单状态说明 -->
  13. <div class="tab-list">
  14. <div class="tab-item" v-for="item in statusList" :key="item.id">
  15. <div class="tab-num">{{ item.icon }}</div>
  16. <div class="tab-info">
  17. <div class="tab-title">{{ item.title }}</div>
  18. <div class="tab-desc">{{ item.desc }}</div>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="flow-tip-box">
  23. <span class="flow-tip">💡 支持按状态筛选订单,点击「查看信息」查看兑换详情</span>
  24. </div>
  25. </div>
  26. <div class="guide-footer compact">
  27. <button class="btn-primary" @click="handleGoExchange">
  28. <span>📦</span> 查看兑换记录
  29. </button>
  30. <button class="btn-prev" v-if="!isFirst" @click="$emit('prev')">
  31. ← 上一步
  32. </button>
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. import { setTab } from '@/utils/auth'
  38. export default {
  39. name: 'ExchangeGuide',
  40. props: {
  41. isLast: { type: Boolean, default: false },
  42. isFirst: { type: Boolean, default: false },
  43. isReplay: { type: Boolean, default: false },
  44. },
  45. data() {
  46. return {
  47. statusList: [
  48. { id: 1, icon: '⏳', title: '待审核', desc: '订单已提交,等待审核中' },
  49. { id: 2, icon: '🏪', title: '待发货', desc: '审核通过,等待发货' },
  50. { id: 3, icon: '📬', title: '待收货', desc: '已发货,请注意查收' },
  51. { id: 4, icon: '✅', title: '已收货', desc: '兑换完成' },
  52. { id: 5, icon: '❌', title: '作废', desc: '订单已取消或作废' },
  53. ],
  54. }
  55. },
  56. methods: {
  57. handleGoExchange() {
  58. setTab('exchange')
  59. // 先跳首页再跳 myCenter,确保组件重新 created 读取 Cookie
  60. this.$router.push('/home').then(() => {
  61. this.$router.push('/myCenter')
  62. })
  63. setTimeout(() => this.$emit('next'), 800)
  64. },
  65. },
  66. }
  67. </script>
  68. <style scoped>
  69. @import './guide-common.css';
  70. /* Step 7 专属样式 */
  71. .guide-badge { color: #e87722; background: #fff4e8; }
  72. .btn-primary {
  73. background: linear-gradient(135deg, #e87722, #f9ca24);
  74. box-shadow: 0 4px 14px rgba(232,119,34,0.3);
  75. }
  76. .btn-primary:hover { box-shadow: 0 6px 18px rgba(232,119,34,0.45); }
  77. /* Tab 列表 */
  78. .tab-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
  79. .tab-item {
  80. display: flex;
  81. align-items: center;
  82. gap: 10px;
  83. padding: 10px 12px;
  84. background: #f7f9fc;
  85. border-radius: 10px;
  86. transition: all 0.25s;
  87. }
  88. .tab-item:hover { background: #fff4e8; }
  89. .tab-num {
  90. width: 28px;
  91. height: 28px;
  92. line-height: 28px;
  93. text-align: center;
  94. font-size: 16px;
  95. flex-shrink: 0;
  96. }
  97. .tab-info { flex: 1; }
  98. .tab-title { font-size: 13px; font-weight: 600; color: #1d2129; }
  99. .tab-desc { font-size: 12px; color: #86909c; margin-top: 2px; }
  100. .flow-tip-box {
  101. padding: 10px 12px;
  102. background: linear-gradient(135deg, #fff9f0, #fff4e0);
  103. border-radius: 10px;
  104. border-left: 3px solid #e87722;
  105. }
  106. .flow-tip {
  107. font-size: 12px;
  108. color: #e87722;
  109. font-weight: 500;
  110. }
  111. </style>