校赛提交

This commit is contained in:
2025-09-16 22:17:20 +08:00
parent 174d8a3bc5
commit dd3f702887
12 changed files with 175 additions and 216 deletions

View File

@@ -1 +1 @@
REACT_APP_API_URL=http://127.0.0.1:5002 REACT_APP_API_URL=https://infogenie.api.shumengya.top

View File

@@ -1 +1 @@
REACT_APP_API_URL=http://127.0.0.1:5002 REACT_APP_API_URL=https://infogenie.api.shumengya.top

View File

@@ -1 +1 @@
REACT_APP_API_URL=http://127.0.0.1:5002 REACT_APP_API_URL=https://infogenie.api.shumengya.top

View File

@@ -2,7 +2,8 @@
class WeatherApp { class WeatherApp {
constructor() { constructor() {
this.apiEndpoints = [ this.apiEndpoints = [
"https://60s.api.shumengya.top/v2/weather/forecast" "https://60s.api.shumengya.top/v2/weather/forecast",
"https://60s-cf.viki.moe/v2/weather/forecast"
]; ];
this.currentEndpointIndex = 0; this.currentEndpointIndex = 0;
this.init(); this.init();
@@ -89,31 +90,42 @@ class WeatherApp {
} }
displayWeatherData(data) { displayWeatherData(data) {
const { location, forecast } = data; const { location, daily_forecast, hourly_forecast } = data;
// 显示位置信息 // 显示位置信息
document.getElementById('locationName').textContent = location.formatted; document.getElementById('locationName').textContent = location.name || '未知位置';
document.getElementById('locationDetail').textContent = document.getElementById('locationDetail').textContent =
`${location.province} ${location.city} | 邮编: ${location.zip_code}`; `${location.province || ''} ${location.city || ''} ${location.county || ''}`.trim();
// 使用第一天的预报数据作为当前天气(今天的天气) // 使用第一天的预报数据作为当前天气(今天的天气)
const todayWeather = forecast[0]; const todayWeather = daily_forecast && daily_forecast[0];
// 显示当前天气(使用今天的最高温度) if (todayWeather) {
document.getElementById('temperature').textContent = todayWeather.temperature_high; // 显示当前天气(使用今天的最高温度)
document.getElementById('weatherCondition').textContent = document.getElementById('temperature').textContent = todayWeather.max_temperature;
`${todayWeather.weather_day}${todayWeather.weather_night}`; document.getElementById('weatherCondition').textContent =
`${todayWeather.day_condition}${todayWeather.night_condition}`;
// 体感温度(使用温度范围) // 体感温度(使用温度范围)
document.getElementById('feelsLike').textContent = document.getElementById('feelsLike').textContent =
`温度范围 ${todayWeather.temperature_low}°C - ${todayWeather.temperature_high}°C`; `温度范围 ${todayWeather.min_temperature}°C - ${todayWeather.max_temperature}°C`;
} else {
// 如果没有日预报数据,尝试使用小时预报数据
const currentHour = hourly_forecast && hourly_forecast[0];
if (currentHour) {
document.getElementById('temperature').textContent = currentHour.temperature;
document.getElementById('weatherCondition').textContent = currentHour.condition;
document.getElementById('feelsLike').textContent =
`风向: ${currentHour.wind_direction} ${currentHour.wind_power}`;
}
}
// 显示更新时间(使用当前时间) // 显示更新时间(使用当前时间)
document.getElementById('updateTime').textContent = document.getElementById('updateTime').textContent =
`${this.formatDate(new Date())} (基于预报数据)`; `${this.formatDate(new Date())} (基于预报数据)`;
// 显示天气预报 // 显示天气预报
this.displayForecast(forecast); this.displayForecast(daily_forecast || []);
this.showWeatherContainer(); this.showWeatherContainer();
} }
@@ -122,24 +134,33 @@ class WeatherApp {
const forecastGrid = document.getElementById('forecastGrid'); const forecastGrid = document.getElementById('forecastGrid');
forecastGrid.innerHTML = ''; forecastGrid.innerHTML = '';
if (!forecast || forecast.length === 0) {
forecastGrid.innerHTML = '<div class="no-forecast">暂无预报数据</div>';
return;
}
forecast.forEach((day, index) => { forecast.forEach((day, index) => {
const forecastItem = document.createElement('div'); const forecastItem = document.createElement('div');
forecastItem.className = 'forecast-item'; forecastItem.className = 'forecast-item';
// 格式化日期显示
const dateStr = day.date || '';
const dateDesc = this.formatDateDesc(dateStr);
forecastItem.innerHTML = ` forecastItem.innerHTML = `
<div class="forecast-date">${day.date_desc}</div> <div class="forecast-date">${dateDesc}</div>
<div class="forecast-weather"> <div class="forecast-weather">
<div class="weather-day">${day.weather_day}</div> <div class="weather-day">${day.day_condition || '未知'}</div>
<div class="weather-night">${day.weather_night}</div> <div class="weather-night">${day.night_condition || '未知'}</div>
</div> </div>
<div class="forecast-temp"> <div class="forecast-temp">
<span class="temp-high">${day.temperature_high}°</span> <span class="temp-high">${day.max_temperature || '--'}°</span>
<span class="temp-low">${day.temperature_low}°</span> <span class="temp-low">${day.min_temperature || '--'}°</span>
</div> </div>
<div class="forecast-wind"> <div class="forecast-wind">
<div>${day.wind_direction_day} ${day.wind_strength_day}</div> <div>${day.day_wind_direction || ''} ${day.day_wind_power || ''}</div>
</div> </div>
<div class="forecast-humidity">湿度: ${day.humidity}%</div> <div class="forecast-air">空气质量: ${day.air_quality || '未知'}</div>
`; `;
forecastGrid.appendChild(forecastItem); forecastGrid.appendChild(forecastItem);
@@ -164,6 +185,34 @@ class WeatherApp {
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
} }
// 格式化日期描述
formatDateDesc(dateStr) {
if (!dateStr) return '未知日期';
try {
const date = new Date(dateStr);
const today = new Date();
const tomorrow = new Date(today);
tomorrow.setDate(today.getDate() + 1);
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
// 判断是今天、明天还是其他日期
if (date.toDateString() === today.toDateString()) {
return `今天 ${month}-${day}`;
} else if (date.toDateString() === tomorrow.toDateString()) {
return `明天 ${month}-${day}`;
} else {
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const weekday = weekdays[date.getDay()];
return `${weekday} ${month}-${day}`;
}
} catch (error) {
return dateStr;
}
}
showLoading() { showLoading() {
document.getElementById('loading').style.display = 'block'; document.getElementById('loading').style.display = 'block';
document.getElementById('weatherContainer').style.display = 'none'; document.getElementById('weatherContainer').style.display = 'none';

View File

@@ -1,3 +0,0 @@
[
"https://60s.api.shumengya.top/v2/weather/forecast"
]

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,7 @@
// API接口列表 // API接口列表
const API_ENDPOINTS = [ const API_ENDPOINTS = [
"https://60s.api.shumengya.top/v2/weibo", "https://60s.api.shumengya.top/v2/weibo",
"https://60s-cf.viki.moe/v2/weibo",
]; ];
// 当前使用的API索引 // 当前使用的API索引
@@ -72,7 +73,7 @@ async function fetchWeiboHotList() {
// 显示错误信息 // 显示错误信息
hotListElement.innerHTML = ` hotListElement.innerHTML = `
<div class="loading"> <div class="loading">
获取数据失败,正在尝试其他接口... 正在尝试其他接口...
</div> </div>
`; `;

View File

@@ -1,3 +0,0 @@
[
"https://60s.api.shumengya.top"
]

View File

@@ -1,127 +1,141 @@
// 静态页面配置文件 // 静态页面配置文件
// 统一管理所有静态网页的链接和配置信息 // 统一管理所有静态网页的链接和配置信息
//AI模型工具 //AI工具
export const AI_MODEL_APPS = [ export const AI_MODEL_APPS = [
{ {
title: 'AI变量命名助手', title: 'AI变量命名助手',
description: '智能变量命名工具,帮助开发者快速生成规范的变量名', description: '智能变量命名工具,帮助开发者快速生成规范的变量名',
link: '/aimodelapp/AI变量命名助手/index.html', link: '/aimodelapp/AI变量命名助手/index.html',
gradient: 'linear-gradient(135deg, #4ade80 0%, #22c55e 100%)', gradient: 'linear-gradient(135deg, #4ade80 0%, #22c55e 100%)',
icon: '🤖' icon: '🤖',
IsShow: true
}, },
{ {
title: 'AI写诗小助手', title: 'AI写诗小助手',
description: 'AI创作诗歌助手体验古典诗词的魅力', description: 'AI创作诗歌助手体验古典诗词的魅力',
link: '/aimodelapp/AI写诗小助手/index.html', link: '/aimodelapp/AI写诗小助手/index.html',
gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
icon: '📝' icon: '📝',
IsShow: true
}, },
{ {
title: 'AI姓名评测', title: 'AI姓名评测',
description: '基于AI的姓名分析和评测工具', description: '基于AI的姓名分析和评测工具',
link: '/aimodelapp/AI姓名评测/index.html', link: '/aimodelapp/AI姓名评测/index.html',
gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
icon: '👤' icon: '👤',
IsShow: true
}, },
{ {
title: 'AI翻译助手', title: 'AI翻译助手',
description: '基于AI的翻译工具', description: '基于AI的翻译工具',
link: '/aimodelapp/AI语言翻译助手/index.html', link: '/aimodelapp/AI语言翻译助手/index.html',
gradient: 'linear-gradient(135deg,rgb(80, 77, 243) 0%,rgb(30, 211, 111) 100%)', gradient: 'linear-gradient(135deg,rgb(80, 77, 243) 0%,rgb(30, 211, 111) 100%)',
icon: '🌍' icon: '🌍',
IsShow: true
}, },
{ {
title: 'AI文章转文言文', title: 'AI文章转文言文',
description: '基于AI的文章转文言文工具', description: '基于AI的文章转文言文工具',
link: '/aimodelapp/AI文章转文言文/index.html', link: '/aimodelapp/AI文章转文言文/index.html',
gradient: 'linear-gradient(135deg,rgb(186, 248, 70) 0%,rgb(255, 208, 0) 100%)', gradient: 'linear-gradient(135deg,rgb(186, 248, 70) 0%,rgb(255, 208, 0) 100%)',
icon: '📝' icon: '📝',
IsShow: true
}, },
{ {
title: 'AI生成表情包', title: 'AI生成表情包',
description: '基于AI的生成表情包工具', description: '基于AI的生成表情包工具',
link: '/aimodelapp/AI生成表情包/index.html', link: '/aimodelapp/AI生成表情包/index.html',
gradient: 'linear-gradient(135deg,rgb(186, 248, 70) 0%,rgb(34, 157, 238) 100%)', gradient: 'linear-gradient(135deg,rgb(186, 248, 70) 0%,rgb(34, 157, 238) 100%)',
icon: '📸' icon: '📸',
IsShow: true
}, },
{ {
title: 'AI生成Linux命令', title: 'AI生成Linux命令',
description: '基于AI的生成Linux命令工具', description: '基于AI的生成Linux命令工具',
link: '/aimodelapp/AI生成Linux命令/index.html', link: '/aimodelapp/AI生成Linux命令/index.html',
gradient: 'linear-gradient(135deg,rgb(128, 180, 32) 0%,rgb(29, 199, 162) 100%)', gradient: 'linear-gradient(135deg,rgb(128, 180, 32) 0%,rgb(29, 199, 162) 100%)',
icon: '🐧' icon: '🐧',
IsShow: true
}, },
]; ];
//玩玩小游戏
export const SMALL_GAMES = [ export const SMALL_GAMES = [
{ {
title: '2048', title: '2048',
description: '经典数字合并游戏,挑战你的策略思维', description: '经典数字合并游戏,挑战你的策略思维',
link: '/smallgame/2048/index.html', link: '/smallgame/2048/index.html',
gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
icon: '🔢' icon: '🔢',
IsShow: true
}, },
{ {
title: '别踩白方块', title: '别踩白方块',
description: '节奏感游戏,考验你的反应速度和手指协调', description: '节奏感游戏,考验你的反应速度和手指协调',
link: '/smallgame/别踩白方块/index.html', link: '/smallgame/别踩白方块/index.html',
gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
icon: '⬛' icon: '⬛',
IsShow: true
}, },
{ {
title: '俄罗斯方块', title: '俄罗斯方块',
description: '经典落块消除游戏,永恒的经典之作', description: '经典落块消除游戏,永恒的经典之作',
link: '/smallgame/俄罗斯方块/index.html', link: '/smallgame/俄罗斯方块/index.html',
gradient: 'linear-gradient(135deg, #4ade80 0%, #22c55e 100%)', gradient: 'linear-gradient(135deg, #4ade80 0%, #22c55e 100%)',
icon: '🧩' icon: '🧩',
IsShow: true
}, },
{ {
title: '贪吃蛇', title: '贪吃蛇',
description: '经典贪吃蛇游戏,考验你的反应速度和手指协调', description: '经典贪吃蛇游戏,考验你的反应速度和手指协调',
link: '/smallgame/贪吃蛇/index.html', link: '/smallgame/贪吃蛇/index.html',
gradient: 'linear-gradient(135deg,rgb(37, 132, 240) 0%, #f5576c 100%)', gradient: 'linear-gradient(135deg,rgb(37, 132, 240) 0%, #f5576c 100%)',
icon: '🐍' icon: '🐍',
IsShow: true
}, },
{ {
title: '扫雷', title: '扫雷',
description: '经典扫雷游戏,考验你的反应速度和手指协调', description: '经典扫雷游戏,考验你的反应速度和手指协调',
link: '/smallgame/扫雷/index.html', link: '/smallgame/扫雷/index.html',
gradient: 'linear-gradient(135deg,rgb(37, 132, 240) 0%, #f5576c 100%)', gradient: 'linear-gradient(135deg,rgb(37, 132, 240) 0%, #f5576c 100%)',
icon: '💣' icon: '💣',
IsShow: true
}, },
]; ];
//API聚合应用
export const API_60S_CATEGORIES = [ export const API_60S_CATEGORIES = [
{ {
title: '热搜榜单', title: '热搜榜单',
icon: '🔥', icon: '🔥',
color: '#ff6b6b', color: '#ff6b6b',
apis: [ apis: [
{ title: '哔哩哔哩热搜榜', link: '/60sapi/热搜榜单/哔哩哔哩热搜榜/index.html', icon: '📺' }, { title: '哔哩哔哩热搜榜', link: '/60sapi/热搜榜单/哔哩哔哩热搜榜/index.html', icon: '📺', IsShow: true },
{ title: '抖音热搜榜', link: '/60sapi/热搜榜单/抖音热搜榜/index.html', icon: '🎵' }, { title: '抖音热搜榜', link: '/60sapi/热搜榜单/抖音热搜榜/index.html', icon: '🎵', IsShow: true },
{ title: '猫眼票房排行榜', link: '/60sapi/热搜榜单/猫眼票房排行榜/index.html', icon: '🎬' }, { title: '猫眼票房排行榜', link: '/60sapi/热搜榜单/猫眼票房排行榜/index.html', icon: '🎬', IsShow: true },
{ title: '头条热搜榜', link: '/60sapi/热搜榜单/头条热搜榜/index.html', icon: '📰' }, { title: '头条热搜榜', link: '/60sapi/热搜榜单/头条热搜榜/index.html', icon: '📰', IsShow: true },
{ title: '网易云榜单', link: '/60sapi/热搜榜单/网易云榜单/index.html', icon: '🎶' }, { title: '网易云榜单', link: '/60sapi/热搜榜单/网易云榜单/index.html', icon: '🎶', IsShow: true },
{ title: '微博热搜榜', link: '/60sapi/热搜榜单/微博热搜榜/index.html', icon: '📱' }, { title: '微博热搜榜', link: '/60sapi/热搜榜单/微博热搜榜/index.html', icon: '📱', IsShow: true },
{ title: '知乎热门话题', link: '/60sapi/热搜榜单/知乎热门话题/index.html', icon: '💡' }, { title: '知乎热门话题', link: '/60sapi/热搜榜单/知乎热门话题/index.html', icon: '💡', IsShow: true },
{ title: 'Hacker News 榜单', link: '/60sapi/热搜榜单/Hacker News 榜单/index.html', icon: '💻' }, { title: 'Hacker News 榜单', link: '/60sapi/热搜榜单/Hacker News 榜单/index.html', icon: '💻', IsShow: true },
{ title: '小红书热点', link: '/60sapi/热搜榜单/小红书热点/index.html', icon: '📖' }, { title: '小红书热点', link: '/60sapi/热搜榜单/小红书热点/index.html', icon: '📖', IsShow: true },
{ title: '百度实时热搜', link: '/60sapi/热搜榜单/百度实时热搜/index.html', icon: '🔍' }, { title: '百度实时热搜', link: '/60sapi/热搜榜单/百度实时热搜/index.html', icon: '🔍', IsShow: true },
{ title: '百度电视剧榜', link: '/60sapi/热搜榜单/百度电视剧榜/index.html', icon: '📺' }, { title: '百度电视剧榜', link: '/60sapi/热搜榜单/百度电视剧榜/index.html', icon: '📺', IsShow: true },
{ title: '百度贴吧话题榜', link: '/60sapi/热搜榜单/百度贴吧话题榜/index.html', icon: '💬' }, { title: '百度贴吧话题榜', link: '/60sapi/热搜榜单/百度贴吧话题榜/index.html', icon: '💬', IsShow: true },
{ title: '懂车帝热搜', link: '/60sapi/热搜榜单/懂车帝热搜/index.html', icon: '🚗' }, { title: '懂车帝热搜', link: '/60sapi/热搜榜单/懂车帝热搜/index.html', icon: '🚗', IsShow: true },
] ]
}, },
{ {
title: '日更资讯', title: '日更资讯',
icon: '📰', icon: '📰',
color: '#4ecdc4', color: '#81c784',
apis: [ apis: [
{ title: '必应每日壁纸', link: '/60sapi/日更资讯/必应每日壁纸/index.html', icon: '🖼️' }, { title: '必应每日壁纸', link: '/60sapi/日更资讯/必应每日壁纸/index.html', icon: '🖼️', IsShow: true },
{ title: '历史上的今天', link: '/60sapi/日更资讯/历史上的今天/index.html', icon: '📅' }, { title: '历史上的今天', link: '/60sapi/日更资讯/历史上的今天/index.html', icon: '📅', IsShow: true },
{ title: '每日国际汇率', link: '/60sapi/日更资讯/每日国际汇率/index.html', icon: '💱' }, { title: '每日国际汇率', link: '/60sapi/日更资讯/每日国际汇率/index.html', icon: '💱', IsShow: true },
{ title: '每天60s读懂世界', link: '/60sapi/日更资讯/每天60s读懂世界/index.html', icon: '🌍' } { title: '每天60s读懂世界', link: '/60sapi/日更资讯/每天60s读懂世界/index.html', icon: '🌍', IsShow: true }
] ]
}, },
{ {
@@ -129,20 +143,20 @@ export const API_60S_CATEGORIES = [
icon: '🛠️', icon: '🛠️',
color: '#45b7d1', color: '#45b7d1',
apis: [ apis: [
{ title: '百度百科词条', link: '/60sapi/实用功能/百度百科词条/index.html', icon: '📚' }, { title: '百度百科词条', link: '/60sapi/实用功能/百度百科词条/index.html', icon: '📚', IsShow: true },
{ title: '公网IP地址', link: '/60sapi/实用功能/公网IP地址/index.html', icon: '🌐' }, { title: '公网IP地址', link: '/60sapi/实用功能/公网IP地址/index.html', icon: '🌐', IsShow: true },
{ title: '哈希解压压缩', link: '/60sapi/实用功能/哈希解压压缩/index.html', icon: '🗜️' }, { title: '哈希解压压缩', link: '/60sapi/实用功能/哈希解压压缩/index.html', icon: '🗜️', IsShow: true },
{ title: '链接OG信息', link: '/60sapi/实用功能/链接OG信息/index.html', icon: '🔗' }, { title: '链接OG信息', link: '/60sapi/实用功能/链接OG信息/index.html', icon: '🔗', IsShow: true },
{ title: '密码强度检测', link: '/60sapi/实用功能/密码强度检测/index.html', icon: '🔐' }, { title: '密码强度检测', link: '/60sapi/实用功能/密码强度检测/index.html', icon: '🔐', IsShow: true },
{ title: '农历信息', link: '/60sapi/实用功能/农历信息/index.html', icon: '📅' }, { title: '农历信息', link: '/60sapi/实用功能/农历信息/index.html', icon: '📅', IsShow: true },
{ title: '配色方案', link: '/60sapi/实用功能/配色方案/index.html', icon: '🎨' }, { title: '配色方案', link: '/60sapi/实用功能/配色方案/index.html', icon: '🎨', IsShow: true },
{ title: '身体健康分析', link: '/60sapi/实用功能/身体健康分析/index.html', icon: '🏥' }, { title: '身体健康分析', link: '/60sapi/实用功能/身体健康分析/index.html', icon: '🏥', IsShow: true },
{ title: '生成二维码', link: '/60sapi/实用功能/生成二维码/index.html', icon: '📱' }, { title: '生成二维码', link: '/60sapi/实用功能/生成二维码/index.html', icon: '📱', IsShow: true },
{ title: '随机密码生成器', link: '/60sapi/实用功能/随机密码生成器/index.html', icon: '🔒' }, { title: '随机密码生成器', link: '/60sapi/实用功能/随机密码生成器/index.html', icon: '🔒', IsShow: true },
{ title: '随机颜色', link: '/60sapi/实用功能/随机颜色/index.html', icon: '🌈' }, { title: '随机颜色', link: '/60sapi/实用功能/随机颜色/index.html', icon: '🌈', IsShow: true },
{ title: '天气预报', link: '/60sapi/实用功能/天气预报/index.html', icon: '🌤️' }, { title: '天气预报', link: '/60sapi/实用功能/天气预报/index.html', icon: '🌤️', IsShow: true },
{ title: 'EpicGames免费游戏', link: '/60sapi/实用功能/EpicGames免费游戏/index.html', icon: '🎮' }, { title: 'EpicGames免费游戏', link: '/60sapi/实用功能/EpicGames免费游戏/index.html', icon: '🎮', IsShow: true },
{ title: '在线机器翻译', link: '/60sapi/实用功能/在线翻译/index.html', icon: '🌍' }, { title: '在线机器翻译', link: '/60sapi/实用功能/在线翻译/index.html', icon: '🌍', IsShow: false },
] ]
}, },
{ {
@@ -150,14 +164,14 @@ export const API_60S_CATEGORIES = [
icon: '🎉', icon: '🎉',
color: '#f7b731', color: '#f7b731',
apis: [ apis: [
{ title: '随机唱歌音频', link: '/60sapi/娱乐消遣/随机唱歌音频/index.html', icon: '🎤' }, { title: '随机唱歌音频', link: '/60sapi/娱乐消遣/随机唱歌音频/index.html', icon: '🎤', IsShow: true },
{ title: '随机发病文学', link: '/60sapi/娱乐消遣/随机发病文学/index.html', icon: '📖' }, { title: '随机发病文学', link: '/60sapi/娱乐消遣/随机发病文学/index.html', icon: '📖', IsShow: true },
{ title: '随机搞笑段子', link: '/60sapi/娱乐消遣/随机搞笑段子/index.html', icon: '😂' }, { title: '随机搞笑段子', link: '/60sapi/娱乐消遣/随机搞笑段子/index.html', icon: '😂', IsShow: true },
{ title: '随机冷笑话', link: '/60sapi/娱乐消遣/随机冷笑话/index.html', icon: '😄' }, { title: '随机冷笑话', link: '/60sapi/娱乐消遣/随机冷笑话/index.html', icon: '😄', IsShow: true },
{ title: '随机一言', link: '/60sapi/娱乐消遣/随机一言/index.html', icon: '💭' }, { title: '随机一言', link: '/60sapi/娱乐消遣/随机一言/index.html', icon: '💭', IsShow: true },
{ title: '随机运势', link: '/60sapi/娱乐消遣/随机运势/index.html', icon: '⭐' }, { title: '随机运势', link: '/60sapi/娱乐消遣/随机运势/index.html', icon: '⭐', IsShow: true },
{ title: '随机JavaScript趣味题', link: '/60sapi/娱乐消遣/随机JavaScript趣味题/index.html', icon: '💻' }, { title: '随机JavaScript趣味题', link: '/60sapi/娱乐消遣/随机JavaScript趣味题/index.html', icon: '💻', IsShow: true },
{ title: '随机KFC文案', link: '/60sapi/娱乐消遣/随机KFC文案/index.html', icon: '🍗' } { title: '随机KFC文案', link: '/60sapi/娱乐消遣/随机KFC文案/index.html', icon: '🍗', IsShow: true }
] ]
} }
]; ];

View File

@@ -21,16 +21,14 @@ const Container = styled.div`
const PageHeader = styled.div` const PageHeader = styled.div`
text-align: center; text-align: center;
margin-bottom: 40px; margin-bottom: 40px;
padding: 40px 20px;
background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
border-radius: 16px;
`; `;
const PageTitle = styled.h1` const PageTitle = styled.h1`
color: white;
font-size: 32px; font-size: 32px;
font-weight: bold; font-weight: 700;
color: #1f2937; margin-bottom: 10px;
margin-bottom: 16px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
.title-emoji { .title-emoji {
margin: 0 8px; margin: 0 8px;
@@ -42,9 +40,10 @@ const PageTitle = styled.h1`
`; `;
const PageDescription = styled.p` const PageDescription = styled.p`
font-size: 16px; color: rgba(255, 255, 255, 0.8);
color: #6b7280; font-size: 18px;
line-height: 1.6; max-width: 600px;
margin: 0 auto;
`; `;
const LoginPrompt = styled.div` const LoginPrompt = styled.div`
@@ -270,8 +269,9 @@ const AiModelPage = () => {
try { try {
setLoadingApps(true); setLoadingApps(true);
// 从配置文件获取AI应用数据 // 从配置文件获取AI应用数据过滤掉IsShow为false的应用
setApps(AI_MODEL_APPS); const visibleApps = AI_MODEL_APPS.filter(app => app.IsShow !== false);
setApps(visibleApps);
} catch (err) { } catch (err) {
console.error('获取AI应用列表失败:', err); console.error('获取AI应用列表失败:', err);
setError('获取AI应用列表失败请稍后重试'); setError('获取AI应用列表失败请稍后重试');
@@ -327,12 +327,10 @@ const AiModelPage = () => {
<Container> <Container>
<PageHeader> <PageHeader>
<PageTitle> <PageTitle>
<span className="title-emoji">🤖</span> AI工具
AI模型
<span className="title-emoji">🤖</span>
</PageTitle> </PageTitle>
<PageDescription> <PageDescription>
智能AI工具和模型应用提供对话文本生成图像识别等功能 AI大模型工具提供一些小功能
</PageDescription> </PageDescription>
</PageHeader> </PageHeader>

View File

@@ -207,8 +207,13 @@ const Api60sPage = () => {
// 从配置文件获取60s API数据 // 从配置文件获取60s API数据
const scanApiModules = async () => { const scanApiModules = async () => {
try { try {
// 直接返回配置文件中的数据 // 过滤掉IsShow为false的API项目
return API_60S_CATEGORIES; const filteredCategories = API_60S_CATEGORIES.map(category => ({
...category,
apis: category.apis.filter(api => api.IsShow !== false)
})).filter(category => category.apis.length > 0); // 过滤掉没有可显示API的分类
return filteredCategories;
} catch (error) { } catch (error) {
console.error('获取API模块时出错:', error); console.error('获取API模块时出错:', error);
return []; return [];

View File

@@ -17,16 +17,14 @@ const Container = styled.div`
const PageHeader = styled.div` const PageHeader = styled.div`
text-align: center; text-align: center;
margin-bottom: 40px; margin-bottom: 40px;
padding: 40px 20px;
background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
border-radius: 16px;
`; `;
const PageTitle = styled.h1` const PageTitle = styled.h1`
color: white;
font-size: 32px; font-size: 32px;
font-weight: bold; font-weight: 700;
color: #1f2937; margin-bottom: 10px;
margin-bottom: 16px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
.title-emoji { .title-emoji {
margin: 0 8px; margin: 0 8px;
@@ -38,9 +36,10 @@ const PageTitle = styled.h1`
`; `;
const PageDescription = styled.p` const PageDescription = styled.p`
font-size: 16px; color: rgba(255, 255, 255, 0.8);
color: #6b7280; font-size: 18px;
line-height: 1.6; max-width: 600px;
margin: 0 auto;
`; `;
const GameGrid = styled.div` const GameGrid = styled.div`
@@ -239,8 +238,9 @@ const SmallGamePage = () => {
try { try {
setLoading(true); setLoading(true);
// 从配置文件获取小游戏数据 // 从配置文件获取小游戏数据过滤掉IsShow为false的游戏
setGames(SMALL_GAMES); const visibleGames = SMALL_GAMES.filter(game => game.IsShow !== false);
setGames(visibleGames);
} catch (err) { } catch (err) {
console.error('获取游戏列表失败:', err); console.error('获取游戏列表失败:', err);
setError('获取游戏列表失败,请稍后重试'); setError('获取游戏列表失败,请稍后重试');
@@ -264,9 +264,7 @@ const SmallGamePage = () => {
<Container> <Container>
<PageHeader> <PageHeader>
<PageTitle> <PageTitle>
<span className="title-emoji">🎮</span> 玩玩小游戏
小游戏
<span className="title-emoji">🎮</span>
</PageTitle> </PageTitle>
<PageDescription> <PageDescription>
轻松有趣的休闲小游戏合集即点即玩无需下载 轻松有趣的休闲小游戏合集即点即玩无需下载