fix: index page
This commit is contained in:
@@ -88,11 +88,11 @@
|
||||
<view class="calendar-mode">
|
||||
<view class="sign-header">
|
||||
<text class="sign-title"
|
||||
>已连续签到
|
||||
>本周已连续签到
|
||||
<text class="highlight">{{ signInfo.continuousDays || 0 }}</text>
|
||||
天</text
|
||||
>
|
||||
<text class="sign-tip">连续7天得大奖</text>
|
||||
<text class="sign-tip">连续7天得100积分</text>
|
||||
</view>
|
||||
<view class="week-days">
|
||||
<view
|
||||
@@ -150,7 +150,7 @@
|
||||
<view class="section-container">
|
||||
<view class="section-header">
|
||||
<view class="title-left-decor"></view>
|
||||
<text class="section-title">贺卡制作</text>
|
||||
<text class="section-title">问候·祝福</text>
|
||||
</view>
|
||||
<scroll-view class="scene-scroll" scroll-x="true" show-scrollbar="false">
|
||||
<view class="scene-list">
|
||||
@@ -244,7 +244,7 @@
|
||||
<!-- <view class="bottom-spacer"></view> -->
|
||||
|
||||
<!-- 登录弹窗 -->
|
||||
<LoginPopup />
|
||||
<LoginPopup @logind="handleLoginSuccess" />
|
||||
<!-- 运势抽奖弹窗 -->
|
||||
<LuckyPopup ref="luckyPopupRef" />
|
||||
<RewardAd ref="rewardAdRef" @onReward="handleAdReward" />
|
||||
@@ -304,8 +304,7 @@ import {
|
||||
} from "@/api/system";
|
||||
import { getUserSignInfo, userSignIn, getUserLuckInfo } from "@/api/user";
|
||||
import calendar from "@/utils/lunar";
|
||||
import { getShareToken } from "@/utils/common.js";
|
||||
|
||||
import { getShareToken, saveViewRequest } from "@/utils/common.js";
|
||||
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
||||
import LuckyPopup from "@/components/LuckyPopup/LuckyPopup.vue";
|
||||
import RewardAd from "@/components/RewardAd/RewardAd.vue";
|
||||
@@ -431,7 +430,10 @@ const sceneList = ref([
|
||||
const wallpaperList = ref([]);
|
||||
const avatarList = ref([]);
|
||||
|
||||
onLoad(() => {
|
||||
onLoad((options) => {
|
||||
if (options.shareToken) {
|
||||
saveViewRequest(options.shareToken, "index");
|
||||
}
|
||||
fetchUserSingInfo(); // 获取用户签到信息
|
||||
fetchHomeData();
|
||||
fetchSpecialTopic();
|
||||
@@ -478,6 +480,10 @@ const fetchUserSingInfo = async () => {
|
||||
signInfo.value = res || {};
|
||||
};
|
||||
|
||||
const handleLoginSuccess = () => {
|
||||
fetchUserSingInfo();
|
||||
};
|
||||
|
||||
const fetchHomeData = async () => {
|
||||
try {
|
||||
const [wallpapers, avatars] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user