feat: 添加金种子兑换包模块

This commit is contained in:
2026-09-29 13:01:47 +08:00
parent 4b0aab8a51
commit 82f6737820
5 changed files with 905 additions and 9 deletions
+49 -7
View File
@@ -52,10 +52,14 @@
</view>
<view class="seed-card seed-card--summary m-b-50">
<view class="seed-summary__top">
<view class="seed-summary__label">当前价格</view>
<view class="seed-summary__price">
{{ formatSeedPrice(dataObj.todayPrice) }}
<!-- **.**** -->
<view class="seed-summary__price-col">
<view class="seed-summary__label">当前价格</view>
<view class="seed-summary__price">
{{ formatSeedPrice(dataObj.todayPrice) }}
</view>
</view>
<view class="seed-summary__action">
<view class="seed-summary__btn" @click="goExchange">兑换</view>
</view>
</view>
<view class="seed-summary__divider"></view>
@@ -65,6 +69,11 @@
<view class="seed-summary__item-value">{{ dataObj.myCount || 0 }}</view>
</view>
<view class="seed-summary__v-divider"></view>
<view class="seed-summary__item">
<view class="seed-summary__item-label">冻结数量</view>
<view class="seed-summary__item-value">{{ dataObj.frozenCount || 0 }}</view>
</view>
<view class="seed-summary__v-divider"></view>
<view class="seed-summary__item">
<view class="seed-summary__item-label">已核销</view>
<view class="seed-summary__item-value">{{ dataObj.writeOffCount || 0 }}</view>
@@ -664,6 +673,10 @@
});
let height = ref(0);
height.value = sysInfo.statusBarHeight + uni.upx2px(88);
const goExchange = () => {
uni.navigateTo({ url: '/pages/home/seedExchange' });
};
</script>
<style lang="scss" scoped>
.pages {
@@ -768,13 +781,14 @@
}
.seed-card {
background: #ffffff;
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(10px);
border: 1rpx solid rgba(255, 255, 255, 0.5);
border-radius: 28rpx;
overflow: hidden;
padding: 24rpx 20rpx 18rpx;
box-sizing: border-box;
position: relative;
box-shadow: 0 8rpx 22rpx rgba(38, 107, 246, 0.55);
}
.seed-card--summary {
@@ -782,9 +796,18 @@
}
.seed-summary__top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18rpx;
}
.seed-summary__price-col {
display: flex;
flex-direction: column;
gap: 10rpx;
gap: 6rpx;
min-width: 0;
flex: 1;
}
.seed-summary__label {
@@ -800,6 +823,25 @@
line-height: 1.1;
}
.seed-summary__action {
flex-shrink: 0;
display: flex;
align-items: center;
padding-top: 6rpx;
}
.seed-summary__btn {
height: 64rpx;
line-height: 64rpx;
padding: 0 32rpx;
border-radius: 32rpx;
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
color: #fff;
font-size: 28rpx;
font-weight: 600;
text-align: center;
}
.seed-summary__divider {
height: 1rpx;
background: rgba(0, 0, 0, 0.08);