fix: index page

This commit is contained in:
zzc
2026-02-24 16:26:12 +08:00
parent 5e8a3db6d9
commit 66e483c315

View File

@@ -52,13 +52,6 @@
</view>
<view class="card-center">
<view class="fire-circle">
<image
src="/static/icon/fire.png"
mode="aspectFit"
class="fire-icon"
/>
</view>
<view class="lucky-color-tag"> 幸运色{{ luckyColor }} </view>
</view>
@@ -66,11 +59,11 @@
<button class="open-lucky-btn" @tap="onOpenLucky">
<uni-icons
type="star-filled"
size="16"
color="#fff"
style="margin-right: 8rpx"
size="18"
color="#d81e06"
style="margin-right: 12rpx"
/>
开启今日好运
<text>开启今日好运</text>
</button>
<view class="progress-section">
<view class="progress-info">
@@ -206,6 +199,9 @@
</button>
<view class="bottom-spacer"></view>
<!-- 登录弹窗 -->
<LoginPopup ref="loginPopupRef" />
</view>
</template>
@@ -216,8 +212,11 @@ import { onShareAppMessage, onShareTimeline, onShow } from "@dcloudio/uni-app";
import { useUserStore } from "@/stores/user";
import { getRecommendList } from "@/api/system";
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
const userStore = useUserStore();
const statusBarHeight = ref(getStatusBarHeight());
const loginPopupRef = ref(null);
const userInfo = computed(() => userStore?.userInfo || {});
const greetingText = computed(() => {
@@ -233,9 +232,7 @@ const greetingText = computed(() => {
const handleLogin = () => {
if (!userInfo.value.nickName) {
// 触发全局登录逻辑,假设 LoginPopup 组件已在 App.vue 或全局混入中处理
// 或者跳转到登录页,这里假设通过 userStore 或 eventBus 触发登录弹窗
uni.$emit("show-login-popup");
loginPopupRef.value?.open();
}
};
const luckyScore = ref(98);
@@ -502,31 +499,15 @@ onShareTimeline(() => {
flex: 1;
z-index: 2;
.fire-circle {
width: 140rpx;
height: 140rpx;
background: rgba(255, 255, 255, 0.5);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 24rpx;
box-shadow: 0 8rpx 24rpx rgba(168, 90, 90, 0.1);
.fire-icon {
width: 64rpx;
height: 64rpx;
}
}
.lucky-color-tag {
background: #fff;
padding: 10rpx 32rpx;
border-radius: 30rpx;
font-size: 24rpx;
padding: 12rpx 36rpx;
border-radius: 40rpx;
font-size: 26rpx;
color: #d81e06;
font-weight: 600;
box-shadow: 0 4rpx 12rpx rgba(216, 30, 6, 0.1);
box-shadow: 0 4rpx 12rpx rgba(216, 30, 6, 0.15);
letter-spacing: 2rpx;
}
}
@@ -535,18 +516,22 @@ onShareTimeline(() => {
.open-lucky-btn {
width: 100%;
height: 96rpx;
background: rgba(255, 255, 255, 0.4);
border: 2rpx solid rgba(255, 255, 255, 0.6);
border-radius: 48rpx;
height: 108rpx;
background: #fff;
border-radius: 54rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 32rpx;
font-weight: bold;
margin-bottom: 24rpx;
backdrop-filter: blur(5rpx);
color: #d81e06;
font-size: 34rpx;
font-weight: 800;
margin-bottom: 32rpx;
box-shadow: 0 8rpx 20rpx rgba(216, 30, 6, 0.2);
letter-spacing: 2rpx;
&::after {
border: none;
}
}
.progress-section {