style: 金种子页面ui

This commit is contained in:
2026-06-02 10:15:26 +08:00
parent 79fab5929a
commit 910212dcac
6 changed files with 130 additions and 13 deletions
+102 -8
View File
@@ -1,16 +1,17 @@
<template>
<s-layout :navbar="navBar" title="金种子">
<s-layout :navbar="navBar" title="金种子" navPreset="seed">
<view class="pages w100" :style="{ marginTop: -height + 'px' }">
<view class="w100">
<image class="w100" :src="$url + 'home/seed_1.png'" mode="widthFix" />
<!-- <image class="w100" :src="$url + 'home/seed_1.png'" mode="widthFix" /> -->
<image class="w100" src="/static/jinzhongzi_bg.png" mode="widthFix" />
</view>
<view class="content" :style="{ marginTop: -top + 'px' }">
<view class="con">
<view class="conBox" v-if="load">
<view class="conBg"> </view>
<view class="p-x-20 p-y-40">
<view class="size32"> 我的金种子 </view>
<view class="flex ju-between al-flex-end m-b-44">
<view class="size32" v-if="false"> 我的金种子 </view>
<view v-if="false" class="flex ju-between al-flex-end m-b-44">
<view class="c_primary size80 weight_900">{{ dataObj.myCount || 0 }}</view>
<view class="flex-center">
<view class="fang"></view>
@@ -19,7 +20,7 @@
>
</view>
</view>
<view class="flex-row m-b-30" style="flex-wrap: wrap">
<view v-if="false" class="flex-row m-b-30" style="flex-wrap: wrap">
<view
class="m-b-34 flex-row al-flex-end"
style="width: 50%"
@@ -44,6 +45,29 @@
>
</view>
</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>
</view>
<view class="seed-summary__divider"></view>
<view class="seed-summary__bottom">
<view class="seed-summary__item">
<view class="seed-summary__item-label">持有数量</view>
<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.writeOffCount || 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 seed-summary__item-value--accent">¥{{ dataObj.dividendCount || 0 }}</view>
</view>
</view>
</view>
<view class="seed-card seed-card--trend m-b-50">
<view class="seed-card__header">
<view class="seed-card__left">
@@ -255,6 +279,10 @@
};
const pad2 = (n) => String(n).padStart(2, '0');
const formatSeedPrice = (val) => {
const n = Number(val);
return Number.isFinite(n) ? n.toFixed(4) : '0.0000';
};
const toLocalDateTime = (d) => {
const y = d.getFullYear();
const m = pad2(d.getMonth() + 1);
@@ -592,6 +620,7 @@
.content {
// position: absolute;
width: 100%;
padding-top: 200rpx;
}
.con {
padding: 0 40rpx;
@@ -600,8 +629,8 @@
overflow-y: auto;
}
.conBox {
background: #ffffff;
backdrop-filter: blur(32px);
// background: #ffffff;
// backdrop-filter: blur(32px);
border-radius: 8rpx;
overflow: hidden;
position: relative;
@@ -658,11 +687,76 @@
.seed-card {
background: #ffffff;
border-radius: 8rpx;
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 {
padding: 28rpx 26rpx 22rpx;
}
.seed-summary__top {
display: flex;
flex-direction: column;
gap: 10rpx;
}
.seed-summary__label {
font-size: 24rpx;
color: #585654;
opacity: 0.9;
}
.seed-summary__price {
font-size: 64rpx;
font-weight: 800;
color: #111111;
line-height: 1.1;
}
.seed-summary__divider {
height: 1rpx;
background: rgba(0, 0, 0, 0.08);
margin: 18rpx 0;
}
.seed-summary__bottom {
display: flex;
align-items: stretch;
}
.seed-summary__item {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
}
.seed-summary__item-label {
font-size: 24rpx;
color: #585654;
opacity: 0.9;
}
.seed-summary__item-value {
font-size: 30rpx;
font-weight: 800;
color: #111111;
line-height: 1.1;
}
.seed-summary__item-value--accent {
color: #e54035;
}
.seed-summary__v-divider {
width: 1rpx;
background: rgba(0, 0, 0, 0.08);
margin: 0 22rpx;
}
.seed-card__header {
+4 -1
View File
@@ -143,6 +143,7 @@
@updatePrice="updatePrice"
:addShow="addShow"
:minSalesCountShow="navName === '折扣区'"
:bottomOffset="tabbarBottomOffset"
/>
</view>
</s-pages>
@@ -213,6 +214,8 @@
};
const system = uni.getSystemInfoSync();
const tabbarBottomOffset = uni.upx2px(100);
const paymentBarReserve = uni.upx2px(148);
const baseHeight =
system.windowHeight -
system.statusBarHeight -
@@ -229,7 +232,7 @@
watch(
() => payShow.value,
() => {
const extra = payShow.value ? uni.upx2px(128) : 0;
const extra = payShow.value ? paymentBarReserve : 0;
height.value = `${baseHeight - extra}px`;
},
{ immediate: true },