6 changed files with 379 additions and 147 deletions
-
8src/api/goldenWheel.js
-
BINsrc/assets/img/wealthGoldenWheel/bottomDecoration.png
-
BINsrc/assets/img/wealthGoldenWheel/foldUpIcon.png
-
9src/router/index.js
-
373src/views/wealth/goldenWheel.vue
-
136src/views/wealth/history.vue
After Width: 475 | Height: 221 | Size: 98 KiB |
After Width: 30 | Height: 30 | Size: 1.2 KiB |
@ -1,136 +0,0 @@ |
|||||
<template> |
|
||||
<div class="history-page"> |
|
||||
<div class="header"> |
|
||||
<button class="back-btn" @click="goBack">← 返回</button> |
|
||||
<h2>抽奖历史记录</h2> |
|
||||
<div class="placeholder"></div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="history-list"> |
|
||||
<div v-if="historyList.length === 0" class="empty-state"> |
|
||||
<p>暂无历史记录</p> |
|
||||
</div> |
|
||||
|
|
||||
<div v-else class="history-items"> |
|
||||
<div class="history-item" v-for="(item, index) in historyList" :key="index"> |
|
||||
<div class="item-date">{{ item.date }}</div> |
|
||||
<div class="item-prize">{{ item.prize }}</div> |
|
||||
<div class="item-status" :class="item.status">{{ item.statusText }}</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
name: 'HistoryPage', |
|
||||
data() { |
|
||||
return { |
|
||||
historyList: [ |
|
||||
{ date: '2023-10-01 10:30', prize: '卡券 2张', status: 'completed', statusText: '已领取' }, |
|
||||
{ date: '2023-10-02 14:15', prize: '背包礼物 1个', status: 'completed', statusText: '已领取' }, |
|
||||
{ date: '2023-10-03 16:45', prize: 'Tonken 5个', status: 'pending', statusText: '待领取' } |
|
||||
] |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
goBack() { |
|
||||
// 使用路由器返回上一页 |
|
||||
if (this.$router) { |
|
||||
this.$router.back(); |
|
||||
} else { |
|
||||
window.history.back(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped> |
|
||||
.history-page { |
|
||||
padding: 20px; |
|
||||
min-height: 100vh; |
|
||||
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); |
|
||||
color: white; |
|
||||
} |
|
||||
|
|
||||
.header { |
|
||||
display: flex; |
|
||||
justify-content: space-between; |
|
||||
align-items: center; |
|
||||
margin-bottom: 30px; |
|
||||
padding-bottom: 15px; |
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1); |
|
||||
} |
|
||||
|
|
||||
.back-btn { |
|
||||
background: rgba(255, 255, 255, 0.1); |
|
||||
border: none; |
|
||||
color: white; |
|
||||
padding: 8px 15px; |
|
||||
border-radius: 5px; |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
|
|
||||
.back-btn:hover { |
|
||||
background: rgba(255, 255, 255, 0.2); |
|
||||
} |
|
||||
|
|
||||
.placeholder { |
|
||||
width: 80px; |
|
||||
} |
|
||||
|
|
||||
.empty-state { |
|
||||
text-align: center; |
|
||||
padding: 50px 0; |
|
||||
color: rgba(255, 255, 255, 0.6); |
|
||||
} |
|
||||
|
|
||||
.history-items { |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
gap: 15px; |
|
||||
} |
|
||||
|
|
||||
.history-item { |
|
||||
display: flex; |
|
||||
justify-content: space-between; |
|
||||
align-items: center; |
|
||||
background: rgba(255, 255, 255, 0.05); |
|
||||
padding: 15px; |
|
||||
border-radius: 8px; |
|
||||
border-left: 4px solid #4e4376; |
|
||||
} |
|
||||
|
|
||||
.item-date { |
|
||||
color: rgba(255, 255, 255, 0.7); |
|
||||
font-size: 14px; |
|
||||
flex: 1; |
|
||||
} |
|
||||
|
|
||||
.item-prize { |
|
||||
font-weight: bold; |
|
||||
flex: 1; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.item-status { |
|
||||
flex: 1; |
|
||||
text-align: right; |
|
||||
font-size: 14px; |
|
||||
padding: 5px 10px; |
|
||||
border-radius: 12px; |
|
||||
display: inline-block; |
|
||||
} |
|
||||
|
|
||||
.item-status.completed { |
|
||||
background: rgba(76, 175, 80, 0.2); |
|
||||
color: #4caf50; |
|
||||
} |
|
||||
|
|
||||
.item-status.pending { |
|
||||
background: rgba(255, 193, 7, 0.2); |
|
||||
color: #ffc107; |
|
||||
} |
|
||||
</style> |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue