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