fix: lucky page
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
</view>
|
||||
<text class="lucky-word">{{ resultData.luckyWord }}</text>
|
||||
|
||||
<view class="tag-year">2026 CNY SPECIAL</view>
|
||||
<view class="tag-year">{{ currentDateStr }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 内容区 -->
|
||||
@@ -115,12 +115,14 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import calendar from "@/utils/lunar.js";
|
||||
|
||||
const popup = ref(null);
|
||||
const isAnimating = ref(true);
|
||||
const isFlipping = ref(false);
|
||||
const showLight = ref(false);
|
||||
const loadingText = ref("好运加载中...");
|
||||
const currentDateStr = ref("");
|
||||
|
||||
const resultData = ref({
|
||||
score: 88,
|
||||
@@ -140,6 +142,14 @@ const open = () => {
|
||||
isFlipping.value = false;
|
||||
showLight.value = false;
|
||||
loadingText.value = texts[0];
|
||||
|
||||
const now = new Date();
|
||||
const y = now.getFullYear();
|
||||
const m = (now.getMonth() + 1).toString().padStart(2, "0");
|
||||
const d = now.getDate().toString().padStart(2, "0");
|
||||
const lunar = calendar.solar2lunar(now);
|
||||
currentDateStr.value = `${y}.${m}.${d} ${lunar.lunarDateStr}`;
|
||||
|
||||
popup.value.open();
|
||||
|
||||
startAnimation();
|
||||
@@ -223,7 +233,7 @@ defineExpose({ open, close });
|
||||
}
|
||||
|
||||
.card-front {
|
||||
background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
|
||||
background: linear-gradient(135deg, #fffcf5 0%, #fff4e6 100%);
|
||||
z-index: 2;
|
||||
|
||||
.loading-circle {
|
||||
@@ -236,10 +246,16 @@ defineExpose({ open, close });
|
||||
position: absolute;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background: #ffd700;
|
||||
background: #ff8f00;
|
||||
border-radius: 50%;
|
||||
animation: orbit 1.5s linear infinite;
|
||||
|
||||
/* 绝对居中 */
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -10rpx;
|
||||
margin-left: -10rpx;
|
||||
|
||||
&.p1 {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
@@ -256,9 +272,10 @@ defineExpose({ open, close });
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
color: #ffd700;
|
||||
color: #d81e06;
|
||||
font-size: 28rpx;
|
||||
letter-spacing: 2rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user