fix: 抽签

This commit is contained in:
zzc
2026-02-03 05:55:04 +08:00
parent 7c80f9a6a6
commit b6091de037
10 changed files with 34 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view class="fortune-detail-page">
<NavBar title="2026 灵马贺岁" :transparent="true"/>
<NavBar title="" :transparent="true" color="#ffd700" />
<!-- 顶部提示条 -->
<!-- <view class="top-banner" v-if="inviterName">

View File

@@ -1,6 +1,6 @@
<template>
<view class="fortune-page" >
<NavBar title="2026 新年运势" :transparent="true" color="#ffd700"/>
<view class="fortune-page">
<NavBar title="2026 新年运势" :transparent="true" color="#ffd700" />
<!-- 初始状态签筒 -->
<view class="state-initial" v-if="status !== 'result'">
@@ -168,7 +168,8 @@ onShareAppMessage(async () => {
return {
title: "新春祝福",
path: `${cardId.value ? `/pages/fortune/detail?shareToken=${shareTokenRes.shareToken}` : `/pages/fortune/index?shareToken=${shareTokenRes.shareToken}`}`,
imageUrl: "/static/images/bg.jpg",
imageUrl:
"https://file.lihailezzc.com/resource/cfed2edbfa19250b836a87a4bbf0d5ad.png",
};
});

View File

@@ -18,7 +18,7 @@
<view class="stats-body">
<view class="stats-row">
<text class="stats-label">已收集</text>
<text class="stats-num">{{ records.length }}</text>
<text class="stats-num">{{ totalCount }}</text>
<text class="stats-label">张好运卡</text>
</view>
<view class="progress-bar">
@@ -57,11 +57,9 @@
<view class="item-info">
<text class="item-title">{{ item.title }}</text>
<view class="item-footer">
<text class="item-date">{{ item.date }}</text>
<view class="item-link">
<text>详情</text>
<text class="arrow"></text>
</view>
<text class="item-date">{{
formatDate(item.day, "YYYY-MM-DD")
}}</text>
</view>
</view>
</view>
@@ -90,11 +88,11 @@ import { ref, computed } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { getList } from "@/api/fortune.js";
import NavBar from "@/components/NavBar/NavBar.vue";
import { formatDate } from "@/utils/date.js";
// 状态管理
const records = ref([]);
const page = ref(1);
const curCount = ref(0);
const totalCount = ref(0);
const loading = ref(false);
const hasMore = ref(true);
@@ -145,7 +143,7 @@ const loadData = async () => {
page.value++;
// 简单判断是否还有更多数据
hasMore.value = res.hasNext;
curCount.value = res.totalCount || 0;
totalCount.value = res.totalCount || 0;
} else {
hasMore.value = false;
}
@@ -165,10 +163,9 @@ const loadMore = () => {
};
const goDetail = (item) => {
// 传递数据到详情页
const data = encodeURIComponent(JSON.stringify(item));
uni.navigateTo({
url: `/pages/fortune/detail?data=${data}`,
uni.previewImage({
current: item.imageUrl,
urls: records.value.map((r) => r.imageUrl),
});
};