fix: new index
This commit is contained in:
@@ -32,12 +32,17 @@
|
||||
<!-- Lucky Card (New Design) -->
|
||||
<view class="lucky-card">
|
||||
<view class="lucky-left">
|
||||
<text class="lucky-label">LUCKY</text>
|
||||
<view class="lucky-score">
|
||||
<text class="score-value">{{ luckyScore }}</text>
|
||||
<text class="score-unit">%</text>
|
||||
<view class="date-group">
|
||||
<text class="date-val">{{ currentDate.day }}</text>
|
||||
<view class="date-sub">
|
||||
<text class="date-month">{{ currentDate.month }}月</text>
|
||||
<text class="date-year">{{ currentDate.year }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="lunar-text"
|
||||
>农历 {{ lunarDate.month }}{{ lunarDate.day }}</text
|
||||
>
|
||||
</view>
|
||||
<view class="lucky-divider"></view>
|
||||
<view class="lucky-middle">
|
||||
<view class="lucky-tags">
|
||||
@@ -208,6 +213,15 @@ const handleLogin = () => {
|
||||
const luckyScore = ref(92);
|
||||
const luckyColor = ref("如意金");
|
||||
|
||||
const currentDate = computed(() => {
|
||||
const now = new Date();
|
||||
return {
|
||||
year: now.getFullYear(),
|
||||
month: now.getMonth() + 1,
|
||||
day: now.getDate(),
|
||||
};
|
||||
});
|
||||
|
||||
// 模拟农历数据
|
||||
const lunarDate = ref({
|
||||
year: "2026",
|
||||
@@ -458,30 +472,44 @@ onShareTimeline(() => {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
|
||||
.lucky-label {
|
||||
font-size: 20rpx;
|
||||
color: #d81e06;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.lucky-score {
|
||||
.date-group {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
margin-bottom: 8rpx;
|
||||
|
||||
.score-value {
|
||||
.date-val {
|
||||
font-size: 64rpx;
|
||||
font-weight: 800;
|
||||
color: #d81e06;
|
||||
line-height: 1;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.score-unit {
|
||||
font-size: 32rpx;
|
||||
color: #d81e06;
|
||||
margin-left: 4rpx;
|
||||
|
||||
.date-sub {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.date-month {
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #d81e06;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.date-year {
|
||||
font-size: 20rpx;
|
||||
color: #d81e06;
|
||||
opacity: 0.6;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lunar-text {
|
||||
font-size: 22rpx;
|
||||
color: #d81e06;
|
||||
opacity: 0.8;
|
||||
font-weight: 500;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user