update pay function

This commit is contained in:
2025-11-23 20:12:54 +08:00
parent 3fa3e52d65
commit 7538f2d935
5 changed files with 439 additions and 92 deletions

View File

@@ -33,7 +33,7 @@ import { Search, PenSquare, TrendingUp, Clock, Heart, Zap, HelpCircle } from 'lu
import { motion, AnimatePresence } from 'framer-motion';
import { forumColors } from '@theme/forumTheme';
import { getPosts, searchPosts } from '@services/elasticsearchService';
import { getTopics } from '@services/predictionMarketService';
import { getTopics } from '@services/predictionMarketService.api';
import PostCard from './components/PostCard';
import PredictionTopicCard from './components/PredictionTopicCard';
import CreatePostModal from './components/CreatePostModal';
@@ -93,11 +93,13 @@ const ValueForum = () => {
};
// 获取预测话题列表
const fetchPredictionTopics = () => {
const fetchPredictionTopics = async () => {
try {
setLoading(true);
const topics = getTopics({ status: 'active', sortBy });
setPredictionTopics(topics);
const response = await getTopics({ status: 'active', sort_by: sortBy });
if (response.success) {
setPredictionTopics(response.data);
}
} catch (error) {
console.error('获取预测话题失败:', error);
} finally {