2026-01-09 11:24:40 +08:00
|
|
|
|
<template>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<view
|
|
|
|
|
|
class="home-container"
|
|
|
|
|
|
:style="{
|
|
|
|
|
|
paddingTop: statusBarHeight + 12 + 'px',
|
|
|
|
|
|
}"
|
|
|
|
|
|
>
|
2026-02-23 22:36:31 +08:00
|
|
|
|
<!-- 顶部用户信息栏 -->
|
|
|
|
|
|
<view class="header-section">
|
|
|
|
|
|
<view class="user-info">
|
|
|
|
|
|
<image
|
|
|
|
|
|
class="user-avatar"
|
|
|
|
|
|
:src="userInfo.avatarUrl || '/static/default-avatar.png'"
|
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<view class="user-texts">
|
2026-02-24 15:46:42 +08:00
|
|
|
|
<text class="greeting-info">{{ greetingText }}</text>
|
2026-02-25 21:49:36 +08:00
|
|
|
|
<view class="name-row">
|
|
|
|
|
|
<text class="user-name" @tap="handleLogin">
|
|
|
|
|
|
{{ userInfo.nickName || "点击登录" }}
|
|
|
|
|
|
</text>
|
|
|
|
|
|
<view class="user-points" v-if="isLoggedIn">
|
|
|
|
|
|
<text class="points-label">积分</text>
|
|
|
|
|
|
<text class="points-value">{{ userPoints }}</text>
|
|
|
|
|
|
</view>
|
2026-02-25 21:47:42 +08:00
|
|
|
|
</view>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-02-08 19:07:06 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<!-- 主卡片 (Lucky Status) -->
|
|
|
|
|
|
<view class="main-card">
|
|
|
|
|
|
<view class="card-bg-decor"></view>
|
|
|
|
|
|
<view class="card-top">
|
|
|
|
|
|
<view class="lucky-status">
|
|
|
|
|
|
<text class="status-label">LUCKY STATUS</text>
|
|
|
|
|
|
<text class="status-value"
|
|
|
|
|
|
>{{ luckyScore }}<text class="percent">%</text></text
|
|
|
|
|
|
>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="date-box">
|
|
|
|
|
|
<view class="date-row">
|
|
|
|
|
|
<uni-icons type="calendar" size="14" color="#8b5a5a" />
|
|
|
|
|
|
<text class="date-text"
|
|
|
|
|
|
>{{ lunarDate.year }}年-{{ lunarDate.month
|
|
|
|
|
|
}}{{ lunarDate.day }}</text
|
|
|
|
|
|
>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="yi-ji-row">
|
|
|
|
|
|
<text class="label">宜:</text
|
|
|
|
|
|
><text class="content">{{ lunarDate.yi }}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="yi-ji-row">
|
|
|
|
|
|
<text class="label">忌:</text
|
|
|
|
|
|
><text class="content">{{ lunarDate.ji }}</text>
|
|
|
|
|
|
</view>
|
2026-02-23 22:36:31 +08:00
|
|
|
|
</view>
|
2026-01-09 11:24:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<view class="card-center">
|
|
|
|
|
|
<view class="lucky-color-tag"> 幸运色:{{ luckyColor }} </view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<view class="card-bottom">
|
|
|
|
|
|
<button class="open-lucky-btn" @tap="onOpenLucky">
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
type="star-filled"
|
2026-02-24 16:26:12 +08:00
|
|
|
|
size="18"
|
|
|
|
|
|
color="#d81e06"
|
|
|
|
|
|
style="margin-right: 12rpx"
|
2026-02-24 15:22:58 +08:00
|
|
|
|
/>
|
2026-02-25 14:59:18 +08:00
|
|
|
|
<text>{{
|
|
|
|
|
|
signInfo.isSignedToday ? "今日已开启" : "开启今日好运"
|
|
|
|
|
|
}}</text>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
</button>
|
2026-02-25 15:20:30 +08:00
|
|
|
|
<view class="week-sign-section">
|
|
|
|
|
|
<view class="sign-header">
|
|
|
|
|
|
<text class="sign-title">已连续签到 {{ continuousDays }} 天</text>
|
|
|
|
|
|
<text class="sign-tip">连续7天得大奖</text>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
</view>
|
2026-02-25 15:20:30 +08:00
|
|
|
|
<view class="week-days">
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<view
|
2026-02-25 15:20:30 +08:00
|
|
|
|
class="day-item"
|
|
|
|
|
|
v-for="(day, index) in weekDays"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
:class="{ 'is-today': day.isToday, 'is-signed': day.isSigned }"
|
|
|
|
|
|
>
|
|
|
|
|
|
<text class="day-label">{{ day.label }}</text>
|
|
|
|
|
|
<view class="status-icon">
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
v-if="day.isSigned"
|
|
|
|
|
|
type="checkmarkempty"
|
|
|
|
|
|
size="14"
|
|
|
|
|
|
color="#fff"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
v-else-if="day.isToday && !day.isSigned"
|
|
|
|
|
|
type="plus"
|
|
|
|
|
|
size="14"
|
|
|
|
|
|
color="#d81e06"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<text v-else class="dot"></text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-01-22 23:54:56 +08:00
|
|
|
|
</view>
|
2026-02-23 22:36:31 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<!-- 大家都在用 -->
|
2026-02-24 15:30:03 +08:00
|
|
|
|
<view class="section-container compact-section">
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<view class="section-header">
|
|
|
|
|
|
<view class="title-left-decor"></view>
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
type="heart-filled"
|
|
|
|
|
|
size="18"
|
|
|
|
|
|
color="#d81e06"
|
|
|
|
|
|
style="margin-right: 8rpx"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<text class="section-title">大家都在用</text>
|
|
|
|
|
|
</view>
|
2026-02-24 15:30:03 +08:00
|
|
|
|
<view class="feature-row">
|
2026-02-24 20:49:37 +08:00
|
|
|
|
<view class="feature-item" @tap="navTo('/pages/avatar/download')">
|
2026-02-24 15:30:03 +08:00
|
|
|
|
<view class="left-content">
|
|
|
|
|
|
<view class="icon-wrap yellow-bg">
|
|
|
|
|
|
<image
|
|
|
|
|
|
src="/static/icon/guashi.png"
|
|
|
|
|
|
mode="aspectFit"
|
|
|
|
|
|
class="feature-icon"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text-content">
|
|
|
|
|
|
<text class="feature-name">制作今日头像</text>
|
2026-02-24 15:46:42 +08:00
|
|
|
|
<!-- <text class="feature-desc">限定 · 如意边框</text> -->
|
2026-02-24 15:30:03 +08:00
|
|
|
|
</view>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-02-24 15:30:03 +08:00
|
|
|
|
<view class="feature-item" @tap="navTo('/pages/wallpaper/index')">
|
|
|
|
|
|
<view class="left-content">
|
|
|
|
|
|
<view class="icon-wrap blue-bg">
|
|
|
|
|
|
<image
|
|
|
|
|
|
src="/static/icon/bizhi.png"
|
|
|
|
|
|
mode="aspectFit"
|
|
|
|
|
|
class="feature-icon"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text-content">
|
|
|
|
|
|
<text class="feature-name">好运祝福壁纸</text>
|
2026-02-24 15:46:42 +08:00
|
|
|
|
<!-- <text class="feature-desc">高清 · 福气盈门</text> -->
|
2026-02-24 15:30:03 +08:00
|
|
|
|
</view>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
</view>
|
2026-01-22 23:54:56 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<!-- 排行榜单 -->
|
|
|
|
|
|
<view class="section-container">
|
|
|
|
|
|
<view class="section-header">
|
|
|
|
|
|
<view class="title-left-decor"></view>
|
|
|
|
|
|
<text class="section-title">排行榜单</text>
|
2026-02-24 15:30:03 +08:00
|
|
|
|
<view class="rank-tabs-mini">
|
2026-02-25 21:01:21 +08:00
|
|
|
|
<!-- <view
|
2026-02-24 15:30:03 +08:00
|
|
|
|
class="rank-tab-mini"
|
|
|
|
|
|
:class="{ active: currentTab === 'all' }"
|
|
|
|
|
|
@tap="switchTab('all')"
|
|
|
|
|
|
>全部</view
|
2026-02-25 21:01:21 +08:00
|
|
|
|
> -->
|
2026-02-24 15:46:42 +08:00
|
|
|
|
<view
|
|
|
|
|
|
class="rank-tab-mini"
|
|
|
|
|
|
:class="{ active: currentTab === 'wallpaper' }"
|
|
|
|
|
|
@tap="switchTab('wallpaper')"
|
|
|
|
|
|
>壁纸</view
|
|
|
|
|
|
>
|
2026-02-24 15:30:03 +08:00
|
|
|
|
<view
|
|
|
|
|
|
class="rank-tab-mini"
|
2026-02-25 21:17:47 +08:00
|
|
|
|
:class="{ active: currentTab === 'avatar' }"
|
|
|
|
|
|
@tap="switchTab('avatar')"
|
2026-02-24 15:46:42 +08:00
|
|
|
|
>头像</view
|
2026-02-24 15:30:03 +08:00
|
|
|
|
>
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="rank-tab-mini"
|
|
|
|
|
|
:class="{ active: currentTab === 'card' }"
|
|
|
|
|
|
@tap="switchTab('card')"
|
|
|
|
|
|
>贺卡</view
|
|
|
|
|
|
>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
</view>
|
2026-01-09 11:24:40 +08:00
|
|
|
|
</view>
|
2026-02-23 22:36:31 +08:00
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<!-- Ranking List -->
|
|
|
|
|
|
<view class="rank-list">
|
2026-02-23 22:36:31 +08:00
|
|
|
|
<view
|
2026-02-24 15:22:58 +08:00
|
|
|
|
class="rank-item"
|
2026-02-23 22:36:31 +08:00
|
|
|
|
v-for="(item, index) in rankingList"
|
2026-02-24 15:22:58 +08:00
|
|
|
|
:key="item.id"
|
|
|
|
|
|
@tap="onRankItemTap(item)"
|
2026-02-23 22:36:31 +08:00
|
|
|
|
>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<view class="rank-num" :class="'rank-' + (index + 1)">{{
|
|
|
|
|
|
index + 1
|
|
|
|
|
|
}}</view>
|
2026-02-25 21:17:47 +08:00
|
|
|
|
<image
|
2026-02-25 21:37:18 +08:00
|
|
|
|
:src="getThumbUrl(item?.resourceInfo?.url)"
|
2026-02-25 21:17:47 +08:00
|
|
|
|
mode="aspectFill"
|
|
|
|
|
|
class="rank-thumb"
|
|
|
|
|
|
/>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<view class="rank-info">
|
|
|
|
|
|
<view class="rank-title-row">
|
|
|
|
|
|
<text class="rank-title">{{ item.title }}</text>
|
2026-01-09 11:24:40 +08:00
|
|
|
|
</view>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<view class="rank-meta">
|
2026-02-25 21:37:18 +08:00
|
|
|
|
<view class="tag-hot" v-if="index <= 3">HOT</view>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<text class="usage-count">{{ item.usageCount }} 人在用</text>
|
2026-02-23 22:36:31 +08:00
|
|
|
|
</view>
|
2026-01-09 11:24:40 +08:00
|
|
|
|
</view>
|
2026-02-25 21:47:42 +08:00
|
|
|
|
<view class="rank-likes" v-if="item.type === 'card'">
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<uni-icons type="heart-filled" size="16" color="#a85a5a" />
|
|
|
|
|
|
<text class="likes-num">{{ item.likes }}</text>
|
|
|
|
|
|
</view>
|
2026-02-25 21:47:42 +08:00
|
|
|
|
<view class="rank-action" v-else>
|
|
|
|
|
|
<view class="download-btn" @tap.stop="handleDownload(item)">
|
|
|
|
|
|
<uni-icons type="download" size="14" color="#fff" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-01-09 11:24:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- Floating Share Button -->
|
2026-02-24 17:43:36 +08:00
|
|
|
|
<!-- <button class="float-share-btn" open-type="share">
|
2026-02-24 15:22:58 +08:00
|
|
|
|
<uni-icons type="upload" size="18" color="#d81e06" />
|
|
|
|
|
|
<text>分享今日运势</text>
|
2026-02-24 17:43:36 +08:00
|
|
|
|
</button> -->
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
<view class="bottom-spacer"></view>
|
2026-02-24 16:26:12 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 登录弹窗 -->
|
2026-02-24 17:32:45 +08:00
|
|
|
|
<LoginPopup />
|
|
|
|
|
|
<!-- 运势抽奖弹窗 -->
|
|
|
|
|
|
<LuckyPopup ref="luckyPopupRef" />
|
2026-02-25 21:47:42 +08:00
|
|
|
|
<RewardAd ref="rewardAdRef" @onReward="handleAdReward" />
|
2026-01-09 11:24:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-02-24 15:46:42 +08:00
|
|
|
|
import { ref, onMounted, computed } from "vue";
|
2026-02-24 15:22:58 +08:00
|
|
|
|
import { getStatusBarHeight } from "@/utils/system";
|
|
|
|
|
|
import { onShareAppMessage, onShareTimeline, onShow } from "@dcloudio/uni-app";
|
2026-02-23 22:36:31 +08:00
|
|
|
|
import { useUserStore } from "@/stores/user";
|
2026-02-25 21:47:42 +08:00
|
|
|
|
import {
|
|
|
|
|
|
getRecommendList,
|
|
|
|
|
|
getRankList,
|
|
|
|
|
|
abilityCheck,
|
|
|
|
|
|
watchAdReward,
|
|
|
|
|
|
} from "@/api/system";
|
|
|
|
|
|
import { saveRemoteImageToLocal, saveRecordRequest } from "@/utils/common";
|
2026-02-25 15:20:30 +08:00
|
|
|
|
import { getUserSignInfo, userSignIn } from "@/api/user";
|
2026-02-25 21:47:42 +08:00
|
|
|
|
import { avatarDownloadRecord } from "@/api/avatar";
|
2026-01-09 11:24:40 +08:00
|
|
|
|
|
2026-02-24 16:26:12 +08:00
|
|
|
|
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
2026-02-24 17:32:45 +08:00
|
|
|
|
import LuckyPopup from "@/components/LuckyPopup/LuckyPopup.vue";
|
2026-02-25 21:47:42 +08:00
|
|
|
|
import RewardAd from "@/components/RewardAd/RewardAd.vue";
|
2026-02-24 16:26:12 +08:00
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
const userStore = useUserStore();
|
2026-02-24 15:22:58 +08:00
|
|
|
|
const statusBarHeight = ref(getStatusBarHeight());
|
2026-02-24 16:26:12 +08:00
|
|
|
|
const loginPopupRef = ref(null);
|
2026-02-24 17:32:45 +08:00
|
|
|
|
const luckyPopupRef = ref(null);
|
2026-02-25 21:47:42 +08:00
|
|
|
|
const rewardAdRef = ref(null);
|
2026-02-24 15:46:42 +08:00
|
|
|
|
const userInfo = computed(() => userStore?.userInfo || {});
|
2026-02-24 17:32:45 +08:00
|
|
|
|
const isLoggedIn = computed(() => !!userStore.userInfo.nickName);
|
2026-02-25 21:47:42 +08:00
|
|
|
|
const userPoints = computed(() => userStore.userInfo.points || 0);
|
2026-02-25 14:50:47 +08:00
|
|
|
|
const signInfo = ref({}); // 用户签到信息
|
2026-02-24 17:32:45 +08:00
|
|
|
|
|
2026-02-25 15:20:30 +08:00
|
|
|
|
const weekDays = computed(() => {
|
|
|
|
|
|
const now = new Date();
|
|
|
|
|
|
const todayStr =
|
|
|
|
|
|
signInfo.value.today ||
|
|
|
|
|
|
`${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}`;
|
|
|
|
|
|
|
|
|
|
|
|
const current = new Date(todayStr);
|
|
|
|
|
|
const day = current.getDay() || 7; // 1 (Mon) - 7 (Sun)
|
|
|
|
|
|
const monday = new Date(current);
|
|
|
|
|
|
monday.setDate(current.getDate() - day + 1);
|
|
|
|
|
|
|
|
|
|
|
|
const days = [];
|
|
|
|
|
|
const labels = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
2026-02-25 16:34:35 +08:00
|
|
|
|
const signedDays = signInfo.value.signedDays || [];
|
2026-02-25 15:20:30 +08:00
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < 7; i++) {
|
|
|
|
|
|
const d = new Date(monday);
|
|
|
|
|
|
d.setDate(monday.getDate() + i);
|
|
|
|
|
|
const y = d.getFullYear();
|
|
|
|
|
|
const m = String(d.getMonth() + 1).padStart(2, "0");
|
|
|
|
|
|
const da = String(d.getDate()).padStart(2, "0");
|
|
|
|
|
|
const dateStr = `${y}-${m}-${da}`;
|
|
|
|
|
|
|
|
|
|
|
|
let isSigned = false;
|
|
|
|
|
|
const isToday = dateStr === todayStr;
|
|
|
|
|
|
const isFuture = dateStr > todayStr;
|
|
|
|
|
|
|
2026-02-25 16:34:35 +08:00
|
|
|
|
if (signedDays.includes(i + 1)) {
|
|
|
|
|
|
isSigned = true;
|
2026-02-25 15:20:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
days.push({
|
|
|
|
|
|
label: labels[i],
|
|
|
|
|
|
date: dateStr,
|
|
|
|
|
|
isToday,
|
|
|
|
|
|
isSigned,
|
|
|
|
|
|
isFuture,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
return days;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-02-24 15:46:42 +08:00
|
|
|
|
const greetingText = computed(() => {
|
|
|
|
|
|
const hour = new Date().getHours();
|
|
|
|
|
|
if (hour < 6) return "凌晨好";
|
|
|
|
|
|
if (hour < 9) return "早上好";
|
|
|
|
|
|
if (hour < 12) return "上午好";
|
|
|
|
|
|
if (hour < 14) return "中午好";
|
|
|
|
|
|
if (hour < 17) return "下午好";
|
|
|
|
|
|
if (hour < 19) return "傍晚好";
|
|
|
|
|
|
return "晚上好";
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-02-25 21:17:47 +08:00
|
|
|
|
const getThumbUrl = (url) => {
|
2026-02-25 21:37:18 +08:00
|
|
|
|
if (!url) return "";
|
|
|
|
|
|
return `${url}?imageView2/1/w/200/h/200/q/80`;
|
2026-02-25 21:17:47 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-24 15:46:42 +08:00
|
|
|
|
const handleLogin = () => {
|
|
|
|
|
|
if (!userInfo.value.nickName) {
|
2026-02-24 17:32:45 +08:00
|
|
|
|
uni.$emit("show-login-popup");
|
2026-02-24 15:46:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
2026-02-24 15:22:58 +08:00
|
|
|
|
const luckyScore = ref(98);
|
|
|
|
|
|
const luckyColor = ref("赤金朱红");
|
2026-02-25 14:59:18 +08:00
|
|
|
|
const continuousDays = computed(() => signInfo.value.continuousDays || 0);
|
|
|
|
|
|
const currentMonthDays = computed(() => signInfo.value.totalDays || 0);
|
2026-02-24 15:54:13 +08:00
|
|
|
|
const totalMonthDays = computed(() => {
|
|
|
|
|
|
const date = new Date();
|
|
|
|
|
|
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
|
|
|
|
|
|
}); // 当前月总天数
|
2026-02-25 21:01:21 +08:00
|
|
|
|
const currentTab = ref("wallpaper");
|
2026-01-22 22:19:41 +08:00
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
// 模拟农历数据
|
|
|
|
|
|
const lunarDate = ref({
|
|
|
|
|
|
year: "2026",
|
|
|
|
|
|
month: "正月",
|
|
|
|
|
|
day: "初一",
|
|
|
|
|
|
yi: "开光、祈福、求嗣",
|
|
|
|
|
|
ji: "安葬、动土",
|
2026-01-22 22:19:41 +08:00
|
|
|
|
});
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
const rankingList = ref([]);
|
2026-01-28 15:44:30 +08:00
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
onMounted(() => {
|
2026-02-25 14:50:47 +08:00
|
|
|
|
fetchUserSingInfo(); // 获取用户签到信息
|
2026-02-24 15:22:58 +08:00
|
|
|
|
fetchRankingData();
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
onShow(() => {
|
|
|
|
|
|
if (userStore.userInfo) {
|
2026-02-24 15:46:42 +08:00
|
|
|
|
// userInfo.value = userStore.userInfo; // 已改为 computed
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
2026-02-23 22:36:31 +08:00
|
|
|
|
});
|
2026-01-28 15:44:30 +08:00
|
|
|
|
|
2026-02-25 14:50:47 +08:00
|
|
|
|
const fetchUserSingInfo = async () => {
|
|
|
|
|
|
if (!isLoggedIn.value) return;
|
|
|
|
|
|
const res = await getUserSignInfo();
|
|
|
|
|
|
signInfo.value = res || {};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
const fetchRankingData = async () => {
|
2026-02-25 21:17:47 +08:00
|
|
|
|
try {
|
|
|
|
|
|
const res = await getRankList(currentTab.value);
|
|
|
|
|
|
if (res && Array.isArray(res)) {
|
|
|
|
|
|
rankingList.value = res.slice(0, 10);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
rankingList.value = [];
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.error("fetchRankingData error", e);
|
|
|
|
|
|
rankingList.value = [];
|
|
|
|
|
|
}
|
2026-01-28 15:44:30 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
const switchTab = (tab) => {
|
2026-02-25 21:17:47 +08:00
|
|
|
|
if (currentTab.value === tab) return;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
currentTab.value = tab;
|
2026-02-25 21:17:47 +08:00
|
|
|
|
fetchRankingData();
|
2026-01-28 15:44:30 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
const onNoticeTap = () => {
|
|
|
|
|
|
uni.showToast({ title: "暂无新消息", icon: "none" });
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const onWalletTap = () => {
|
|
|
|
|
|
uni.navigateTo({ url: "/pages/mine/vip" });
|
2026-01-28 15:44:30 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-25 15:20:30 +08:00
|
|
|
|
const onOpenLucky = async () => {
|
2026-02-24 17:32:45 +08:00
|
|
|
|
if (!isLoggedIn.value) {
|
|
|
|
|
|
uni.$emit("show-login-popup");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2026-02-25 15:20:30 +08:00
|
|
|
|
|
|
|
|
|
|
if (signInfo.value.isSignedToday) {
|
|
|
|
|
|
luckyPopupRef.value?.open();
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
uni.showLoading({ title: "开启好运...", mask: true });
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await userSignIn();
|
|
|
|
|
|
if (res && res.success) {
|
|
|
|
|
|
signInfo.value.continuousDays = res.continuousDays;
|
|
|
|
|
|
signInfo.value.isSignedToday = true;
|
|
|
|
|
|
if (typeof res.totalDays === "number") {
|
|
|
|
|
|
signInfo.value.totalDays = res.totalDays;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
signInfo.value.totalDays = (signInfo.value.totalDays || 0) + 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-25 16:34:35 +08:00
|
|
|
|
// Update signedDays locally
|
|
|
|
|
|
if (!signInfo.value.signedDays) {
|
|
|
|
|
|
signInfo.value.signedDays = [];
|
|
|
|
|
|
}
|
|
|
|
|
|
const today = new Date(signInfo.value.today || new Date());
|
|
|
|
|
|
const dayIndex = today.getDay() || 7;
|
|
|
|
|
|
if (!signInfo.value.signedDays.includes(dayIndex)) {
|
|
|
|
|
|
signInfo.value.signedDays.push(dayIndex);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-25 15:20:30 +08:00
|
|
|
|
// Update user assets (points)
|
|
|
|
|
|
userStore.fetchUserAssets();
|
|
|
|
|
|
|
|
|
|
|
|
luckyPopupRef.value?.open();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({ title: "签到失败", icon: "none" });
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.error(e);
|
|
|
|
|
|
uni.showToast({ title: "网络错误,请稍后重试", icon: "none" });
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
|
}
|
2026-02-23 22:36:31 +08:00
|
|
|
|
};
|
2026-01-28 15:55:26 +08:00
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
const navTo = (url) => {
|
|
|
|
|
|
uni.navigateTo({ url });
|
2026-01-28 15:44:30 +08:00
|
|
|
|
};
|
2026-01-09 11:24:40 +08:00
|
|
|
|
|
2026-02-25 21:47:42 +08:00
|
|
|
|
const handleDownload = async (item) => {
|
|
|
|
|
|
if (!isLoggedIn.value) {
|
|
|
|
|
|
uni.$emit("show-login-popup");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const type =
|
|
|
|
|
|
item.type === "wallpaper" ? "wallpaper_download" : "avatar_download";
|
|
|
|
|
|
const abilityRes = await abilityCheck(type);
|
|
|
|
|
|
|
|
|
|
|
|
if (!abilityRes.canUse) {
|
|
|
|
|
|
if (
|
|
|
|
|
|
abilityRes?.blockType === "need_share" &&
|
|
|
|
|
|
abilityRes?.message === "分享可继续"
|
|
|
|
|
|
) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: "分享给好友即可下载",
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (
|
|
|
|
|
|
abilityRes?.blockType === "need_ad" &&
|
|
|
|
|
|
abilityRes?.message === "观看广告可继续"
|
|
|
|
|
|
) {
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
title: "积分不足",
|
|
|
|
|
|
content: "观看广告可获得50积分,继续下载",
|
|
|
|
|
|
success: (res) => {
|
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
|
rewardAdRef.value.show();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: "您今日下载次数已用完,明日再试",
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
uni.showLoading({ title: "下载中..." });
|
|
|
|
|
|
try {
|
|
|
|
|
|
const promises = [
|
|
|
|
|
|
saveRemoteImageToLocal(item.resourceInfo.url),
|
|
|
|
|
|
saveRecordRequest("", item.id, type, item.resourceInfo.url),
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
if (item.type === "avatar") {
|
|
|
|
|
|
promises.push(
|
|
|
|
|
|
avatarDownloadRecord({ id: item.id, url: item.resourceInfo.url }),
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await Promise.all(promises);
|
|
|
|
|
|
|
|
|
|
|
|
await userStore.fetchUserAssets();
|
|
|
|
|
|
uni.showToast({ title: "保存成功 消耗 20 积分" });
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.error("Download failed", e);
|
|
|
|
|
|
uni.showToast({ title: "下载失败", icon: "none" });
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleAdReward = async (token) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await watchAdReward(token);
|
|
|
|
|
|
if (res) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: "获得50积分",
|
|
|
|
|
|
icon: "success",
|
|
|
|
|
|
});
|
|
|
|
|
|
await userStore.fetchUserAssets();
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.error("Reward claim failed", e);
|
|
|
|
|
|
uni.showToast({ title: "奖励发放失败", icon: "none" });
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
const onRankItemTap = (item) => {
|
2026-02-25 21:17:47 +08:00
|
|
|
|
if (item.type === "avatar") {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
uni.navigateTo({ url: `/pages/avatar/index?id=${item.id}` });
|
|
|
|
|
|
} else if (item.type === "card") {
|
|
|
|
|
|
uni.switchTab({ url: "/pages/make/index" });
|
|
|
|
|
|
} else if (item.type === "wallpaper") {
|
|
|
|
|
|
uni.navigateTo({ url: `/pages/wallpaper/index` });
|
|
|
|
|
|
}
|
2026-01-15 08:43:10 +08:00
|
|
|
|
};
|
2026-01-09 11:24:40 +08:00
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
onShareAppMessage(() => {
|
|
|
|
|
|
return {
|
|
|
|
|
|
title: "开启你的2026新春好运!",
|
|
|
|
|
|
path: "/pages/index/index",
|
|
|
|
|
|
};
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
onShareTimeline(() => {
|
|
|
|
|
|
return {
|
|
|
|
|
|
title: "开启你的2026新春好运!",
|
|
|
|
|
|
};
|
2026-01-15 08:43:10 +08:00
|
|
|
|
});
|
2026-01-09 11:24:40 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2026-02-23 22:36:31 +08:00
|
|
|
|
.home-container {
|
2026-01-09 11:24:40 +08:00
|
|
|
|
min-height: 100vh;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
background-color: #fbfbf9; /* 柔和的米色背景 */
|
|
|
|
|
|
padding-left: 32rpx;
|
|
|
|
|
|
padding-right: 32rpx;
|
|
|
|
|
|
padding-bottom: 120rpx;
|
2026-01-09 11:24:40 +08:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
/* 顶部用户信息 */
|
2026-02-23 22:36:31 +08:00
|
|
|
|
.header-section {
|
2026-02-08 19:07:06 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
align-items: center;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
margin-bottom: 24rpx;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
.user-info {
|
2026-02-08 19:07:06 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
.user-avatar {
|
2026-02-24 15:30:03 +08:00
|
|
|
|
width: 64rpx;
|
|
|
|
|
|
height: 64rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
border-radius: 50%;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
border: 2rpx solid #fff;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
2026-02-24 15:30:03 +08:00
|
|
|
|
margin-right: 16rpx;
|
2026-02-08 19:13:02 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
.user-texts {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-24 15:46:42 +08:00
|
|
|
|
.greeting-info {
|
2026-02-24 15:30:03 +08:00
|
|
|
|
font-size: 20rpx;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
color: #999;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
margin-bottom: 2rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-25 21:49:36 +08:00
|
|
|
|
.name-row {
|
2026-02-25 21:47:42 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
2026-02-25 21:49:36 +08:00
|
|
|
|
.user-name {
|
|
|
|
|
|
font-size: 26rpx;
|
2026-02-25 21:47:42 +08:00
|
|
|
|
font-weight: bold;
|
2026-02-25 21:49:36 +08:00
|
|
|
|
color: #333;
|
|
|
|
|
|
margin-right: 12rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.user-points {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
background: rgba(255, 152, 0, 0.1);
|
|
|
|
|
|
border: 1rpx solid rgba(255, 152, 0, 0.3);
|
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
padding: 2rpx 10rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.points-label {
|
|
|
|
|
|
font-size: 16rpx;
|
|
|
|
|
|
color: #ff9800;
|
|
|
|
|
|
margin-right: 4rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.points-value {
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
color: #ff5722;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
2026-02-25 21:47:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-08 19:07:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
/* 主卡片 (Lucky Status) */
|
|
|
|
|
|
.main-card {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 640rpx;
|
|
|
|
|
|
background: linear-gradient(180deg, #fcece8 0%, #f7dcd6 100%);
|
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
padding: 40rpx;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
box-shadow: 0 20rpx 40rpx rgba(189, 87, 87, 0.15);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
margin-bottom: 48rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.card-bg-decor {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: -50rpx;
|
|
|
|
|
|
right: -50rpx;
|
|
|
|
|
|
width: 300rpx;
|
|
|
|
|
|
height: 300rpx;
|
|
|
|
|
|
background: radial-gradient(
|
|
|
|
|
|
circle,
|
|
|
|
|
|
rgba(255, 255, 255, 0.4) 0%,
|
|
|
|
|
|
rgba(255, 255, 255, 0) 70%
|
|
|
|
|
|
);
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.card-top {
|
2026-01-15 08:43:10 +08:00
|
|
|
|
display: flex;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
|
|
|
|
|
|
.lucky-status {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
|
|
|
|
.status-label {
|
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
|
color: #a85a5a;
|
|
|
|
|
|
letter-spacing: 2rpx;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
margin-bottom: 8rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-value {
|
|
|
|
|
|
font-size: 88rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
font-weight: bold;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
color: #a85a5a;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
|
|
|
|
|
|
.percent {
|
|
|
|
|
|
font-size: 40rpx;
|
|
|
|
|
|
margin-left: 4rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.date-box {
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.6);
|
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
backdrop-filter: blur(10rpx);
|
|
|
|
|
|
|
|
|
|
|
|
.date-row {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
margin-bottom: 12rpx;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
.date-text {
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
color: #8b5a5a;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
margin-left: 8rpx;
|
|
|
|
|
|
}
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
.yi-ji-row {
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
margin-bottom: 4rpx;
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
|
|
|
|
|
|
.label {
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content {
|
|
|
|
|
|
color: #555;
|
|
|
|
|
|
}
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-01-15 08:43:10 +08:00
|
|
|
|
}
|
2026-01-09 11:24:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
.card-center {
|
2026-01-22 23:54:56 +08:00
|
|
|
|
display: flex;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
flex-direction: column;
|
2026-01-22 23:54:56 +08:00
|
|
|
|
align-items: center;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
justify-content: center;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
|
|
|
|
|
|
.lucky-color-tag {
|
|
|
|
|
|
background: #fff;
|
2026-02-24 16:26:12 +08:00
|
|
|
|
padding: 12rpx 36rpx;
|
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
font-size: 26rpx;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
color: #d81e06;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
font-weight: 600;
|
2026-02-24 16:26:12 +08:00
|
|
|
|
box-shadow: 0 4rpx 12rpx rgba(216, 30, 6, 0.15);
|
|
|
|
|
|
letter-spacing: 2rpx;
|
2026-01-22 23:54:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
.card-bottom {
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
|
|
|
|
|
|
.open-lucky-btn {
|
|
|
|
|
|
width: 100%;
|
2026-02-24 16:26:12 +08:00
|
|
|
|
height: 108rpx;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
border-radius: 54rpx;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
2026-02-24 16:26:12 +08:00
|
|
|
|
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;
|
|
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-25 15:20:30 +08:00
|
|
|
|
.week-sign-section {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
.sign-header {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
2026-02-25 15:20:30 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 24rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.sign-title {
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
color: #a85a5a;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sign-tip {
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
color: #a85a5a;
|
|
|
|
|
|
opacity: 0.7;
|
|
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-25 15:20:30 +08:00
|
|
|
|
.week-days {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
|
|
.day-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
.day-label {
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
color: #a85a5a;
|
|
|
|
|
|
margin-bottom: 12rpx;
|
|
|
|
|
|
opacity: 0.8;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-icon {
|
|
|
|
|
|
width: 44rpx;
|
|
|
|
|
|
height: 44rpx;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.4);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
|
|
.dot {
|
|
|
|
|
|
width: 8rpx;
|
|
|
|
|
|
height: 8rpx;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background: #a85a5a;
|
|
|
|
|
|
opacity: 0.3;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.is-today {
|
|
|
|
|
|
.day-label {
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-icon {
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
box-shadow: 0 4rpx 12rpx rgba(216, 30, 6, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.is-signed {
|
|
|
|
|
|
.status-icon {
|
|
|
|
|
|
background: #d81e06;
|
|
|
|
|
|
box-shadow: 0 4rpx 12rpx rgba(216, 30, 6, 0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.day-label {
|
|
|
|
|
|
color: #d81e06;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
/* 通用 Section 样式 */
|
|
|
|
|
|
.section-container {
|
|
|
|
|
|
margin-bottom: 48rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.section-header {
|
2026-01-22 23:54:56 +08:00
|
|
|
|
display: flex;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
align-items: center;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
margin-bottom: 24rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.title-left-decor {
|
|
|
|
|
|
width: 6rpx;
|
|
|
|
|
|
height: 28rpx;
|
|
|
|
|
|
background: #d81e06;
|
|
|
|
|
|
border-radius: 4rpx;
|
|
|
|
|
|
margin-right: 12rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-title {
|
|
|
|
|
|
font-size: 32rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
font-weight: bold;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
color: #333;
|
|
|
|
|
|
flex: 1;
|
2026-01-22 23:54:56 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
.header-right {
|
2026-02-23 22:36:31 +08:00
|
|
|
|
display: flex;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
.refresh-text {
|
|
|
|
|
|
font-size: 22rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
color: #999;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
margin-left: 6rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-01-22 23:54:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
/* 大家都在用 */
|
2026-02-24 15:30:03 +08:00
|
|
|
|
.compact-section {
|
|
|
|
|
|
.section-header {
|
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.feature-row {
|
2026-01-15 08:43:10 +08:00
|
|
|
|
display: flex;
|
2026-02-24 15:35:55 +08:00
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
justify-content: space-between;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-24 15:30:03 +08:00
|
|
|
|
.feature-item {
|
2026-02-24 15:35:55 +08:00
|
|
|
|
width: 48%;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
background: #fff;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
border-radius: 24rpx;
|
2026-02-24 15:35:55 +08:00
|
|
|
|
padding: 20rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.03);
|
2026-02-24 15:35:55 +08:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
margin-bottom: 20rpx;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-24 15:30:03 +08:00
|
|
|
|
.left-content {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-02-24 15:35:55 +08:00
|
|
|
|
width: 100%;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-24 15:30:03 +08:00
|
|
|
|
.icon-wrap {
|
2026-02-24 15:35:55 +08:00
|
|
|
|
width: 64rpx;
|
|
|
|
|
|
height: 64rpx;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
border-radius: 16rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
2026-02-24 15:35:55 +08:00
|
|
|
|
margin-right: 16rpx;
|
|
|
|
|
|
flex-shrink: 0;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-24 15:30:03 +08:00
|
|
|
|
&.yellow-bg {
|
|
|
|
|
|
background: #fff8e1;
|
|
|
|
|
|
}
|
|
|
|
|
|
&.blue-bg {
|
|
|
|
|
|
background: #e3f2fd;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.feature-icon {
|
2026-02-24 15:35:55 +08:00
|
|
|
|
width: 36rpx;
|
|
|
|
|
|
height: 36rpx;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 15:30:03 +08:00
|
|
|
|
.text-content {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-02-24 15:35:55 +08:00
|
|
|
|
overflow: hidden;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-24 15:30:03 +08:00
|
|
|
|
.feature-name {
|
2026-02-24 15:35:55 +08:00
|
|
|
|
font-size: 26rpx;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #333;
|
2026-02-24 15:35:55 +08:00
|
|
|
|
margin-bottom: 2rpx;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.feature-desc {
|
2026-02-24 15:35:55 +08:00
|
|
|
|
font-size: 20rpx;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
color: #999;
|
2026-02-24 15:35:55 +08:00
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-01-15 08:43:10 +08:00
|
|
|
|
}
|
2026-01-09 11:24:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-24 15:22:58 +08:00
|
|
|
|
/* 排行榜单 */
|
2026-02-24 15:30:03 +08:00
|
|
|
|
.rank-tabs-mini {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
display: flex;
|
2026-02-24 15:30:03 +08:00
|
|
|
|
margin-left: auto; /* Push to right */
|
|
|
|
|
|
background: #eee;
|
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
|
padding: 4rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.rank-tab-mini {
|
|
|
|
|
|
padding: 8rpx 20rpx;
|
|
|
|
|
|
border-radius: 26rpx;
|
|
|
|
|
|
font-size: 22rpx;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
color: #666;
|
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
|
|
|
|
|
|
|
&.active {
|
2026-02-24 15:30:03 +08:00
|
|
|
|
background: #fff;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-01-23 00:01:31 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.rank-list {
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
border-radius: 32rpx;
|
|
|
|
|
|
padding: 16rpx 24rpx;
|
|
|
|
|
|
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.03);
|
|
|
|
|
|
|
|
|
|
|
|
.rank-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 24rpx 0;
|
|
|
|
|
|
border-bottom: 2rpx solid #f5f5f5;
|
|
|
|
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.rank-num {
|
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
margin-right: 24rpx;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
&.rank-1 {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
background: #ffd700;
|
|
|
|
|
|
color: #fff;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
&.rank-2 {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
background: #c0c0c0;
|
|
|
|
|
|
color: #fff;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
&.rank-3 {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
background: #cd7f32;
|
|
|
|
|
|
color: #fff;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.rank-thumb {
|
|
|
|
|
|
width: 88rpx;
|
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
|
border-radius: 16rpx;
|
|
|
|
|
|
background: #eee;
|
|
|
|
|
|
margin-right: 24rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.rank-info {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
|
|
|
|
.rank-title-row {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 8rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.rank-title {
|
|
|
|
|
|
font-size: 28rpx;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
font-weight: bold;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
color: #333;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
.rank-meta {
|
2026-02-23 22:36:31 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
.tag-hot {
|
|
|
|
|
|
font-size: 18rpx;
|
|
|
|
|
|
color: #d81e06;
|
|
|
|
|
|
background: #ffebee;
|
|
|
|
|
|
padding: 2rpx 8rpx;
|
|
|
|
|
|
border-radius: 8rpx;
|
|
|
|
|
|
margin-right: 12rpx;
|
|
|
|
|
|
font-weight: 600;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
|
|
|
|
|
.usage-count {
|
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
|
color: #999;
|
2026-02-23 22:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-25 21:47:42 +08:00
|
|
|
|
.rank-action {
|
|
|
|
|
|
.download-btn {
|
|
|
|
|
|
width: 56rpx;
|
|
|
|
|
|
height: 56rpx;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background: linear-gradient(135deg, #ff9800, #ff5722);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
box-shadow: 0 4rpx 12rpx rgba(255, 87, 34, 0.3);
|
2026-02-24 15:22:58 +08:00
|
|
|
|
|
2026-02-25 21:47:42 +08:00
|
|
|
|
&:active {
|
|
|
|
|
|
opacity: 0.9;
|
|
|
|
|
|
transform: scale(0.95);
|
|
|
|
|
|
}
|
2026-02-24 15:22:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.rank-footer {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
|
color: #ccc;
|
|
|
|
|
|
padding: 24rpx 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 悬浮分享按钮 */
|
|
|
|
|
|
.float-share-btn {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
right: 32rpx;
|
|
|
|
|
|
bottom: 60rpx; /* 避开 tabBar */
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
padding: 16rpx 32rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
box-shadow: 0 8rpx 24rpx rgba(216, 30, 6, 0.2);
|
|
|
|
|
|
border: 2rpx solid #ffebee;
|
|
|
|
|
|
z-index: 100;
|
|
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
color: #d81e06;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
margin-left: 12rpx;
|
2026-01-23 00:01:31 +08:00
|
|
|
|
}
|
2026-01-15 08:43:10 +08:00
|
|
|
|
}
|
2026-01-28 15:44:30 +08:00
|
|
|
|
|
2026-02-23 22:36:31 +08:00
|
|
|
|
.bottom-spacer {
|
2026-02-24 15:22:58 +08:00
|
|
|
|
height: 120rpx;
|
2026-01-28 15:44:30 +08:00
|
|
|
|
}
|
2026-01-15 08:43:10 +08:00
|
|
|
|
</style>
|